Skip to content

feat: minimize to system tray (#850)#3004

Open
mondalaci wants to merge 1 commit into
masterfrom
feature/minimize-to-tray-850
Open

feat: minimize to system tray (#850)#3004
mondalaci wants to merge 1 commit into
masterfrom
feature/minimize-to-tray-850

Conversation

@mondalaci

Copy link
Copy Markdown
Member

Summary

  • Add a Minimize to system tray setting on the Settings page (Electron only) so minimizing Agent hides it to the system tray instead of the taskbar
  • Implement cross-platform tray support in the main process with left-click toggle, right-click context menu (Show / Quit), and Linux taskbar handling
  • Add --start-minimized-to-tray CLI option to launch Agent hidden in the tray (e.g. for autostart entries)

Closes #850

Test plan

  • Enable Minimize to system tray in Settings, minimize the window, and confirm it appears in the system tray
  • Left-click the tray icon to toggle show/hide; right-click to open the context menu with Show UHK Agent and Quit
  • Launch with --start-minimized-to-tray and confirm Agent starts with only the tray icon visible
  • Launch a second Agent instance while hidden in tray and confirm the window is restored and focused
  • Verify normal minimize behavior when the setting is disabled
  • Smoke test on Windows and macOS if available

Made with Cursor

Let Agent hide to the tray on minimize, restore from the tray icon, and start hidden via --start-minimized-to-tray.

Co-authored-by: Cursor <cursoragent@cursor.com>
@pcooke9

pcooke9 commented Jul 18, 2026

Copy link
Copy Markdown

Current behavior is that after the initial Agent launch, you need to minimize to tray using the Windows top button at least once per session before the tray icon becomes available. If the user has already enabled "Minimize to tray" in Settings, I wonder if it would be better to have the tray icon be available immediately upon opening Agent every time?

Also, if the Agent window is in a maximized state, and then you send it to tray by clicking the Windows minimize button at the top, it doesn't retain the maximized state when restoring from the tray (or when clicking the desktop launcher again). But once the tray icon is available, if you minimize it again using only the tray icon, it will then remember the maximized state. But still not when using the Windows minimize button. Is this the desired behavior?

Video of the issue:
https://www.youtube.com/watch?v=BoQCTJvQBOA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minimize to tray

2 participants