feat(desktop): close to tray instead of exiting - #41520
Open
2031814001yuyue-tech wants to merge 2 commits into
Open
feat(desktop): close to tray instead of exiting#415202031814001yuyue-tech wants to merge 2 commits into
2031814001yuyue-tech wants to merge 2 commits into
Conversation
- Windows/Linux: closing the last window hides it to the system tray so background agent work keeps running; tray menu offers Show/Quit and single/double click restores the window. - macOS: no behavior change (native close-to-Dock preserved). - Real quits (tray Quit, app menu, Cmd+Q, SIGTERM) close normally. - Pure resolveCloseAction decision logic with unit tests; tray module mocked-tested; window registry exposes isQuitting(). Closes anomalyco#18134 (desktop close-to-tray)
2031814001yuyue-tech
requested review from
Brendonovich and
Hona
as code owners
August 10, 2026 09:41
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.
Issue for this PR
Closes #18134
Type of change
What does this PR do?
Clicking X on the desktop app used to quit it entirely, which killed any
running agent work. This makes the window hide to the system tray instead
on Windows/Linux. Tray menu has Show/Quit, clicking the tray icon brings
the window back. Quitting still works normally through the tray menu, the app menu, Cmd+Q and system signals.
How did you verify your code works?
stays alive. Tray Show restores it, tray Quit exits cleanly.
Screenshots / recordings
None - it's system tray behavior, verified through the runtime checks above.
Checklist