change: closing the window minimizes to the tray, no popup #107

Merged
mysticalsoap merged 1 commit from fix/close-to-tray into trunk 2026-08-20 20:48:14 -04:00
Owner

Problem

Closing the window raised a confirmation popup with a five-second countdown that defaulted to quitting. #85 wants what every tray-resident app does: close = minimize to tray, quit lives in the tray menu, with an option for those who want close-means-quit.

Fix

  • closeEvent hides to the tray and ignores the event when the tray is usable and the new close_to_tray setting (default on) is set; otherwise it quits via the existing shutdown(). The popup and its countdown (change_timeout, exit_timer) are gone. Without a usable tray, closing always quits — hiding with no tray entry to come back from would strand the app.
  • close_to_tray added to default_settings (and default_config.json for the CLI's restore path) — load_config layers defaults under existing configs, so current installs get the new default and a correctly-checked box. New checkbox + description in the Options tab via the existing config_list machinery.
  • TrayIcon.window_visible(visible) + showEvent/hideEvent overrides keep the tray's Hide/Show label truthful however the window was hidden — the latent label-desync quirk noted in #106, which this default would have promoted into a daily annoyance.

Verification

Three new closeEvent policy tests (default hides + ignores the event; option off quits; unusable tray quits regardless) and two TrayIcon label-sync tests (follows visibility; harmless before populate). Full suite: 185 passed.

Closes #85

🤖 Generated with Claude Code

**Problem** Closing the window raised a confirmation popup with a five-second countdown that defaulted to *quitting*. #85 wants what every tray-resident app does: close = minimize to tray, quit lives in the tray menu, with an option for those who want close-means-quit. **Fix** - `closeEvent` hides to the tray and ignores the event when the tray is usable and the new `close_to_tray` setting (default **on**) is set; otherwise it quits via the existing `shutdown()`. The popup and its countdown (`change_timeout`, `exit_timer`) are gone. Without a usable tray, closing always quits — hiding with no tray entry to come back from would strand the app. - `close_to_tray` added to `default_settings` (and `default_config.json` for the CLI's restore path) — `load_config` layers defaults under existing configs, so current installs get the new default and a correctly-checked box. New checkbox + description in the Options tab via the existing `config_list` machinery. - `TrayIcon.window_visible(visible)` + `showEvent`/`hideEvent` overrides keep the tray's Hide/Show label truthful however the window was hidden — the latent label-desync quirk noted in #106, which this default would have promoted into a daily annoyance. **Verification** Three new `closeEvent` policy tests (default hides + ignores the event; option off quits; unusable tray quits regardless) and two `TrayIcon` label-sync tests (follows visibility; harmless before populate). Full suite: 185 passed. Closes #85 🤖 Generated with [Claude Code](https://claude.com/claude-code)
change: closing the window minimizes to the tray, no popup
All checks were successful
ci / test (pull_request) Successful in 29s
ci / test (push) Successful in 34s
3d4e8427a1
Closing used to raise a confirmation popup with a five-second countdown
that defaulted to quitting the app. It now hides to the tray, matching
what every tray-resident app does; quitting lives in the tray menu. A
new close_to_tray option (default on) restores close-means-quit for
those who want it, and without a usable tray closing always quits --
hiding with no tray entry to come back from would strand the app.

The tray's Hide/Show label now follows actual window visibility via
show/hide events: close-to-tray and tray-icon clicks hide the window
without going through the menu action, and the label used to keep
claiming "Hide" (noted as a latent quirk in #106; this default would
have promoted it to a daily one).

Closes #85

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mysticalsoap deleted branch fix/close-to-tray 2026-08-20 20:48:15 -04:00
Sign in to join this conversation.
No description provided.