Keep Capsule resident in the menu bar until explicit quit#7
Merged
Conversation
Closing the window no longer terminates Capsule. A CapsuleAppDelegate returns applicationShouldTerminateAfterLastWindowClosed = false, so the app stays alive behind a new MenuBarExtra and quits only on an explicit terminate (menu bar Quit, app-menu ⌘Q, or the language relaunch). The menu bar item uses Capsule's own mark as a monochrome template glyph (MenuBarIcon) and offers a basic, sensible set of actions: Open Capsule, a live Running Containers section (click to reveal/select in the window), the runtime status with Start/Stop Services, Settings, Check for Updates, and Quit Capsule. Also converts the main scene from WindowGroup to a single-instance Window so openWindow(id:) focuses the existing window instead of spawning duplicates when reopening from the menu bar. New user-facing strings are localized into zh-Hans, ja, es, fr, tr. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What & why
Closing the window used to fully quit Capsule. Now the app stays alive behind a menu bar item and quits only when the user explicitly chooses Quit (menu bar, app-menu ⌘Q, or the language relaunch).
Changes
CapsuleAppDelegatereturnsapplicationShouldTerminateAfterLastWindowClosed = false, attached via@NSApplicationDelegateAdaptorin the@mainshim (logic lives inCapsuleApp, shim stays thin).MenuBarExtrawith a basic, sensible menu: Open Capsule · Running Containers (live, click to reveal/select in the window) · Services status + Start/Stop Services · Settings… · Check for Updates… · Quit Capsule ⌘Q.MenuBarIcon), so macOS tints it for light/dark bars.WindowGroup→ single-instanceWindow, soopenWindow(id:)focuses the existing window instead of stacking duplicates when reopening from the menu bar.Verification
make check(lint + architecture + license headers)make test(886 tests, incl. newCapsuleAppDelegateTests)make appbuilds the real bundle🤖 Generated with Claude Code