Skip to content

Add a menu bar status item with three-state visibility (#645, #623)#660

Merged
sbertix merged 3 commits into
supabitapp:mainfrom
serenNan:pr-645-menubar
Jul 15, 2026
Merged

Add a menu bar status item with three-state visibility (#645, #623)#660
sbertix merged 3 commits into
supabitapp:mainfrom
serenNan:pr-645-menubar

Conversation

@serenNan

Copy link
Copy Markdown
Contributor

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.

  • Three-state visibility. A new AppVisibility setting (Dock / Dock & Menu Bar / Menu Bar) replaces the old showMenuBarIcon bool, 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. Legacy showMenuBarIcon migrates: trueDock & Menu Bar, false/absent → Dock.
  • Dock icon hiding (Hide app icon in dock #623). Menu Bar mode 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.
  • SC monogram, not a bell. The status item shows an SC monogram with a red dot while anything is unread.
  • Attention list, not notification bodies. The dropdown lists the worktrees that need attention (unread notifications or an active agent); clicking one activates the app and selects that worktree. System notifications already carry the message text, so the menu intentionally does not repeat it.
  • Menu actions: Show Main Window, Mark All as Read, Settings, Quit.

The Dock badge is intentionally left for a follow-up, as suggested in the issue thread.

Note on the visibility card artwork: the three cards currently use SF Symbol placeholders (dock.rectangle / menubar.dock.rectangle / menubar.rectangle). @sbertix kindly offered to add the dedicated artwork to this PR so it matches the Appearance group's polish.

Type of change

  • Feature (the linked issue is a feature request marked 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 Read gating, the AppVisibility reducer path, and the legacy-showMenuBarIcon migration on load/persist).

  • make check passes (format + lint)

  • make test passes (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)

  • Model(s): Claude Opus 4.8
  • Harness / tools: Claude Code

Checklist

  • This pull request is linked to an issue with Closes # above.
  • For a feature, the linked issue is labeled ready.
  • I am the author of this work and accountable for it; no commit is authored or co-authored by an AI agent.
  • I have read the Contributing guide and the Code of Conduct.

serennan and others added 2 commits July 14, 2026 09:33
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 sbertix left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🙇‍♂️ images added and updated the menu item window to match the rest of the app 💪

@sbertix sbertix merged commit f2a240a into supabitapp:main Jul 15, 2026
3 checks passed
@serenNan serenNan deleted the pr-645-menubar branch July 15, 2026 12:15
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.

Menu bar notification status item (bell) with unread badge and quick actions Hide app icon in dock

2 participants