Skip to content

[macOS] Fix tray icon disabled + start hidden causing app to become permanently invisible #903

Merged
cjpais merged 4 commits intomainfrom
macos-tray-fix
Feb 27, 2026
Merged

[macOS] Fix tray icon disabled + start hidden causing app to become permanently invisible #903
cjpais merged 4 commits intomainfrom
macos-tray-fix

Conversation

@cjpais
Copy link
Copy Markdown
Owner

@cjpais cjpais commented Feb 26, 2026

When a user disables "Show Tray Icon" in settings and also has "Start Hidden" enabled, the app launches into a completely unreachable state:

  • The window is hidden (start hidden)
  • The tray icon is hidden (show tray icon disabled)
  • On macOS, the dock icon is removed (Accessory activation policy)

The app is running but there is no way to interact with it. The only recovery is re-launching from Spotlight or Applications, which triggers the
single-instance plugin to show the window. But on the next launch, the same invisible state occurs again.

Additionally, macOS had no RunEvent::Reopen handler, so clicking the dock icon (when visible) did nothing to bring the window back.

Fix

  1. Prevent invisible app state on startup: When the tray icon is not available (either via the show_tray_icon setting or the --no-tray CLI flag), the app
    now forces the main window to be shown regardless of the start_hidden setting. On macOS, the activation policy is also reset from Accessory to Regular
    so the dock icon remains visible.
  2. Add RunEvent::Reopen handler for macOS: Clicking the dock icon now calls show_main_window(), providing a recovery path for users whose app is running
    but has no visible window

TODO: Verify all possible code branches and make sure expectations are aligned for each

@github-actions
Copy link
Copy Markdown

🧪 Test Build Ready

Build artifacts for PR #903 are available for testing.

Download artifacts from workflow run

Artifacts expire after 30 days.

@YoussefHachicha
Copy link
Copy Markdown

please merge this

@cjpais
Copy link
Copy Markdown
Owner Author

cjpais commented Feb 26, 2026

@YoussefHachicha have you tested it?

@YoussefHachicha
Copy link
Copy Markdown

yes its working

@jborichevskiy
Copy link
Copy Markdown

Confirmed clicking Handy in the dock brings up the window now. Awesome!

Fwiw, I still have Show tray icon enabled, but it's not putting itself back into my menubar. Not sure if out of scope for this fix - this is already a massive improvement.

@cjpais
Copy link
Copy Markdown
Owner Author

cjpais commented Feb 27, 2026

hmm still not sure what the show tray icon not working, im unable to replicate that and dont see anything obvious

@cjpais cjpais merged commit 1d4d682 into main Feb 27, 2026
4 checks passed
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.

3 participants