Skip to content

feat: add an option to minimize the window to the system tray - #150

Merged
lippdev merged 2 commits into
mainfrom
feat/minimize-to-tray
Oct 18, 2026
Merged

lippdev merged 2 commits into
mainfrom
feat/minimize-to-tray

Conversation

@lippdev

@lippdev lippdev commented Oct 18, 2026

Copy link
Copy Markdown
Owner

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

  • Desktop Settings: new card next to "Start with Windows".
  • Console interface → System: matching row (minimizetray).
  • MainWindow: on AppWindow.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 with SW_RESTORE.
  • Saved in AppConfig.MinimizeToTray; strings in pt-BR, en-US and es-ES.
  • Changelog entries in both files and manual checks in docs/TESTING.md.

Testing

  • dotnet test tests/ConsoleMode.Tests/ConsoleMode.Tests.csproj: 408 passed.
  • dotnet build src/ConsoleMode (x64, Debug) on Windows: 0 errors.
  • Minimizing/restoring behavior not exercised by hand yet; checklist added in docs/TESTING.md ("Minimizar para a bandeja").

🤖 Generated with Claude Code

lippdev and others added 2 commits October 17, 2026 21:38
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]>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using 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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@lippdev
lippdev merged commit eeca3fa into main Oct 18, 2026
4 checks passed
@lippdev lippdev mentioned this pull request Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant