Repository navigation
feat: add an option to minimize the window to the system tray - #150
Conversation
When "Minimize to the system tray" is on (Settings, and the Console interface under System), minimizing hides the main window from the taskbar; the tray icon brings it back. Off by default. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Important
The minimize-to-tray handler can skip the minimize transition, leaving this feature ineffective.
Reviewed changes This review covers the new persisted minimize-to-tray setting, its desktop and console UI, and the window/tray behavior.
- Minimize-to-tray behavior Adds an option that hides the main window after it is minimized and relies on the existing tray icon to restore it.
- Settings and persistence Exposes and saves the option in both interfaces, with all three localization catalogs updated.
- Docs and release notes Adds manual verification steps and unreleased changelog entries.
gpt-6-luna | 𝕏
| // With "Minimize to the system tray" on, minimizing leaves the taskbar; the tray icon brings it back. | ||
| appWindow.Changed += (_, e) => | ||
| { | ||
| if (!e.DidPresenterChange || !ViewModel.MinimizeToTray) return; |
There was a problem hiding this comment.
DidPresenterChange reports whether the AppWindow.Presenter property changed, but minimizing changes the existing presenter's State, so this guard can discard the minimize event before checking for Minimized. As a result, enabling the option may still leave the minimized window on the taskbar; observe the presenter-state transition without requiring the presenter object itself to change.

What
User feedback: "it would be nice if minimizing the app sent it to the hidden icons instead of keeping it on the taskbar". Today the window only goes to the tray when closed during an active console session; minimizing always leaves it on the taskbar.
This adds a Minimize to the system tray toggle (off by default):
minimizetray).MainWindow: onAppWindow.Changed, when the presenter becomes minimized and the option is on, the window is hidden. The existing tray icon (left click / "Show window") already restores it withSW_RESTORE.AppConfig.MinimizeToTray; strings in pt-BR, en-US and es-ES.docs/TESTING.md.Testing
dotnet test tests/ConsoleMode.Tests/ConsoleMode.Tests.csproj: 408 passed.dotnet build src/ConsoleMode(x64, Debug) on Windows: 0 errors.docs/TESTING.md("Minimizar para a bandeja").🤖 Generated with Claude Code