Shell 1: Spike — iced::daemon, hide / close / reopen, running without a window (#793) #841
Closed
charles
wants to merge 0 commits from
shell-1-spike-iced-daemon-hide into shell
pull from: shell-1-spike-iced-daemon-hide
merge into: charles:shell
charles:main
charles:camera
charles:dailyuse
charles:textchat
charles:fix-1008-idle-in-voice
charles:camera-21-acceptance
charles:feat-1000-app-sounds-output
charles:fix-1001-local-time
charles:camera-20-parity-list-for-the
charles:fix-931-silent-voices
charles:camera-15-ui-settings-voice-video
charles:camera-14-ui-camera-buttons-camera
charles:camera-16-ui-layout-with-cameras
charles:camera-17-core-toggle-camera-shortcut
charles:camera-13-ui-mirrored-video-and
charles:camera-12-appsfluxer-camera-runtime-and
charles:camera-10-capture-camera-on-linux
charles:camera-11-capture-camera-on-windows
charles:camera-9-voice-the-camera-track
charles:camera-7-core-the-own-camera
charles:camera-6-capture-camera-trait-mode
charles:camera-8-core-remote-cameras-tile
charles:camera-3-spike-a-camera-track
charles:camera-4-video-camera-formats-and
charles:camera-18-devserver-camera-scenario
charles:camera-1-spike-capture-linux
charles:camera-5-core-camera-ports-commands
charles:camera-2-spike-capture-windows
charles:camera-plan
charles:shell
charles:fix-925-keybinds-persist
charles:feat-934-935-stream-view
charles:feat-933-stream-output-device
charles:shell-44-acceptance
charles:feat-946-select-message-text
charles:shell-43-parity-list-for-the
charles:fix-589-black-band-linux-sender
charles:shell-37-ui-system-wide-shortcuts
charles:shell-ship
charles:fix-931-voices-silent-after-long-uptime
charles:shell-39-ui-settings-notifications
charles:shell-36-ui-settings-keybinds
charles:shell-16-core-autostart
charles:fix-923-late-publication-next-share
charles:fix-921-share-teardown-publish-race
charles:shell-10-core-instance-messages-tasks
charles:shell-11-core-keybinds-actions-combos
charles:shell-13-core-badge-attention-sound
charles:shell-14-core-notification-settings-inactive
charles:shell-18-platform-desktop-entry-and
charles:shell-2-spike-tray-on-linux
charles:shell-3-spike-wayland-global-shortcuts
charles:shell-41-devserver-shell-scenario
charles:shell-5-spike-overlay-technique-for
charles:shell-6-core-shell-ports-settings
charles:shell-7-platform-settings-shell-keybinds
charles:shell-8-core-tray-model-and
charles:shell-9-core-window-rules-close
charles:fix-913-keep-awake-retry
charles:shell-35-ui-in-window-voice
charles:shell-sync-textchat
charles:shell-34-app-shortcuts-runtime
charles:fix-913-keep-screen-awake
charles:fix-910-deepfilter-windows-timing
charles:shell-33-app-shell-runtime
charles:shell-28-platform-shortcuts-on-wayland
charles:fix-910-deepfilter-late-frame
charles:shell-29-platform-shortcuts-by-direct
charles:shell-27-platform-shortcuts-on-x11
charles:shell-17-platform-single-instance
charles:shell-24-platform-badge-displays-and-24
charles:shell-26-platform-shortcuts-on-windows
charles:shell-21-platform-tray-on-linux
charles:shell-22-platform-tray-on-windows
charles:fix-908-flaky-stream-end-test
charles:shell-30-platform-wayland-activation
charles:shell-38-ui-settings-desktop
charles:shell-19-platform-autostart
charles:shell-25-platform-shortcut-back-end
charles:shell-23-platform-badge-displays-and
charles:shell-40-ui-companion-apps-control
charles:shell-31-statusapi-default-avatars
charles:shell-12-core-system-wide-shortcut
charles:shell-20-platform-tray-trait-icons
charles:shell-32-ui-daemon-window-lifecycle
charles:shell-4-spike-raising-a-wayland
charles:shell-15-core-status-payload-gaps
charles:fix-876-share-resolution-and-bars
charles:shell-42-packaging-windows-shortcuts-and
charles:fix-874-tests-must-not-notify
charles:fix-868-deepfilternet-start
charles:gamenight-plan
charles:fix-867-869-stream-end-soundboard-limits
charles:feat-229-windows-hardware-encoding
charles:fix-857-vaapi-hardware-encoding
charles:fix-849-inert-cards
charles:fix-848-pinned-messages-clickable
charles:shell-plan
charles:fix-764-nvenc-above-720p30
charles:serveradmin
charles:feat-780-forum-archived-filter
charles:serveradmin-35-acceptance
charles:feat-781-no-join-chime-with-entrance-sound
charles:feat-784-rejoin-voice-after-update
charles:fix-779-782-search-dropdown-paste-preview
charles:fix-783-781-dm-rail-entrance-sound
charles:serveradmin-34-parity-screenshots
charles:serveradmin-31-ui-channel-permissions
charles:fix-773-cargo-deny-advisories
charles:serveradmin-33-ui-sudo-delete-transfer
charles:serveradmin-28-ui-members-page
charles:serveradmin-26-ui-role-permissions
charles:serveradmin-30-ui-voice-overview-channel-invites
charles:serveradmin-fix-27-29
charles:serveradmin-25-ui-roles-tab
charles:serveradmin-27-ui-menus-moderation-modals
charles:serveradmin-29-ui-channel-settings
charles:fix-589-stream-top-strip-encode
charles:serveradmin-24-ui-moderation-invites-bans
charles:feat-760-version-in-title
charles:fix-751-stream-audio-pipewire
charles:serveradmin-20-core-menu-rows
charles:fix-752-linux-notification-panic
charles:serveradmin-17-core-overrides
charles:fix-740-updater-always-latest
charles:serveradmin-23-ui-community-settings-overview
charles:serveradmin-12-core-roles
charles:serveradmin-19-core-sudo-delete-transfer
charles:serveradmin-32-ui-sidebar-drag
charles:serveradmin-15-core-members-page
charles:serveradmin-16-core-channel-settings
charles:serveradmin-14-core-bans-invites
charles:fix-615-restore-on-stored-session-start
charles:serveradmin-22-runtime
charles:serveradmin-13-core-member-moderation
charles:serveradmin-18-core-channel-reorder
charles:fix-732-status-api-speaking
charles:serveradmin-10-core-permission-lists
charles:serveradmin-11-core-forms-community
charles:serveradmin-21b-devserver-channels-members-sudo
charles:serveradmin-4-api-community-roles-sudo
charles:serveradmin-9b-core-hierarchy-bulk-events
charles:serveradmin-21a-devserver-community-roles
charles:serveradmin-9a-core-ports
charles:serveradmin-8-form-widgets
charles:serveradmin-5-api-channels-members-bans
charles:serveradmin-7-settings-shell
charles:serveradmin-1-proto-community-roles
charles:serveradmin-3-proto-members-bans-invites
charles:serveradmin-6-reorder-widget
charles:serveradmin-2-proto-channel-admin
charles:fix-706-presence-after-reconnect
charles:fix-615-start-on-last-view
charles:feat-663-create-channel
charles:serveradmin-plan
charles:fix-662-long-text-wrap
charles:fix-660-661-menu-toolbar-paste-focus
charles:fix-620-forum-list-reactions
charles:fix-657-windows-console
charles:fix-622-emoji-in-names
charles:fix-smoke-645-648
charles:fix-614-install-location
charles:dailyuse-41-acceptance
charles:fix/597-copy-id
charles:dailyuse-40-parity-screenshots
charles:dailyuse-35-ui-quick-switcher-keybinds
charles:dailyuse-38-ui-profile-modal
charles:fix/voice-view
charles:fix/side-panel-composer
charles:dailyuse-37b-ui-composer-barriers-blocked
charles:fix/image-viewer
charles:fix/619-picker-flicker
charles:fix/editor-forum-edit
charles:dailyuse-32-ui-status-picker
charles:dailyuse-34b-ui-add-guild-invite-modal
charles:dailyuse-28-app-dailyuse-runtime
charles:dailyuse-36-ui-voice-badge-refusals
charles:fix/594-menu-placement-textchat
charles:fix/589-stream-top-strip
charles:fix/594-menu-placement
charles:dailyuse-39-ui-report-modal
charles:dailyuse-37a-ui-attachment-audio-group-icon
charles:dailyuse-24-core-notification-icon-passive
charles:fix/587-quiet-voice
charles:dailyuse-30-ui-notification-settings-modal
charles:dailyuse-31-ui-user-dm-menus
charles:dailyuse-22b-core-composer-barriers-blocked
charles:dailyuse-22a-core-mark-unread-attachments
charles:dailyuse-29-ui-channel-guild-menus
charles:dailyuse-18-core-user-dm-menus
charles:dailyuse-33-ui-confirm-friends-page
charles:dailyuse-22c-core-trusted-domains-hide-muted
charles:dailyuse-20-core-keyboard-navigation
charles:dailyuse-15-core-friends-blocking
charles:dailyuse-23-core-profile-report-flow
charles:dailyuse-19-core-quick-switcher
charles:dailyuse-14-core-status-idle-presence
charles:dailyuse-17-core-channel-guild-menus
charles:ci/27-linux-cache
charles:dailyuse-37c-ui-trust-links-hide-muted
charles:dailyuse-13-core-honour-mutes
charles:dailyuse-34a-ui-invite-cards-accept
charles:dailyuse-16b-core-create-invites-guilds
charles:dailyuse-12-core-notification-settings-mutes
charles:dailyuse-16a-core-invite-links
charles:dailyuse-25-audio-attachments
charles:dailyuse-21-core-voice-refusals
charles:dailyuse-11b-core-state-skeleton
charles:dailyuse-11a-core-dailyuse-ports
charles:dailyuse-26b-devserver-dailyuse-b
charles:dailyuse-26a-devserver-dailyuse-a
charles:dailyuse-4-api-settings-acks-reports
charles:dailyuse-5-api-relationships-invites-guilds
charles:dailyuse-27-platform-notification-idle
charles:dailyuse-10-highlight-languages
charles:fix-search-focus-hover-emoji
charles:dailyuse-8-context-menu-widget
charles:dailyuse-9-image-load-retry
charles:dailyuse-7-chat-navigation-persistence
charles:dailyuse-2-proto-relationships-invites-reports
charles:dailyuse-1-proto-notification-presence
charles:dailyuse-6-gateway-op12-presence
charles:textchat-next
charles:fix-stream-black
charles:fix-reactions-hover
charles:textchat-68-app-video-playback-runtime
charles:textchat-35-acceptance
charles:textchat-34-parity-screenshots
charles:textchat-74-app-updater-runtime
charles:textchat-67-ui-video-player
charles:textchat-stage-46-47
charles:textchat-47-ui-media-channel
charles:textchat-75-promote-stable-workflow
charles:textchat-46-ui-forum-composer
charles:textchat-73-ui-update-button
charles:textchat-64-media-playback-crate
charles:textchat-stage-43-48
charles:textchat-72-platform-updater
charles:textchat-44-ui-thread-view
charles:textchat-70-release-update-feed
charles:textchat-48-ui-announcements
charles:textchat-45-ui-forum-view
charles:textchat-71-core-updater
charles:textchat-43-ui-sidebar-links-notes
charles:textchat-stage-40
charles:textchat-42-app-channel-types-runtime
charles:textchat-39-core-forums
charles:textchat-40-core-announcements-thread-admin
charles:textchat-60-ui-entrance-sounds
charles:textchat-63-ffmpeg-lgpl-packaging
charles:textchat-stage-batch6
charles:textchat-69-proto-update-manifest
charles:textchat-61-app-soundboard-entrance-runtime
charles:textchat-52-app-audio-devices-runtime
charles:textchat-38-core-channel-routing
charles:soundboard-effect-emoji
charles:status-api-rebind
charles:textchat-28-ui-gif-picker
charles:textchat-41-devserver-channel-types
charles:voice-panel-soundboard
charles:textchat-29-ui-message-actions
charles:textchat-37-api-channel-types
charles:textchat-66-core-video-players
charles:autoupdate-plan
charles:textchat-33-ui-message-list-settings
charles:textchat-32-ui-dms
charles:textchat-62-rename-flaxative
charles:fix-chatcolumn-tree
charles:textchat-65-audio-media-source
charles:textchat-31-ui-threads
charles:textchat-stage-27
charles:textchat-30-ui-search-pins-inbox
charles:textchat-53-ui-audio-sources-menu
charles:textchat-27-ui-expression-picker
charles:textchat-57-core-entrance-library
charles:textchat-36-proto-channel-types
charles:textchat-26-ui-upload-tray
charles:textchat-59-ui-soundboard-popout-parity
charles:textchat-58-audio-sound-edit
charles:textchat-55-proto-api-entrance-library
charles:textchat-25-ui-composer
charles:textchat-56-core-soundboard-parity
charles:rename-video-plan
charles:textchat-stage-25
charles:textchat-stage-23-24
charles:soundboard-plan
charles:textchat-24-ui-message-row
charles:textchat-22-ui-attachments-media
charles:textchat-23-ui-embeds
charles:textchat-14-core-expressions
charles:textchat-21-app-textchat-runtime
charles:textchat-16-core-navigation-read
charles:textchat-17-core-search
charles:textchat-19-core-dms-settings
charles:textchat-stage-13-15-18
charles:textchat-54-livekit-stereo-audio
charles:textchat-50-core-stream-audio-sources
charles:textchat-12-core-uploads
charles:textchat-15-core-message-actions
charles:textchat-11-core-composer
charles:textchat-18-core-threads
charles:textchat-13-core-reactions
charles:textchat-51-audio-pipewire-devices
charles:textchat-49-capture-audio-targets
charles:audio-plan
charles:textchat-plan2
charles:textchat-20-devserver-textchat
charles:textchat-6-api-chat-endpoints
charles:textchat-10-core-chat-ports
charles:textchat-9-ui-code-highlighting
charles:textchat-3-proto-expressions-threads-prefs
charles:textchat-5-api-messages-uploads
charles:textchat-2-proto-chat-requests-events
charles:textchat-8-ui-inline-flow-emoji
charles:screenshare
charles:textchat-7-platform-files-clipboard
charles:textchat-1-proto-message-content
charles:textchat-4-emoji-crate
charles:screenshare-31-acceptance
charles:screenshare-29-parity-screenshots
charles:textchat-plan
charles:screenshare-24-ui-focus-layout
charles:screenshare-27-ui-stream-menu
charles:screenshare-30-packaging-ci
charles:screenshare-21-app-screenshare-runtime
charles:screenshare-22-ui-sidebar-live
charles:screenshare-23-ui-stream-tile
charles:screenshare-26-ui-source-picker
charles:screenshare-28-ui-screenshare-settings
charles:screenshare-13-core-previews
charles:screenshare-12-core-codec-negotiation
charles:screenshare-25-ui-share-controls
charles:screenshare-18-hw-encode-linux
charles:screenshare-19-spike-hw-encode-windows
charles:screenshare-11-core-stream-params
charles:screenshare-20-devserver-screenshare
charles:screenshare-10-core-go-live
charles:screenshare-17-voice-livekit-video
charles:screenshare-14-audio-capture-linux
charles:wip/screenshare-17
charles:screenshare-integration
charles:feat-user-profile
charles:fix-voice-join
charles:feat-entity-images
charles:screenshare-16-voice-video-session
charles:screenshare-9-core-watching
charles:screenshare-5-capture-windows
charles:fix-wire-livekit
charles:screenshare-4-capture-linux
charles:screenshare-15-audio-capture-windows
charles:fix-member-list
charles:screenshare-8-core-stream-ports
charles:fix-live-protocol
charles:screenshare-6-ui-video-widget
charles:screenshare-3-capture-crate
charles:fix-altcha-captcha
charles:screenshare-1-video-frames
charles:screenshare-7-proto-api-streams
charles:screenshare-2-spike-livekit-video
charles:voice
charles:voice-26-acceptance
charles:voice-23-voice-e2ee
charles:voice-25-packaging-ci
charles:voice-13-voice-livekit-interop
charles:voice-24-parity-screenshots
charles:voice-19-ui-soundboard
charles:voice-20-ui-participant-menu
charles:voice-22-ui-dm-calls
charles:voice-21-ui-voice-settings
charles:voice-18-ui-call-view
charles:voice-14-app-voice-runtime
charles:voice-10-core-soundboard
charles:voice-17-ui-voice-panel
charles:voice-9-core-voice-settings-advert
charles:voice-5-audio-clips-chimes
charles:voice-15-devserver-voice
charles:voice-8-core-live-room-volumes
charles:voice-11-core-calls-status
charles:voice-12-voice-session
charles:voice-4-audio-devices-mixer
charles:voice-16-ui-voice-sidebar
charles:voice-7-core-voice-connection
charles:foundation
charles:voice-2-proto-api-soundboard-rtc
charles:voice-6-core-voice-states
charles:voice-3-audio-dsp
charles:voice-1-proto-voice-gateway
charles:task/26-acceptance
charles:task/25-packaging-release
charles:task/24-screenshot-tests
charles:task/20-ui-message-list-composer
charles:task/22-ui-settings-parity
charles:task/18-ui-main-layout
charles:task/23-notifications
charles:task/17-ui-shell-login
charles:task/14-app-runtime
charles:ci/51-windows-disk-space
charles:task/12-platform-persistence
charles:task/13-devserver
charles:task/21-ui-avatar-image-cache
charles:task/10-core-messages-readstate
charles:task/9-core-guilds-channels
charles:task/7-gateway-machine-transport
charles:task/11-core-presence-ui
charles:task/19-ui-rich-text
charles:task/8-core-store-session
charles:task/16-ui-theme-fonts-icons
charles:task/15-status-api
charles:task/4-proto-gateway-events
charles:task/5-openapi-vendor-contract
charles:task/6-api-client
charles:task/3-proto-rest-models
charles:task/2-proto-primitives
charles:task/1-workspace-scaffold
No reviewers
Labels
Clear labels
bug
A bug found while working on something else; steps to reproduce and the commit seen on
ci
Build, CI runners and workflows
follow-up
Deferred reviewer finding, linked from the PR it came from
good-first-task
Small, well-scoped, no cross-crate knowledge needed
parity
Settings/behaviour parity with the Electron client
question
Design question that needs Charles; blocks its task until answered
ready-to-merge
Reviewer approved, foundation merged in, CI green on both runners; waiting for the orchestrator to merge
task
A plan task (one per Foundation plan task)
No labels
bug
ci
follow-up
good-first-task
parity
question
ready-to-merge
task
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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!841
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "shell-1-spike-iced-daemon-hide"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this is
Spike for Desktop shell Task 1 (#793): can the client run as an
iced::daemonthat outlives its window, which close to tray on Wayland needs? Verdict: yes, so the shell conversion (Task 32) goes ahead as planned; the fallback is not needed. Throw-away code: nothing in the product uses it.crates/fluxer-ui/examples/daemon_lifecycle.rs: aniced::daemonwith one window that hides and shows, closes and reopens keeping its state, starts with no window while a subscription still ticks, opens at a saved placement, reports moves, sizes and maximise changes, and hands its raw handle out throughwindow::run. Its decisions are data (Spike::stepreturnsWindowOps) so they are testable without a display.SPIKE_SCRIPT=full|hidden|real-close,SPIKE_START_HIDDEN,SPIKE_SAVED,SPIKE_ON_CLOSEdrive the runs by hand.crates/fluxer-ui/tests/daemon_lifecycle.rs(not on Windows, #93): close request with hide keeps the state on X11, Wayland and Windows; reopen at the saved placement, maximise re-asked afterOpened; no window still updates; a show while a Wayland window is closing reopens afterClosed; a stale window's handle is ignored; placement parsing.crates/fluxer-ui/README.md, section "Window lifecycle": the findings.What was proven
Run in private headless sessions only, never on the desktop in use: KWin 6 (
kwin_wayland --virtual --xwayland), sway (WLR_BACKENDS=headless, close request viaswaymsg kill), bareXvfb. Windows read from winit 0.30.13 source, not run. GNOME not tried.set_mode(Hidden|Windowed)works on X11; does nothing on Wayland (winit'sset_visibleis empty): there hide iswindow::closeand show iswindow::openat the kept placement, the daemon keeps running. Reopen costs 230–350 ms on KWin, 650–800 ms on sway (the wgpu compositor is dropped with the last window and recreated).operation::scroll_toafterOpened; a new window's scrollable reports offset 0 beforeOpened, so those reports are ignored while opening.window::frames()delivers nothing. A hidden X11 window keeps redrawing (130–340 frames/s): drop frame/animation subscriptions while hidden.Settings::maximized:window::maximize(id, true)afterOpenedworks. No maximise event in iced:is_maximizedafter eachResized.window::run:Xlib/Wayland(Win32 by source);window::rundoes not run once the window is gone.exit_on_close_request: false; the daemon ends only oniced::exit().Findings for Task 32
Closedmust open a new window afterClosed, not focus the closing one; a hide beforeClosedcancels that.window::run,is_maximized,position) only when the id is the open window's.WindowHost"closed" before issuingwindow::close.Tests run
FLUXER_SCREENSHOT_TESTS=1 cargo xtask cigreen locally.Closes #793
🤖 Generated with Claude Code
https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Review: Shell 1 (spike, iced::daemon), independent reviewer
Reviewed
git diff 106ff769..origin/shell-1-spike-iced-daemon-hide(0ea514e3): README section,examples/daemon_lifecycle.rs,tests/daemon_lifecycle.rs. Onlyfluxer-uiis touched. No product code, no new dependencies, and no I/O in the library.Findings
[blocking] The PR description belongs to another PR and closes the wrong issue. The body of #841 is a word-for-word copy of #840's (the Task 3 portal-shortcuts spike) and ends with
Closes #795. #795 is "Shell 3: Spike — Wayland global shortcuts". Merging as it stands would close Task 3's issue, leave #793 open, and give the merger a description of code this PR does not contain. Fix: replace the body with this spike's summary and findings, followed byCloses #793. The code does not need to change.[minor] The example has a Wayland hide-then-show race.
hide()on Wayland returnsClose(id)but leaveswindow = Some(id)untilClosedarrives. AShowthat arrives in between returnsFocus(id)for the closing window, so the window is not reopened. The README covers "a second show while opening". It should also say that Task 32 must track a closing window and reopen afterClosed, so the window is never left unreachable (Review Focus 5).[minor]
Message::Handledoes not check the window id. It setsplatformfrom any window id, including a stale one. This does not matter in the spike, but Task 32'sWindowHostshould match the open id.Checks
close_request_with_hide_keeps_state,reopen_uses_saved_placement,no_window_still_updates), plussaved_placement_parses. They driveSpike::step(the decisions insideupdate);updateandsubscriptionare also built without a runtime. They cover (a) to (f) at the decision level, per platform.redraw_subscriptionstop without a window; whether the wgpu device survives; and the effect on the headless harness. Checked against the local registry:set_visibleis empty.Action::Closedrops the UI cache and sets*compositor = Nonewhen no window is left, so the device is recreated on reopen.Action::Runis a no-op for a missing window, soWindowHost::closedmust come beforewindow::close.#![cfg(not(windows))]like the othericed::Renderersuites (#93). The example's code on Windows is type-correct.fluxer_desktop/src/main/Window.ts:pendingMaximizeonshow, lines 741-748) matches maximise afterOpened.getNormalBounds, line 290), as in the spike, which keeps the size from before maximising.OnClose::{Hide, Quit}.FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin the review worktree: all steps passed (exit 0), andtests/daemon_lifecycle.rspassed 4 of 4.The spike verdict holds:
iced::daemonworks, so theiced::applicationfallback is not needed. Tasks 9 and 32 should take the findings on X11 position creep, X11 maximise afterOpened, stopping frame subscriptions while hidden, and ignoring scroll reports while opening.Verdict: changes requested. The only blocker is the PR body (
Closes #793and this spike's description). The code is approvable as is.Review round 1, addressed in
65f60985:Closes #793(no longer mentions #795). No code change needed for this one.closing: Option<window::Id>andreopen_after_close. A show beforeClosedno longer focuses the closing window; a new window opens whenClosedarrives, and a hide beforeClosedcancels that.shown()is false while closing, and a second hide sends nothing. Test:show_while_closing_reopens_after_closed. The README's "Window lifecycle" section says Task 32'sWindowHostmust do the same.Message::Handle: the platform is set only when the id is the open window's; a stale id is logged and ignored. Test:handle_of_a_stale_window_is_ignored. The README notes that Task 32 should apply id-carrying answers only for the open window.FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciis green locally.Review round 2: Shell 1 (spike, iced::daemon), independent reviewer
Reviewed
git diff 106ff769..origin/shell-1-spike-iced-daemon-hideat65f60985, covering0ea514e3and the round-1 fix. Onlycrates/fluxer-uichanged: the README,examples/daemon_lifecycle.rsandtests/daemon_lifecycle.rs.Round 1 findings
Closes #793. #795 is no longer mentioned. Both commits carryRefs #793.closingandreopen_after_close. A show beforeClosedopens a new window whenClosedarrives, and a hide beforeClosedcancels that.shown()is false while the window is closing. Covered byshow_while_closing_reopens_after_closed. I checked this against iced_winit 0.14.1:Action::ClosepushesClosedfrom inside the action. The race is therefore only between issuing the task and the runtime processing it, and the guard handles that.Handle: fixed.Handlenow checks the window id, and so doMaximizedandPosition. Covered byhandle_of_a_stale_window_is_ignored.New findings
WindowHosttracks the closing window". In the plan,WindowHostis the injected{ opened, closed }port. Tracking the closing window is the job ofShell, which holdsOption<window::Id>. Task 32 should put that logic inShell, not in the host trait.Hidethat arrives while a window is opening (window == None,opening == true) returns nothing, so the window that then opens is shown. The window stays reachable, so Review Focus 5 holds. Still, Task 32 should decide whether to remember the hide, for example a close-to-tray click during a slow Wayland reopen.Checks
close_request_with_hide_keeps_statechecks Windows, X11 and Wayland:SetMode(Hidden)on Windows and X11,Closeon Wayland, and the counter, draft and scroll kept.reopen_uses_saved_placementchecksSettingssize and position,exit_on_close_request: false, the normal size kept while maximised, andMaximizeasked again afterOpened.no_window_still_updateschecks that a start hidden opens no window and that seconds tick. There are three extra tests.redraw_subscriptionwith no window, the wgpu device, and the headless harness. I checked against the registry: winit 0.30.13 Waylandset_visibleis empty; iced_winitClosesets*compositor = Nonewhen no window is left;Action::Rundoes nothing for a missing window.#![cfg(not(windows))], as the other renderer suites are (#93). The example'scfg!(windows)branch is type-correct.fluxer_desktop/src/main/Window.ts:getNormalBounds, l.290). The spike dropspending_sizewhile maximised.showTrayIconandcloseToTray(l.326, 853). The spike hasOnClose::{Hide, Quit}, and the spec matches §7.1.FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin the review worktree: all steps passed.tests/daemon_lifecycle.rspassed 6 of 6.The spike verdict holds:
iced::daemonworks and the fallback is not needed.Verdict: approved. There are no blocking findings and the gate is green.
Merged into
shellby hand (the merge API returns 405); the commits are in the branch.Independent review: Shell 1 (spike: iced daemon, hide / close / reopen)
I reviewed
git diff 158c90dd..origin/shell-1-spike-iced-daemon-hide. It changes three files:crates/fluxer-ui/examples/daemon_lifecycle.rs,crates/fluxer-ui/tests/daemon_lifecycle.rsand the README section "Window lifecycle". The branch head is4edb586f, and origin/shell already contains it.Plan steps. The three tests that Step 1 names exist and assert what the plan says:
close_request_with_hide_keeps_state: Hidden mode on Windows and X11, close on Wayland; counter, draft and scroll survive; Quit when close to tray is off.reopen_uses_saved_placement: size, position,maximized,visibleandexit_on_close_request: false; the normal size is kept apart from the maximised one; maximise is asked again afterOpened.no_window_still_updates: starting hidden opens no window, the seconds subscription keeps ticking, and Quit works with no window.There are three extra tests: placement parsing, show while closing, and a stale handle.
Interfaces. Items (a) to (f) are all in the example. The README answers each question the plan asks:
frames()andredraw_subscriptionstop without a windowThe spike succeeded, so the fallback is not needed.
Invariants. The change has no product code and no new dependency. It touches no fluxer-core, does no I/O in the fluxer-ui lib (the env reads and the thread are in the example only), has no secrets and no fixtures. It does not touch any registry.
Parity (checked in
fluxer_desktop/src/main/Window.ts):closehandler callspreventDefaultand hides whenhasActiveDesktopTray() && showTrayIcon && closeToTray(l. 326, 857). This matches spec §7.1 and the spike'sOnClose::Hide.applyPendingMaximizeonshow, l. 742–747). This matches the spike'sMaximizeafterOpened.getNormalBounds). This matches the spike keeping the unmaximised size.Review Focus. Item 5 (the window is never left unreachable) belongs to Tasks 9, 32 and 33. The spike covers its Wayland side:
show_while_closing_reopens_after_closed.Gate. I ran
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin a fresh review worktree. The result is "all steps passed", exit 0, and all 6 daemon_lifecycle tests pass.Findings
window_event(Opened)overwritesplacement.positionwith the reported position. That is the client-area origin, which causes the title-bar creep the README describes. This is fine for the spike, but Task 32 must not copy that line. The README already says to subtract the offset.Position::Default. The original usescenter: true(Window.ts l. 721–726). Tasks 9 and 32 should restore withPosition::Centeredfor parity.None of the findings is blocking.
Verdict: approved. There are no blocking findings and the gate is green.
Independent review, Task 1 (spike-iced-daemon-hide), re-run 2026-11-18
Scope:
git diff f2e3f17db..origin/shell-1-spike-iced-daemon-hideis empty. The branch points at the shell tip, and the spike's commits0ea514e36and65f60985c(plus merge4f5052f44) are already ancestors of origin/shell. So I reviewed the spike as it exists on shell.close_request_with_hide_keeps_state,reopen_uses_saved_placementandno_window_still_updatesexist incrates/fluxer-ui/tests/daemon_lifecycle.rs. They driveupdatewith no display. They assert: hide on X11 and Windows vs close on Wayland, state kept and no exit on close request; saved size, position, visible and maximized;exit_on_close_request: false;Position::Defaultwhen nothing is saved; and no window, with no frames and subscriptions still updating. All three pass.crates/fluxer-ui/examples/daemon_lifecycle.rscovers set_mode, close/open, the no-window subscription, saved placement, Moved/Resized/maximise (viais_maximized) and the raw handle throughwindow::run. Thecrates/fluxer-ui/README.md"Window lifecycle" section answers every question the plan asks for X11, Wayland (KDE) and Windows (from source): what a reopen loses, frames andredraw_subscriptionwithout a window, the wgpu device, and the headless harness.fluxer_desktop/src/main/Window.ts: saved bounds are x, y, width, height and isMaximized; restorable bounds are kept apart from maximised ones; default bounds are used when nothing is saved. The spike's Placement and the test "a maximised size is not the one restored" match all three.FLUXER_SCREENSHOT_TESTS=1 cargo xtask cionf2e3f17db: all steps passed (exit 0).Findings: none.
Verdict: APPROVED. Task 1 is complete on shell, and this branch adds nothing to merge.
Pull request closed