Skip to content

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

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

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

Conversation

@wade19990814-hue
Copy link
Copy Markdown

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

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-04 140150 屏幕截图 2026-06-04 140126 屏幕截图 2026-06-04 140113

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
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