Shell 33: apps/fluxer shell runtime #825

Closed
opened 2026-11-17 23:03:03 +00:00 by charles · 0 comments
Owner

Task 33 of the Desktop shell plan (docs/superpowers/plans/2026-11-17-desktop-shell.md, section "### Task 33:"). The plan on the shell branch is the source of truth; this copy is for reading.

Closes: — (#754: instance items) Depends on: 7, 8, 10, 13, 16, 17, 18, 19, 21, 22, 23, 24, 32

Files:

  • Create: apps/fluxer/src/shell_rt.rs · Modify: apps/fluxer/src/{main.rs,runtime.rs,config.rs,lib.rs,update_rt.rs,desktop_rt.rs}, README · Test: apps/fluxer/tests/shell_runtime.rs

Interfaces:

  • Produces: new options --autostart, --url <URL> (and a bare link argument), --task <name>, --reset-window-state, --no-tray, --relaunched-from <pid> (hidden). main: after Velopack's hook and the argument parse, before logging and settings: single_instance::acquire (scope = the data directory; skipped for --debug-info, --help); a secondary sends its message (Activate with XDG_ACTIVATION_TOKEN, OpenUrl, Task) and exits 0; Busy / no answer → wait_and_acquire(10 s); --relaunched-from waits for the pid first.

  • ShellRuntime (traits injected, fakes in tests): executes ShellCommands — tray set / remove (events back as ShellEvent), SetAutostart, SetBadge (through the WindowHost's current WindowRef), InstallDesktopEntry at start, Restart (the updater's relaunch path without --autostart), Quit; feeds the instance listener's messages, displays() at start, sound_allowed() (polled when a sound is about to play, cached 1 s), autostart state at start and after each change; answers busy once shutdown began; releases the instance and update locks before any relaunch.

  • Tray "Copy build info" uses the existing debug_info and clipboard; "Update now" / "Check for updates" the existing UpdateCommands.

  • Step 1: failing tests (devserver, fakes): second_start_activates_and_exits, link_argument_reaches_running_client, busy_during_shutdown_then_takeover, relaunch_releases_locks_first, tray_follows_voice_and_unread, tray_actions_run, close_to_tray_keeps_voice, no_tray_close_quits, autostart_reconciled_at_start, badge_set_and_cleared, start_minimised_only_with_autostart, reset_window_state_option.

  • Step 2–5: FAIL → implement → PASS → commit feat(app): shell runtime.

Task 33 of the Desktop shell plan (`docs/superpowers/plans/2026-11-17-desktop-shell.md`, section "### Task 33:"). The plan on the `shell` branch is the source of truth; this copy is for reading. **Closes:** — (#754: instance items) **Depends on:** 7, 8, 10, 13, 16, 17, 18, 19, 21, 22, 23, 24, 32 **Files:** - Create: `apps/fluxer/src/shell_rt.rs` · Modify: `apps/fluxer/src/{main.rs,runtime.rs,config.rs,lib.rs,update_rt.rs,desktop_rt.rs}`, README · Test: `apps/fluxer/tests/shell_runtime.rs` **Interfaces:** - Produces: new options `--autostart`, `--url <URL>` (and a bare link argument), `--task <name>`, `--reset-window-state`, `--no-tray`, `--relaunched-from <pid>` (hidden). `main`: after Velopack's hook and the argument parse, **before** logging and settings: `single_instance::acquire` (scope = the data directory; skipped for `--debug-info`, `--help`); a secondary sends its message (`Activate` with `XDG_ACTIVATION_TOKEN`, `OpenUrl`, `Task`) and exits 0; `Busy` / no answer → `wait_and_acquire(10 s)`; `--relaunched-from` waits for the pid first. - `ShellRuntime` (traits injected, fakes in tests): executes `ShellCommand`s — tray set / remove (events back as `ShellEvent`), `SetAutostart`, `SetBadge` (through the `WindowHost`'s current `WindowRef`), `InstallDesktopEntry` at start, `Restart` (the updater's relaunch path without `--autostart`), `Quit`; feeds the instance listener's messages, `displays()` at start, `sound_allowed()` (polled when a sound is about to play, cached 1 s), autostart state at start and after each change; answers `busy` once shutdown began; releases the instance and update locks before any relaunch. - Tray "Copy build info" uses the existing `debug_info` and clipboard; "Update now" / "Check for updates" the existing `UpdateCommand`s. - [ ] **Step 1: failing tests** (devserver, fakes): `second_start_activates_and_exits`, `link_argument_reaches_running_client`, `busy_during_shutdown_then_takeover`, `relaunch_releases_locks_first`, `tray_follows_voice_and_unread`, `tray_actions_run`, `close_to_tray_keeps_voice`, `no_tray_close_quits`, `autostart_reconciled_at_start`, `badge_set_and_cleared`, `start_minimised_only_with_autostart`, `reset_window_state_option`. - [ ] **Step 2–5:** FAIL → implement → PASS → commit `feat(app): shell runtime`.
charles added this to the Desktop shell milestone 2026-11-17 23:03:03 +00:00
charles referenced this issue from a commit 2026-11-18 19:47:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#825
No description provided.