Merge pull request #1791 from caost/fix/macos-tray-dock-icon

This commit is contained in:
Dr. Dominik Jain authored and GitHub committed 2026-08-05 11:51:48 +02:00
commit e2a344a8da
3 files changed
+9 -4

No files matched your search

+3
View File
@@ -81,6 +81,9 @@ Status of the `main` branch. Changes prior to the next official version change w
* Dashboard:
- Fix: Serena PyPI version check triggered by callback on main thread could delay agent startup #1774
- Fix: on macOS, the `tray_manager` interface put an icon in the Dock and in the app switcher
(should only use menu bar icon)
- Use `tray_manager` interface as new default on macOS
* Hooks:
- Add `serena-hooks --client=grok`, including Grok-native PreToolUse allow/deny output.
+1 -2
View File
@@ -388,8 +388,7 @@ class DashboardManager:
case "Windows":
return cls.WEBVIEW
case "Darwin":
# TODO: Switch to TRAY_MANAGER once support is tested
return cls.BROWSER
return cls.TRAY_MANAGER
case _:
return cls.BROWSER
+5 -2
View File
@@ -1195,9 +1195,12 @@ class SerenaDashboardTrayManager:
# set up tray icon with a dynamic menu (callable returns items on each open)
kwargs: dict[str, Any] = {}
if sys.platform == "darwin":
from AppKit import NSApplication
from AppKit import NSApplication, NSApplicationActivationPolicyAccessory
kwargs["darwin_nsapplication"] = NSApplication.sharedApplication()
nsapp = NSApplication.sharedApplication()
# run as an accessory app so that only the menu bar icon is shown (no Dock icon)
nsapp.setActivationPolicy_(NSApplicationActivationPolicyAccessory)
kwargs["darwin_nsapplication"] = nsapp
self._tray_icon = pystray.Icon(
"serena_tray_manager",