Skip to content

feat(desktop): add close-to-tray option#3030

Closed
wade19990814-hue wants to merge 5 commits into
esengine:main-v2from
wade19990814-hue:codex/close-to-tray
Closed

feat(desktop): add close-to-tray option#3030
wade19990814-hue wants to merge 5 commits into
esengine:main-v2from
wade19990814-hue:codex/close-to-tray

Conversation

@wade19990814-hue

@wade19990814-hue wade19990814-hue commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a desktop-only closeToTray setting stored in UserConfigDir/reasonix/desktop.json
  • initialize a cross-platform system tray with Open / Quit actions only
  • intercept window close only when the setting is enabled and a tray is available
  • add the setting under Settings → Appearance → Desktop behavior

Closes #3014

Notes

  • The setting defaults to off, so existing close-to-exit behavior is unchanged unless users opt in.
  • The tray menu intentionally does not expose the setting toggle; it is managed from the desktop Settings panel.
  • Windows uses the bundled .ico for the tray icon, while macOS/Linux keep using the PNG app icon.
  • Linux checks for a StatusNotifier watcher before enabling close-to-tray, so the app should not hide itself when no tray host is available.
  • Windows manual verification covered the Settings entry, the tray icon, and the localized tray menu (打开 / 退出). Screenshots were captured locally by the tester.

ScreenShot

屏幕截图 2026-06-05 152222 屏幕截图 2026-06-05 152208 屏幕截图 2026-06-05 152151

Test plan

  • cd desktop && go test -count=1 ./...
  • cd desktop/frontend && pnpm exec tsc --noEmit
  • cd desktop && wails build

@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 4, 2026
@wade19990814-hue wade19990814-hue marked this pull request as draft June 4, 2026 05:25
@wade19990814-hue wade19990814-hue marked this pull request as ready for review June 4, 2026 06:03
@wade19990814-hue

Copy link
Copy Markdown
Contributor Author

Hi @SivanColal, could you take a look when you have a moment?

I rebased this PR onto the latest main-v2 and added fresh real-machine desktop testing on Windows. Verified the close-to-tray flow manually: default close still quits, enabling the setting hides the window to tray, tray Open restores the app, Quit exits, and the setting persists after restart.

JimmyDaddy pushed a commit to JimmyDaddy/DeepSeek-Reasonix that referenced this pull request Jun 5, 2026
…engine#3209)

Add a desktop close-to-tray option: closing the window can hide to a tray icon (Windows/Linux menu with Open/Quit, platform guards) instead of quitting. Rebased onto main-v2 with the macOS system-quit hook (esengine#3203) — both run at startup; beforeClose keeps system-quit bypass ahead of close-to-background.

Original author: @wade19990814-hue.

Closes esengine#3030
@wade19990814-hue wade19990814-hue deleted the codex/close-to-tray branch June 5, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add close-to-tray option for desktop window close

1 participant