Shell 1: Spike — iced::daemon, hide / close / reopen, running without a window #793

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

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

Closes: — Depends on: — Time box: two days.

The client is an iced::application, which ends when its window closes; a Wayland window cannot be hidden (winit set_visible is empty), so close-to-tray needs a process that outlives its window. This is the plan's largest structural unknown.

Files:

  • Create: crates/fluxer-ui/examples/daemon_lifecycle.rs, crates/fluxer-ui/tests/daemon_lifecycle.rs
  • Modify: README (a "Window lifecycle" section with the findings)

Interfaces:

  • Produces (as findings and a working example, not product code): an iced::daemon with one window that (a) hides and shows with window::set_mode(Hidden | Windowed), (b) closes and reopens with window::close / window::open keeping the application state, (c) runs with no window while a Subscription still delivers messages, (d) opens with visible, size, position and maximized from saved values, (e) reports Moved / Resized / maximise changes, (f) hands its raw window handle out through window::run.

  • The README section answers, per X11 / Wayland (KDE) and from the winit source for Windows: which of (a)–(f) work; what a reopened window loses (scroll, focus, Local state the shell keeps in widgets); whether window::frames() and the video widget's redraw_subscription stop cleanly without a window; whether the wgpu device survives a reopen; how the headless screenshot harness (which does not go through run) is affected.

  • Step 0: build the example; run it by hand on this machine's Wayland session and under WAYLAND_DISPLAY= (X11); record the answers.

  • Step 1: tests that need no display (the daemon's update driven directly): close_request_with_hide_keeps_state, reopen_uses_saved_placement, no_window_still_updates.

  • Step 2: commit spike(ui): daemon window lifecycle; report success, or stop and report (fallback above).

Task 1 of the Desktop shell plan (`docs/superpowers/plans/2026-11-17-desktop-shell.md`, section "### Task 1:"). The plan on the `shell` branch is the source of truth; this copy is for reading. **Closes:** — **Depends on:** — **Time box:** two days. The client is an `iced::application`, which ends when its window closes; a Wayland window cannot be hidden (winit `set_visible` is empty), so close-to-tray needs a process that outlives its window. This is the plan's largest structural unknown. **Files:** - Create: `crates/fluxer-ui/examples/daemon_lifecycle.rs`, `crates/fluxer-ui/tests/daemon_lifecycle.rs` - Modify: README (a "Window lifecycle" section with the findings) **Interfaces:** - Produces (as findings and a working example, not product code): an `iced::daemon` with one window that (a) hides and shows with `window::set_mode(Hidden | Windowed)`, (b) closes and reopens with `window::close` / `window::open` keeping the application state, (c) runs with no window while a `Subscription` still delivers messages, (d) opens with `visible`, size, position and `maximized` from saved values, (e) reports `Moved` / `Resized` / maximise changes, (f) hands its raw window handle out through `window::run`. - The README section answers, per X11 / Wayland (KDE) and from the winit source for Windows: which of (a)–(f) work; what a reopened window loses (scroll, focus, `Local` state the shell keeps in widgets); whether `window::frames()` and the video widget's `redraw_subscription` stop cleanly without a window; whether the wgpu device survives a reopen; how the headless screenshot harness (which does not go through `run`) is affected. - [ ] **Step 0:** build the example; run it by hand on this machine's Wayland session and under `WAYLAND_DISPLAY=` (X11); record the answers. - [ ] **Step 1:** tests that need no display (the daemon's `update` driven directly): `close_request_with_hide_keeps_state`, `reopen_uses_saved_placement`, `no_window_still_updates`. - [ ] **Step 2:** commit `spike(ui): daemon window lifecycle`; report success, or stop and report (fallback above).
charles added this to the Desktop shell milestone 2026-11-17 23:02:30 +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#793
No description provided.