Skip to content

rt-tray: a quit with no window on screen is a real quit - #283

Merged
m4ttheweric merged 1 commit into
mainfrom
quit-when-closed
Sep 16, 2026
Merged

m4ttheweric merged 1 commit into
mainfrom
quit-when-closed

Conversation

@m4ttheweric

Copy link
Copy Markdown
Collaborator

Follow-up to the dock-first tray work. The window-close quit interception also swallowed quits that had nothing to close: with the mattstack window closed, an AppleScript quit, the Dock's Quit, or Activity Monitor could not stop the app at all, leaving only the tray menu (I hit this installing a build and had to pkill).

QuitReason.shouldTerminate now folds the whole decision into one pure helper: confirmed tray quit, session end, or a system reason terminates, and so does any quit arriving with no window on screen. Cmd-Q with the window open still just closes the window and keeps supervision alive.

216 checks green (3 new).

🤖 Generated with Claude Code

The window-close interception also caught quits that had no window to
close, so scripts, the Dock, and Activity Monitor could not stop the app
once the window was closed; only the tray menu could. The decision now
folds in whether a window is on screen, as a pure core helper with checks.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 83 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 2e42e59d-44ac-4d2f-ba47-40d3cdc85e33

📥 Commits

Reviewing files that changed from the base of the PR and between aeb546e and 75ba80a.

📒 Files selected for processing (3)
  • rt-tray/Sources-core/Launch/QuitReason.swift
  • rt-tray/Sources/AppDelegate.swift
  • rt-tray/Tests/MattstackCoreChecks/QuitReasonChecks.swift

Comment @coderabbitai help to get the list of available commands.

@m4ttheweric
m4ttheweric merged commit 6021e98 into main Sep 16, 2026
4 checks passed
m4ttheweric added a commit that referenced this pull request Sep 17, 2026
The window-close interception also caught quits that had no window to
close, so scripts, the Dock, and Activity Monitor could not stop the app
once the window was closed; only the tray menu could. The decision now
folds in whether a window is on screen, as a pure core helper with checks.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@m4ttheweric
m4ttheweric deleted the quit-when-closed branch September 17, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant