Skip to content

feat(ui): tab the Settings dialog by topic, widen it 80%, and turn on afterglow by default - #203

Merged
dc0sk merged 1 commit into
mainfrom
feat/settings-tabs-and-afterglow-default
Sep 22, 2026
Merged

dc0sk merged 1 commit into
mainfrom
feat/settings-tabs-and-afterglow-default

Conversation

@dc0sk

@dc0sk dc0sk commented Sep 22, 2026

Copy link
Copy Markdown
Owner

What

Two changes DC0SK asked for together, then three refinements from on-screen feedback.

  1. Spectrum afterglow (FR-PAN-14) now defaults to 500 ms, instead of
    off. It shipped off-by-default and was easy to never notice; a gentle
    trail now shows out of the box, and 0 in Settings still turns it off
    for anyone who tried it and prefers it off. A config from before the
    feature existed picks up the new default too (it never had an opinion).

  2. Settings is tabbed by topic — Connection, Peers, Spotting, Audio,
    K-Pod, KPA1500, Backup — instead of one long scrolling column, and
    80% wider (500 → 900 px). It had grown crowded as features
    accumulated (KPA1500, spotting networks, afterglow, K-Pod macros, backup —
    none of it existed when it first shipped as one column).

  3. Fixed (screen feedback): the dialog no longer resizes per tab. A
    first cut used max_height, which sizes the container to whichever
    tab's content is tallest/shortest — caught on screen.

  4. Fixed (screen feedback): the new default wasn't applied to an existing
    config.
    The config already had spectrum_afterglow_ms = 0 saved
    explicitly by an earlier build — #[serde(default = "...")] only
    supplies a value for a field the file never had, not one it has. This
    needed an actual one-time migration (FR-CFG-09): Config gained
    afterglow_default_migrated: bool (false only for a file that
    predates the flag), and Config::load promotes an unmigrated 0 to
    the new default exactly once — a 0 set after upgrading is
    respected, never overridden again.

  5. Settings is now a detached window (screen feedback), not a modal
    dialog.
    Same request as ci: fix Windows build (libopus/OpenSSL from source) #3, one layer up: DC0SK asked for the window
    itself, specifically to drop the in-content Close button, whose position
    moved with each tab's height — the same symptom as the resizing dialog.
    Settings now opens/closes via iced::window, alongside KPA1500/Networks/
    Diagnostics, at a fixed 900×720, with its own WindowClosed handling
    and ESC support, and no in-content Close button at all — the OS
    window controls and ESC replace it, matching what a real window buys you
    over a wider modal.

Design notes (mine — please overrule)

  • "Wider by 180%" is ambiguous between "1.8× the current width" (900 px)
    and "an increase of 180%" (1400 px). I went with 900 px.
  • The other detached windows (KPA1500, Networks) keep an in-content "Done"
    button alongside their OS/ESC close. I dropped Settings' entirely rather
    than keep one and pin its position, since removing it is what DC0SK asked
    for and directly resolves the complaint. Say if you'd rather it match the
    sibling windows' convention instead.

Tests

  • fr_ui_23_every_settings_section_is_reachable_through_a_tab (structural,
    reading only the code above its own module): the window opens through
    settings_window_settings(); view/title/WindowClosed all route
    self.settings_window; opening resets to Connection; every tab has a
    button; every section from the old column is still shown by some tab; the
    widened+fixed window size (900.0 × 720.0) is present; no in-content
    Close button exists.
  • fr_pan_14_afterglow_setting_persists_and_is_bounded (k4-config)
    extended for the new default; AFTERGLOW_DEFAULT_MS pinned as a literal.
  • fr_cfg_09_afterglow_migrates_once_and_respects_a_later_choice
    (k4-config, new): unmigrated file, already-migrated file with a
    deliberate 0, fresh Config.
  • Sabotage: the structural guard caught a deleted tab button, a
    dropped section, a reverted width, max_height reintroduced, a shrunk
    window size, and a reintroduced Close button — six distinct regressions,
    all caught, then restored. The migration test caught migrate() ignoring
    the flag.
  • A slip of mine, caught before merge: the migration test's first TOML
    fixture omitted tune_step_hz (Prefs's one field with no serde
    default), so Config silently failed to parse and fell back to
    Config::default() — the test failed, but for the wrong reason. Fixed
    and re-verified it still catches the real bug.

Verified

cargo fmt --all -- --check, cargo clippy --workspace --all-targets --all-features, cargo clippy -p k4remote --features kpod --all-targets
all clean. cargo test --workspace — all green. cargo xtask — 0 R3 gaps.

Validation parked with DC0SK

  • Open Settings — does it now behave like a real window (its own
    taskbar/dock entry, moves independently of the main window), stay a
    fixed size across all seven tabs, and close cleanly via ESC and the
    window's own close control? — Confirmed 2026-09-22.
  • Does 900×720 fit comfortably on your screen? — Confirmed 2026-09-22.
  • Confirm the afterglow field now shows 500 (migrated) rather than 0,
    and that a live band shows the trail. — Confirmed 2026-09-22.

🤖 Generated with Claude Code

@dc0sk
dc0sk force-pushed the feat/settings-tabs-and-afterglow-default branch from af513b3 to 33dd9a5 Compare September 22, 2026 16:12
…80%, fix its size, and turn on afterglow by default (FR-UI-23, FR-PAN-14, FR-CFG-09)

The Settings dialog had grown into one long scrolling column as features
accumulated (KPA1500, spotting networks, afterglow, K-Pod macros, backup).
It is now a detached window, like KPA1500/Networks/Diagnostics, instead of
a modal overlay -- opened and closed via iced::window, with its own
WindowClosed handling and ESC support. It is tabbed by topic -- Connection,
Peers, Spotting, Audio, K-Pod, KPA1500, Backup -- 80% wider (500 -> 900 px),
and a fixed size (the window's own 900x720, not an inner container's), so
it no longer resizes as you switch tabs. It has no in-content Close button
any more: that button used to sit right after the tab content, so its
position moved with each tab's height, and a real window's own close makes
the button unnecessary.

Also: spectrum afterglow (FR-PAN-14) now defaults to 500 ms instead of off.
A new, disabled-by-default setting is easy to never discover. This needed a
real one-time migration, not just a new field default: an existing config
already has spectrum_afterglow_ms = 0 saved explicitly by an earlier build,
which #[serde(default = "...")] cannot touch (it only supplies a value for
a field the file never had, not one it has). Config gained
afterglow_default_migrated: bool -- false only for a file that predates it,
true by construction for a freshly built Config -- and Config::load runs a
migrate() step that promotes an unmigrated 0 to the new default exactly
once, leaving a 0 saved by a build that already knows the flag alone.

Tests: a structural guard (fr_ui_23_every_settings_section_is_reachable_
through_a_tab) checks the window opens through settings_window_settings(),
view/title/WindowClosed all route self.settings_window, opening resets to
Connection, every tab has a button that selects it, every section from the
old column is still shown by some tab, the widened+fixed window size is
present, and no in-content Close button exists -- sabotage-verified against
a deleted tab button, a dropped section, a shrunk window size, and a
reintroduced Close button. The migration is covered by
fr_cfg_09_afterglow_migrates_once_and_respects_a_later_choice (unmigrated
file, already-migrated file with a deliberate 0, fresh Config), sabotage-
verified against ignoring the migrated flag. The afterglow default is
pinned as a literal (AFTERGLOW_DEFAULT_MS == 500).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dc0sk
dc0sk force-pushed the feat/settings-tabs-and-afterglow-default branch from 33dd9a5 to 4c454fb Compare September 22, 2026 16:52
@dc0sk
dc0sk merged commit afe9cfe into main Sep 22, 2026
5 checks passed
@dc0sk
dc0sk deleted the feat/settings-tabs-and-afterglow-default branch September 22, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant