Add a menu bar status item with three-state visibility (#645, #623)#660
Merged
Conversation
supabitapp#623) Add a macOS menu bar status item for Supacode, gated behind a new three-state AppVisibility setting (dock / dockAndMenuBar / menuBar, default dock — the menu bar is opt-in). The menuBar mode runs the app as an accessory via NSApp.setActivationPolicy(.accessory), hiding the Dock icon (supabitapp#623); the policy is applied at launch and whenever visibility changes, and the main window is surfaced when the Dock reappears so the app is never stranded. The status item shows an SC monogram with a red dot while anything is unread. Its dropdown lists the worktrees that need attention (unread notifications or an active agent) rather than the notification bodies — system notifications already surface those; clicking a worktree activates the app and selects it. Menu actions: Show Main Window, Mark All as Read, Settings, Quit. Settings gain a header-less visibility card group (mirroring the Appearance cards, with SF Symbol placeholders) before the Editor section under General. Closes supabitapp#645 Closes supabitapp#623
Decode appVisibility without throwing so a corrupt or hand-edited value falls back to Dock instead of resetting the whole settings file, and drop the migration for a showMenuBarIcon key that never shipped. Reorder the visibility cards to Dock / Menu Bar / Both and give each the app-icon artwork. Route activation-policy changes through an AppLifecycleClient seam that falls back to the previous mode when AppKit refuses the switch, so a mode change never strands the app with no surface, and surface the main window only for real app windows. Render the menu bar dropdown as a window mirroring the sidebar's Pinned, Active, and Unread rows, cached per leaf so a notification or agent tick invalidates only its row. The session list scrolls once it outgrows the screen while the action rows stay pinned. Use the app icon's SC glyph for the status item and dismiss the whole extra on selection.
sbertix
approved these changes
Jul 15, 2026
sbertix
left a comment
Collaborator
There was a problem hiding this comment.
Thanks 🙇♂️ images added and updated the menu item window to match the rest of the app 💪
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.
Closes #645
Closes #623
Summary
Implements the menu bar status item for Supacode with the combined direction agreed in #645, and folds in the Dock-icon toggle from #623.
AppVisibilitysetting (Dock/Dock & Menu Bar/Menu Bar) replaces the oldshowMenuBarIconbool, defaulting to Dock so the menu bar is opt-in. It renders as a header-less card group (mirroring the Appearance cards) before the Editor section under General. LegacyshowMenuBarIconmigrates:true→Dock & Menu Bar,false/absent →Dock.Menu Barmode runs the app as an accessory (NSApp.setActivationPolicy(.accessory)), hiding the Dock icon. The policy is applied at launch and on every visibility change, and the main window is surfaced when the Dock reappears so the app is never stranded.The Dock badge is intentionally left for a follow-up, as suggested in the issue thread.
Type of change
ready)How was this tested?
Built the app in Debug (
BUILD SUCCEEDED).Ran the menu-bar and settings test suites green:
MenuBarNotificationListTests,AppFeatureMenuBarNotificationsTests,SettingsFeatureTests,SettingsFilePersistenceTests(covering the attention-list projection, ordering,Mark All as Readgating, theAppVisibilityreducer path, and the legacy-showMenuBarIconmigration on load/persist).make checkpasses (format + lint)make testpasses (ran the menu-bar / settings suites above, not the full suite)I built and ran the app to confirm the change works (built; not launched)
AI tool disclosure (optional)
Checklist
Closes #above.ready.