feat(shell): complete Windows internal Alpha host lifecycle - #52
Merged
Merged
Conversation
Acquire a session-scoped Windows mutex before shell initialization so repeated launches exit without creating windows, opening storage, or starting plugins. Keep the native handle and unsafe calls isolated in floatile-platform and document the Windows Alpha host requirements. Refs: WA-HOST-01 Tests: cargo build -p floatile-shell --locked; cargo test -p floatile-platform --locked; cargo check --workspace --all-targets --locked; cargo clippy --workspace --all-targets --locked -- -D warnings; cargo test --workspace --all-targets --locked; Windows 11 x64 manual double-launch process count = 1 (user verified) Unverified: Linux and macOS runtime behavior
Provide a Windows notification-area icon with open and explicit-exit actions while keeping native tray ownership in floatile-platform. The shell polls bounded non-blocking events on the Slint thread so closing the management window only hides it and tray exit retains the existing cleanup path. Refs: WA-HOST-02 Tests: cargo fmt --all -- --check; cargo check --workspace --all-targets --locked; cargo clippy --workspace --all-targets --locked -- -D warnings; cargo test -p floatile-platform --locked (13 passed); cargo deny --locked check advisories bans sources; Windows 11 x64 manual tray open, hide/reopen, process retention, and explicit exit (user verified) Unverified: Linux/macOS behavior; left-click tray activation; cargo deny --locked check licenses remains release-blocked by Slint and cross-target option-ext MPL-2.0 policy
Apply floating tool-window semantics only to Widgets so they stay out of the taskbar and Alt+Tab, while restoring the management center as a resizable native application window with system controls. Scope the shared winit attributes hook by the stable Widget title and keep Win32 style changes inside floatile-platform. Refs: WA-HOST-03 Tests: cargo fmt --all -- --check; cargo check --workspace --all-targets --locked; cargo clippy --workspace --all-targets --locked -- -D warnings; cargo test -p floatile-platform --locked (14 passed); cargo build -p floatile-shell --locked; Windows 11 x64 manual taskbar/Alt+Tab separation, native minimize/maximize/resize, close-to-tray, and reopen (user verified) Unverified: Linux and macOS runtime behavior
Save the final Widget layout before tray exit, release Windows host resources in an explicit order, and cap waits for background workers so one runtime cannot hold the process open indefinitely. Add Windows monitor enumeration and host-level pointer capture so resizable Widget geometry can be persisted and restored instead of being discarded when no monitor snapshot exists. Refs: WA-HOST-04, FR-LAYOUT-01, FR-DISPLAY-01 Tests: cargo fmt --all -- --check; cargo check --workspace --all-targets --locked; cargo clippy --workspace --all-targets --locked -- -D warnings; cargo test -p floatile-platform --locked -j1 (15 passed); cargo test -p floatile-shell --lib --locked -j1 (55 passed); cargo test -p floatile-shell --bin floatile-shell --locked -j1 (1 passed); cargo check -p floatile-sdk --target wasm32-wasip2 --locked; cargo deny --locked check advisories bans sources; Windows 11 x64 manual resize, tray exit, process release, single-instance restart, and layout restore (user verified). cargo test --workspace --all-targets --locked was attempted but hit the pre-existing concurrent floatile_clock_wasm.dll output collision; affected tests passed serially. Unverified: Windows physical multi-monitor, mixed-DPI, and hot-plug behavior; Linux and macOS runtime regression
Keep Windows-specific UI state and window-role imports behind cfg(windows) so Linux and macOS Clippy builds do not reject them as unused. Refs: WA-HOST-03, WA-HOST-04 Tests: cargo fmt --all -- --check; cargo check --workspace --all-targets --locked; cargo clippy --workspace --all-targets --locked -- -D warnings; cargo test -p floatile-shell --bin floatile-shell --locked (1 passed) Unverified: Linux and macOS runtime behavior; cargo test -p floatile-shell --lib --locked blocked by pre-existing Windows floatile_clock_wasm.dll output collision/lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
范围
完成 Windows 11 x64 内部 Alpha 的宿主生命周期闭环:
验证
已知限制
Refs: WA-HOST-01, WA-HOST-02, WA-HOST-03, WA-HOST-04, FR-LAYOUT-01, FR-DISPLAY-01