Shell 32: fluxer-ui daemon, window lifecycle, WindowHost #824

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

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

Closes: — Depends on: 1, 9. Touches fluxer-ui and CLAUDE.md (the new sanctioned boundary).

Files:

  • Create: crates/fluxer-ui/src/shell.rs (WindowHost, WindowRef) · Modify: crates/fluxer-ui/src/app.rs, lib.rs, CLAUDE.md, README · Test: crates/fluxer-ui/tests/window_lifecycle.rs

Interfaces:

  • Produces: run on iced::daemon (Task 1's findings; its fallback if the spike failed): Shell holds Option<window::Id>; opens the first window from shell::window::opens_at_start and restore; close requests → UserAction::Shell(Window(CloseRequested)) and the store's answer (WindowCommand::{Hide, Close, Show, Raise, Activate(token), Attention, StopAttention, Quit}) carried out — Hide is set_mode(Hidden) on Windows and X11, close on Wayland; Show is the reverse; Quit ends the daemon after the runtime's shutdown; Moved, Resized, maximise, focus and minimise events reported; no window::oldest() / latest() left.

  • fluxer_ui::shell::WindowHost trait { opened(WindowRef), closed() } with WindowRef wrapping the raw window and display handles; injected by apps/fluxer like Dialogs; called from window::run when a window opens and before it closes. run gains the parameter (the Services struct, not another positional argument).

  • Frame and animation subscriptions stop without a window.

  • Step 1: failing tests (the shell's update driven with synthetic events and a fake host): first_window_uses_restored_placement, start_hidden_opens_none, close_request_follows_store, hide_and_show_per_platform (the platform as a parameter), reopen_after_close_keeps_app_and_local, quit_command_exits, window_events_reported, host_told_on_open_and_close, no_frames_without_window; the existing headless and screenshot suites unchanged and green.

  • Step 2–5: FAIL → implement → PASS → commit feat(ui): daemon shell and window lifecycle.

Task 32 of the Desktop shell plan (`docs/superpowers/plans/2026-11-17-desktop-shell.md`, section "### Task 32:"). The plan on the `shell` branch is the source of truth; this copy is for reading. **Closes:** — **Depends on:** 1, 9. Touches `fluxer-ui` and `CLAUDE.md` (the new sanctioned boundary). **Files:** - Create: `crates/fluxer-ui/src/shell.rs` (`WindowHost`, `WindowRef`) · Modify: `crates/fluxer-ui/src/app.rs`, `lib.rs`, `CLAUDE.md`, README · Test: `crates/fluxer-ui/tests/window_lifecycle.rs` **Interfaces:** - Produces: `run` on `iced::daemon` (Task 1's findings; its fallback if the spike failed): `Shell` holds `Option<window::Id>`; opens the first window from `shell::window::opens_at_start` and `restore`; close requests → `UserAction::Shell(Window(CloseRequested))` and the store's answer (`WindowCommand::{Hide, Close, Show, Raise, Activate(token), Attention, StopAttention, Quit}`) carried out — `Hide` is `set_mode(Hidden)` on Windows and X11, `close` on Wayland; `Show` is the reverse; `Quit` ends the daemon after the runtime's shutdown; `Moved`, `Resized`, maximise, focus and minimise events reported; no `window::oldest()` / `latest()` left. - `fluxer_ui::shell::WindowHost` trait `{ opened(WindowRef), closed() }` with `WindowRef` wrapping the raw window and display handles; injected by `apps/fluxer` like `Dialogs`; called from `window::run` when a window opens and before it closes. `run` gains the parameter (the `Services` struct, not another positional argument). - Frame and animation subscriptions stop without a window. - [ ] **Step 1: failing tests** (the shell's `update` driven with synthetic events and a fake host): `first_window_uses_restored_placement`, `start_hidden_opens_none`, `close_request_follows_store`, `hide_and_show_per_platform` (the platform as a parameter), `reopen_after_close_keeps_app_and_local`, `quit_command_exits`, `window_events_reported`, `host_told_on_open_and_close`, `no_frames_without_window`; the existing headless and screenshot suites unchanged and green. - [ ] **Step 2–5:** FAIL → implement → PASS → commit `feat(ui): daemon shell and window lifecycle`.
charles added this to the Desktop shell milestone 2026-11-17 23:03:03 +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#824
No description provided.