feat(ui): tab the Settings dialog by topic, widen it 80%, and turn on afterglow by default - #203
Merged
Merged
Conversation
dc0sk
force-pushed
the
feat/settings-tabs-and-afterglow-default
branch
from
September 22, 2026 16:12
af513b3 to
33dd9a5
Compare
…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
force-pushed
the
feat/settings-tabs-and-afterglow-default
branch
from
September 22, 2026 16:52
33dd9a5 to
4c454fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two changes DC0SK asked for together, then three refinements from on-screen feedback.
Spectrum afterglow (
FR-PAN-14) now defaults to 500 ms, instead ofoff. It shipped off-by-default and was easy to never notice; a gentle
trail now shows out of the box, and
0in Settings still turns it offfor 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).
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).
Fixed (screen feedback): the dialog no longer resizes per tab. A
first cut used
max_height, which sizes the container to whichevertab's content is tallest/shortest — caught on screen.
Fixed (screen feedback): the new default wasn't applied to an existing
config. The config already had
spectrum_afterglow_ms = 0savedexplicitly by an earlier build —
#[serde(default = "...")]onlysupplies a value for a field the file never had, not one it has. This
needed an actual one-time migration (
FR-CFG-09):Configgainedafterglow_default_migrated: bool(falseonly for a file thatpredates the flag), and
Config::loadpromotes an unmigrated0tothe new default exactly once — a
0set after upgrading isrespected, never overridden again.
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 ownWindowClosedhandlingand 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)
and "an increase of 180%" (1400 px). I went with 900 px.
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/WindowClosedall routeself.settings_window; opening resets to Connection; every tab has abutton; 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-contentClose button exists.
fr_pan_14_afterglow_setting_persists_and_is_bounded(k4-config)extended for the new default;
AFTERGLOW_DEFAULT_MSpinned as a literal.fr_cfg_09_afterglow_migrates_once_and_respects_a_later_choice(
k4-config, new): unmigrated file, already-migrated file with adeliberate
0, freshConfig.dropped section, a reverted width,
max_heightreintroduced, a shrunkwindow size, and a reintroduced Close button — six distinct regressions,
all caught, then restored. The migration test caught
migrate()ignoringthe flag.
fixture omitted
tune_step_hz(Prefs's one field with no serdedefault), so
Configsilently failed to parse and fell back toConfig::default()— the test failed, but for the wrong reason. Fixedand 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
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.
and that a live band shows the trail. — Confirmed 2026-09-22.
🤖 Generated with Claude Code