Shell 38: ui-settings-desktop (#830) #895

Closed
charles wants to merge 0 commits from shell-38-ui-settings-desktop into shell
Owner

What was built

Settings → Desktop's "Desktop window" section (crates/fluxer-ui/src/screens/settings/desktop.rs), drawn from fluxer_core::shell::autostart::desktop_model (Task 16) as the original's DesktopSettingsTab.tsx lays it out:

  • the rows in the original's order: "Launch Flaxative at login", "Start minimized", "Remember window size and position", "Show system tray icon", "Use colored tray icon", "Use dark taskbar badge" (Windows only), "Minimize to tray", "Close to tray";
  • each a form Switch (FormSwitch.module.css: 44 px minimum row, medium label, --text-primary-muted description); a disabled row's switch is inert at half opacity (palette::toggler::form) and its note goes under the description ("Your desktop has no system tray. On GNOME, install the AppIndicator extension.", "Turned off in Windows settings.", "Only available for an installed build.");
  • settings::Panel::Desktop comes first on the Desktop tab, above the existing Companion apps section; the Updates rows stay in Advanced. The tab's "Other settings" placeholder (owner 6) stays for the parity entries Task 43 re-owns (hardware acceleration, native title bar, source maps);
  • settings::Message::Desktop(desktop::Message::Toggled(key, on)) → UserAction::Shell(ShellAction::SetSetting(…)) through DesktopRow::toggle; nothing for a disabled row or for a row this OS does not show.

Strings copied: all of them come from the core model (Task 16), which copied them from DesktopSettingsTab.tsx and spec §6/§7.3; this task adds none.

How it was tested

  • crates/fluxer-ui/tests/settings_desktop.rs: rows_and_states_per_model, start_minimized_disabled_without_autostart_or_tray, toggle_emits_setting_change (written first, seen failing, then passing).
  • Goldens settings_desktop, settings_desktop_no_tray, settings_desktop_windows, drawn on lavapipe in the fluxer-native-shots:u2204 image with UPDATE_GOLDEN=1; the Windows golden draws the Windows model next to the navigation, since the suite does not run on Windows (#93). Rows added to docs/screenshots/README.md.
  • FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci green locally.
  • No test needs a real display; none of FLUXER_DESKTOP_TESTS were run (none apply).

Joined with Task 40 (companion apps control, PR #892)

Task 40 landed in shell while this branch was in review; both changed the Desktop tab. Per the orchestrator's decision:

  • The page keeps the original's order (DesktopSettingsTab.tsx): "Desktop window" first, Companion apps under it. Not reordered.
  • Task 40's screenshot tests settings_companion_control and settings_companion_port_in_use were rendered with Companion apps at the top; on the joined page the 720 px frame cut off the switch, the port warning and the URL row (they failed by ~10 % on lavapipe). They now wheel the page to its end (render_scrolled(&app, COMPANION_APPS_SCROLL), what a user does), and only those two goldens were redrawn on lavapipe in fluxer-native-shots:u2204 with UPDATE_GOLDEN=1. Both show the whole Companion apps section; their rows in docs/screenshots/README.md say so.
  • This task's goldens (settings_desktop, settings_desktop_no_tray, settings_desktop_windows) pass unchanged; no other golden changed.
  • New headless test companion_apps_under_desktop_window_reached_by_scrolling (crates/fluxer-ui/tests/settings_companion.rs): on the whole settings screen at 1280x720, the Desktop panel comes before Companion apps. It also checks that the control switch and the URL row start off-screen, and that after a wheel scroll the heading, "Enable local status API", the port warning, the control switch and "Connection URL" are fully in view. When the panels were swapped as a check, the test failed.
  • Merge resolutions kept: Message::Desktop(desktop::Message) and Message::StatusApiControlToggled(bool), both screenshot helpers (desktop_settings, settings_companion), all five rows in docs/screenshots/README.md, both README bullets.

Deviations from the plan

  • crates/fluxer-ui/tests/settings_nav.rs (outside the Files list): companion_apps_toggle_and_connection_url expected Companion apps first on the Desktop tab; it now expects it second, under "Desktop window".
  • No Electron side-by-side screenshot attached (no Electron session available to the agent).
  • Windows: nothing platform-specific was added (DesktopOs::current() is the core's); Charles can check the "Use dark taskbar badge" row on Windows by hand.

Stacked on: origin/shell-8-core-tray-model-and, origin/shell-9-core-window-rules-close, origin/shell-16-core-autostart (all already merged into shell at the base)

Closes #830

🤖 Generated with Claude Code

https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K

## What was built Settings → Desktop's "Desktop window" section (`crates/fluxer-ui/src/screens/settings/desktop.rs`), drawn from `fluxer_core::shell::autostart::desktop_model` (Task 16) as the original's `DesktopSettingsTab.tsx` lays it out: - the rows in the original's order: "Launch Flaxative at login", "Start minimized", "Remember window size and position", "Show system tray icon", "Use colored tray icon", "Use dark taskbar badge" (Windows only), "Minimize to tray", "Close to tray"; - each a form `Switch` (`FormSwitch.module.css`: 44 px minimum row, medium label, `--text-primary-muted` description); a disabled row's switch is inert at half opacity (`palette::toggler::form`) and its note goes under the description ("Your desktop has no system tray. On GNOME, install the AppIndicator extension.", "Turned off in Windows settings.", "Only available for an installed build."); - `settings::Panel::Desktop` comes first on the Desktop tab, above the existing Companion apps section; the Updates rows stay in Advanced. The tab's "Other settings" placeholder (owner 6) stays for the parity entries Task 43 re-owns (hardware acceleration, native title bar, source maps); - `settings::Message::Desktop(desktop::Message::Toggled(key, on))` → `UserAction::Shell(ShellAction::SetSetting(…))` through `DesktopRow::toggle`; nothing for a disabled row or for a row this OS does not show. Strings copied: all of them come from the core model (Task 16), which copied them from `DesktopSettingsTab.tsx` and spec §6/§7.3; this task adds none. ## How it was tested - `crates/fluxer-ui/tests/settings_desktop.rs`: `rows_and_states_per_model`, `start_minimized_disabled_without_autostart_or_tray`, `toggle_emits_setting_change` (written first, seen failing, then passing). - Goldens `settings_desktop`, `settings_desktop_no_tray`, `settings_desktop_windows`, drawn on lavapipe in the `fluxer-native-shots:u2204` image with `UPDATE_GOLDEN=1`; the Windows golden draws the Windows model next to the navigation, since the suite does not run on Windows (#93). Rows added to `docs/screenshots/README.md`. - `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` green locally. - No test needs a real display; none of `FLUXER_DESKTOP_TESTS` were run (none apply). ## Joined with Task 40 (companion apps control, PR #892) Task 40 landed in `shell` while this branch was in review; both changed the Desktop tab. Per the orchestrator's decision: - The page keeps the original's order (`DesktopSettingsTab.tsx`): "Desktop window" first, Companion apps under it. Not reordered. - Task 40's screenshot tests `settings_companion_control` and `settings_companion_port_in_use` were rendered with Companion apps at the top; on the joined page the 720 px frame cut off the switch, the port warning and the URL row (they failed by ~10 % on lavapipe). They now wheel the page to its end (`render_scrolled(&app, COMPANION_APPS_SCROLL)`, what a user does), and only those two goldens were redrawn on lavapipe in `fluxer-native-shots:u2204` with `UPDATE_GOLDEN=1`. Both show the whole Companion apps section; their rows in `docs/screenshots/README.md` say so. - This task's goldens (`settings_desktop`, `settings_desktop_no_tray`, `settings_desktop_windows`) pass unchanged; no other golden changed. - New headless test `companion_apps_under_desktop_window_reached_by_scrolling` (`crates/fluxer-ui/tests/settings_companion.rs`): on the whole settings screen at 1280x720, the Desktop panel comes before Companion apps. It also checks that the control switch and the URL row start off-screen, and that after a wheel scroll the heading, "Enable local status API", the port warning, the control switch and "Connection URL" are fully in view. When the panels were swapped as a check, the test failed. - Merge resolutions kept: `Message::Desktop(desktop::Message)` and `Message::StatusApiControlToggled(bool)`, both screenshot helpers (`desktop_settings`, `settings_companion`), all five rows in `docs/screenshots/README.md`, both README bullets. ## Deviations from the plan - `crates/fluxer-ui/tests/settings_nav.rs` (outside the Files list): `companion_apps_toggle_and_connection_url` expected Companion apps first on the Desktop tab; it now expects it second, under "Desktop window". - No Electron side-by-side screenshot attached (no Electron session available to the agent). - Windows: nothing platform-specific was added (`DesktopOs::current()` is the core's); Charles can check the "Use dark taskbar badge" row on Windows by hand. Stacked on: origin/shell-8-core-tray-model-and, origin/shell-9-core-window-rules-close, origin/shell-16-core-autostart (all already merged into shell at the base) Closes #830 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Settings → Desktop's "Desktop window" section from
fluxer_core:🐚:autostart::desktop_model (DesktopSettingsTab.tsx): the
rows in the original's order as form switches, a disabled row's switch at
half opacity with its note under the description, above Companion apps.
Goldens settings_desktop, settings_desktop_no_tray, settings_desktop_windows
drawn on lavapipe (fluxer-native-shots:u2204).

Refs #830

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Author
Owner

Independent review: Shell 38 (Settings → Desktop)

Reviewed baf0a929..aed2d396 cold.

Checks

  1. Tests: rows_and_states_per_model, start_minimized_disabled_without_autostart_or_tray, toggle_emits_setting_change exist and assert the plan's behaviour with the spec's exact strings ("Your desktop has no system tray. On GNOME, install the AppIndicator extension.", "Turned off in Windows settings.", "Only available for an installed build."). Goldens settings_desktop, settings_desktop_no_tray, settings_desktop_windows are present and pass.
  2. Interfaces: the page is built from autostart::desktop_model unchanged (asserted equal). It sits above Companion apps, and Updates stays in Advanced. Message::Desktop routes to UserAction::Shell(SetSetting) via DesktopRow::toggle. Disabled or absent rows send nothing (update re-checks against the current model).
  3. Invariants: the change only touches fluxer-ui, adds no I/O path, no tracing and no secrets. "token" is the usual placeholder in LocalSettings::new for tests. The mod.rs and screenshots.rs registration edits are append-only.
  4. Parity, checked against DesktopSettingsTab.tsx:170-261 and FormSwitch.module.css:
    • Row order matches the original: launch, start minimized, remember, tray icon, colored, dark badge (Windows only), minimize, close.
    • Start minimized is disabled unless autostart and the tray icon are both on, and the tray rows are disabled when the icon is off. Both match the original.
    • Dimensions match: 44 px min height, 4 px padding, 16 px gap, 4 px label gap, 14/20 text, medium label, text-primary-muted description.
  5. Review Focus 6: every disabled row is a typed state with its note drawn under the description. None is a silent no-op.
  6. FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci in the review worktree: all steps passed, including the three goldens and the three unit tests.

Findings

  • minor: settings_desktop_windows draws the section beside the nav without the page header ("Windows app" title bar). It is a section golden, not a full-page one. Acceptable, but say so in the docs/screenshots row.
  • minor: .description { padding-inline-end: 1rem } is not reproduced. A long description can run 16 px closer to the switch than in the original.
  • minor (deviation, justified): tests/settings_nav.rs is outside the Files list. Its edit (Companion apps is now panels.get(1)) is a direct, correct consequence of this task.

Verdict: approved. No blocking findings, and the local gate is green.

## Independent review: Shell 38 (Settings → Desktop) Reviewed `baf0a929..aed2d396` cold. **Checks** 1. Tests: `rows_and_states_per_model`, `start_minimized_disabled_without_autostart_or_tray`, `toggle_emits_setting_change` exist and assert the plan's behaviour with the spec's exact strings ("Your desktop has no system tray. On GNOME, install the AppIndicator extension.", "Turned off in Windows settings.", "Only available for an installed build."). Goldens `settings_desktop`, `settings_desktop_no_tray`, `settings_desktop_windows` are present and pass. 2. Interfaces: the page is built from `autostart::desktop_model` unchanged (asserted equal). It sits above Companion apps, and Updates stays in Advanced. `Message::Desktop` routes to `UserAction::Shell(SetSetting)` via `DesktopRow::toggle`. Disabled or absent rows send nothing (`update` re-checks against the current model). 3. Invariants: the change only touches fluxer-ui, adds no I/O path, no `tracing` and no secrets. `"token"` is the usual placeholder in `LocalSettings::new` for tests. The `mod.rs` and `screenshots.rs` registration edits are append-only. 4. Parity, checked against `DesktopSettingsTab.tsx:170-261` and `FormSwitch.module.css`: - Row order matches the original: launch, start minimized, remember, tray icon, colored, dark badge (Windows only), minimize, close. - Start minimized is disabled unless autostart and the tray icon are both on, and the tray rows are disabled when the icon is off. Both match the original. - Dimensions match: 44 px min height, 4 px padding, 16 px gap, 4 px label gap, 14/20 text, medium label, `text-primary-muted` description. 5. Review Focus 6: every disabled row is a typed state with its note drawn under the description. None is a silent no-op. 6. `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` in the review worktree: **all steps passed**, including the three goldens and the three unit tests. **Findings** - minor: `settings_desktop_windows` draws the section beside the nav without the page header ("Windows app" title bar). It is a section golden, not a full-page one. Acceptable, but say so in the docs/screenshots row. - minor: `.description { padding-inline-end: 1rem }` is not reproduced. A long description can run 16 px closer to the switch than in the original. - minor (deviation, justified): `tests/settings_nav.rs` is outside the Files list. Its edit (Companion apps is now `panels.get(1)`) is a direct, correct consequence of this task. **Verdict: approved.** No blocking findings, and the local gate is green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings → Desktop keeps the original's order (DesktopSettingsTab.tsx):
"Desktop window" first, Companion apps under it, below the 720 px fold.
Task 40's two screenshot tests now wheel the page to its end
(render_scrolled, COMPANION_APPS_SCROLL) so the control switch, the port
warning and the URL row are in view; their goldens were redrawn on
lavapipe (fluxer-native-shots:u2204). A headless test checks the two
sections' order on the whole page and that Companion apps is cut off at
720 px and reached whole by a wheel scroll.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Joined with Task 40 per the orchestrator's decision: Settings → Desktop keeps the original's order ("Desktop window" first, Companion apps under it). Task 40's two screenshot tests (settings_companion_control, settings_companion_port_in_use) now wheel the page to its end so Companion apps is fully in view, with the control switch, the port warning and the URL row. Only those two goldens were redrawn, on lavapipe (fluxer-native-shots:u2204, UPDATE_GOLDEN=1). Before the redraw they failed on lavapipe by about 10 %, and Task 38's three goldens passed unchanged. The new headless test companion_apps_under_desktop_window_reached_by_scrolling (settings_companion.rs) checks the section order on the whole page, that Companion apps is cut off at 720 px, and that a wheel scroll brings it fully into view. The full gate (FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci) passed on fe63ee6c: all steps, screenshots 251/251. The merge resolutions of 8f47b673 were kept as they were.

Joined with Task 40 per the orchestrator's decision: Settings → Desktop keeps the original's order ("Desktop window" first, Companion apps under it). Task 40's two screenshot tests (`settings_companion_control`, `settings_companion_port_in_use`) now wheel the page to its end so Companion apps is fully in view, with the control switch, the port warning and the URL row. Only those two goldens were redrawn, on lavapipe (`fluxer-native-shots:u2204`, `UPDATE_GOLDEN=1`). Before the redraw they failed on lavapipe by about 10 %, and Task 38's three goldens passed unchanged. The new headless test `companion_apps_under_desktop_window_reached_by_scrolling` (settings_companion.rs) checks the section order on the whole page, that Companion apps is cut off at 720 px, and that a wheel scroll brings it fully into view. The full gate (`FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci`) passed on fe63ee6c: all steps, screenshots 251/251. The merge resolutions of 8f47b673 were kept as they were.
Author
Owner

Merged into shell by hand (the merge API returns 405); the commits are in the branch.

Merged into `shell` by hand (the merge API returns 405); the commits are in the branch.
charles closed this pull request 2026-11-18 16:54:52 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.