feat(tray): has_tray_host command so the first-close dialog can tell when there is no tray (#37) #40

Merged
jared merged 1 commits from fix/no-tray-host into main 2026-10-18 19:44:55 -04:00
Owner

Refs #37 (native half; the dialog change is cinny PR below).

On stock GNOME (no StatusNotifier host), the first-close dialog's default "Keep running in the tray" hid the window with no tray icon to bring it back, and saved that choice for every later close.

Change: new has_tray_host command. On Linux it asks the session bus whether org.kde.StatusNotifierWatcher has an owner (zbus NameHasOwner, already a dependency for the badge). Any D-Bus failure → false. Off Linux it's always true.

Verified: cargo check passes (src-tauri, existing warnings only). I couldn't run it under a real GNOME session here; the cinny side was tested with a stubbed bridge for both answers.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Refs #37 (native half; the dialog change is cinny PR below). On stock GNOME (no StatusNotifier host), the first-close dialog's default **"Keep running in the tray"** hid the window with **no tray icon** to bring it back, and saved that choice for every later close. **Change:** new `has_tray_host` command. On Linux it asks the session bus whether `org.kde.StatusNotifierWatcher` has an owner (zbus `NameHasOwner`, already a dependency for the badge). Any D-Bus failure → `false`. Off Linux it's always `true`. **Verified:** `cargo check` passes (`src-tauri`, existing warnings only). I couldn't run it under a real GNOME session here; the cinny side was tested with a stubbed bridge for both answers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-18 02:41:08 -04:00
On stock GNOME there is no StatusNotifier host, so choosing "Keep
running in the tray" hid the window with no icon to bring it back.
Expose whether org.kde.StatusNotifierWatcher has an owner on the
session bus (always true off Linux); cinny's dialog then defaults to
Quit and words the other option as "running in the background".

Refs #37

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared merged commit 0d42803fd4 into main 2026-10-18 19:44:55 -04:00
Sign in to join this conversation.