Keep the X11 app running after closing its main window
Summary
Intent: The Linux title-bar Close button, File → Close and Alt+F4 invoke a full quit because hiding is unsupported. On X11, hide the main window and remap it when opened from the tray, keeping note windows and the app alive. ANLG-320.
Demo
Recorded native X11 walkthrough.
Verified with #8222 and #8223 applied: chrome Close, Alt+F4, File → Close and tray Hide preserve the process; tray Open restores the note. Confirmed Quit Completely removes the process, window and tray registration. The minimal runtime needed zenity installed for the confirmation fallback.
Verification
Ubuntu 24.04 userspace, Rust 1.98.1; from apps/desktop-gpui:
cargo fmt --checkcargo test --locked --workspace(515 passed; four ignored including the live-display regression)cargo clippy --locked --workspace --all-targets --no-deps -- -D warningscargo build --locked- Regression coverage for visible Wayland activation and live X11 map/unmap/remap.
- Combined Linux build passes all four gates (517 tests).
Native hide/remap is X11-specific. Wayland hiding remains unsupported by the pinned GPUI API; an unsupported hide reports an error and keeps the window open rather than quitting. macOS and Windows app behavior, the shipping app and shared crates are unchanged.
The automation HTTP fixture now explicitly reads accepted sockets in blocking mode, fixing the macOS CI WouldBlock failure without changing app behavior.
Open in Devin Desktop: https://app.devin.ai/desktop/session/9d8a027024b4432ca4bb8eca13f1867e?variant=devin
Requested by: @ComputelessComputer
Summary by cubic
Keeps the app running on Linux X11 after the main window is closed.
Closing the main window via the title-bar Close button, File → Close, or Alt+F4 now hides only that window to the tray instead of quitting the app, and opening the app from the tray restores it. Note windows stay open. On Linux backends that can't hide a window (Wayland), Close reports an error and keeps the window open rather than quitting, and restoring from the tray no longer errors when the window is already visible. macOS and Windows behavior is unchanged. Also accepts automation fixture socket connections in blocking mode so reads don't hit unexpected timeouts.