Skip to content

Fix NSStatusItem not rendering on macOS Tahoe (26.x) - #147

Merged
iamtoruk merged 1 commit into
mainfrom
fix/tahoe-statusitem-rendering
Apr 24, 2026
Merged

iamtoruk merged 1 commit into
mainfrom
fix/tahoe-statusitem-rendering

Conversation

@iamtoruk

Copy link
Copy Markdown
Member

Summary

  • Fix menubar icon not appearing on macOS 26.4+ (Tahoe)
  • Start as .regular app, activate, set simple image first, then switch to .accessory
  • Workaround for window server registration issue on newer macOS

Problem

On macOS 26.4.1 Tahoe, the status item draw code executes but nothing renders in the menu bar. The app process runs, no crashes, but the icon is invisible.

Solution

  1. Start as .regular app and call activate() to ensure window server registration
  2. Set a simple SF Symbol image immediately on the status button
  3. Defer the attributed title update to ensure initial render completes
  4. Switch to .accessory policy after setup to hide from Dock

Test plan

  • Verify menubar icon appears on macOS Tahoe (26.4+)
  • Verify icon still works on macOS 14/15
  • Verify app hides from Dock after launch

Fixes #146

🤖 Generated with Claude Code

On macOS 26.4+, accessory apps may fail to render their status item if
the activation policy is set to .accessory before the status item is
created and populated. The status item draw code executes but nothing
appears in the menu bar.

Workaround:
1. Start as .regular app and call activate() to ensure window server
   registration
2. Set a simple SF Symbol image immediately on the status button
3. Defer the attributed title setup to ensure initial render completes
4. Switch to .accessory policy after setup to hide from Dock

Fixes #146
@iamtoruk
iamtoruk merged commit 4aafe89 into main Apr 24, 2026
3 checks passed
@iamtoruk
iamtoruk deleted the fix/tahoe-statusitem-rendering branch April 24, 2026 18:05
pull Bot referenced this pull request in TheTechOddBug/codeburn Aug 10, 2026
…ition

Test build for getagentseal#868. Keeps the activation policy pinned at .accessory
(LSUIElement makes the :92-96 call a no-op in packaged builds anyway) and
restores only the NSApp.activate(ignoringOtherApps: true) half of the
#147 fix, immediately before the status item is created.
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.

Menubar app: NSStatusItem created but never rendered on macOS 26.4 (Tahoe)

1 participant