Skip to content

feat(app): system tray adapter — Open / Quit menu skeleton #1422

@shm11C3

Description

@shm11C3

Split out from #1409, which sat under #1402 (Core/App split Epic). The Epic's stated goal is "no user-visible regression on the dashboard, history view, archive, or settings"; a tray icon — even a minimal one — is a user-visible UX surface, not a refactor step. Carving the tray out into its own feature issue keeps #1402 a pure refactor Epic and lets the tray be designed as part of the background-mode UX (#1275) it actually serves.

Goal

A minimal adapters::tray::TrayAdapter (src-tauri/src/adapters/tray.rs) that gives users a way back to the main window in background mode. No live metric rendering — that lands in #1401.

Scope

  • Tray icon registered on app startup.
  • Tray menu with Open (restore main window) and Quit (calls lifecycle::request_quit from Phase 5, which drives core::monitoring::MonitoringState to Stopped).
  • Left-click on the tray icon also restores the window.
  • Windows / macOS / Linux. Document any AppIndicator caveats discovered during implementation.

Out of Scope

Definition of Done

  • Closing the main window (in background mode) leaves a tray icon visible.
  • Clicking Open restores the window with state intact.
  • Quit exits the app cleanly through the lifecycle path from Phase 5.
  • Graceful fallback when the user's environment does not support a tray (some Linux desktops): the app still quits cleanly via Quit from another path.

Relationships

Notes

Replaces #1409, which is closed as rescoped to this issue. A skeleton implementation was written on refactor/1409-phase-6-tray-adapter (commit 02ae710, closed PR #1421) and is preserved for reuse — see the follow-up comment for what carries over and what should be reworked when this issue is picked up.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions