BlueGit

ict rusty-teams

Files

rusty-teams / docs / decisions / 0018-macos-tray-and-close-to-tray.md

0018-macos-tray-and-close-to-tray.md

0018-macos-tray-and-close-to-tray.md 1.4 KiB Download Raw

--- status: proposed date: 2026-11-15 ---

ADR 0018: macOS tray and close-to-tray match Linux

Upstream already shipped Linux desktop toasts as ADR 0015, so this macOS tray note is 0018.

Context

Linux already has a StatusNotifierItem tray and closes the main window into the tray because GPUI cannot hide a Wayland window (ADR 0012). macOS daily-driver use needs the same affordances: a menu-bar icon with presence / Open / Quit, and Settings → Close to tray. Native window hide is unreliable enough across GPUI versions that reusing the Linux “really close, reopen from tray” path is simpler than a separate Cocoa hide path.

Windows already uses tray-icon; macOS can share that crate instead of inventing a third tray stack.

Decision

  • On macOS, the tray is tray-icon (same implementation as Windows).
  • Close to tray on macOS follows the Linux path: the main window closes for real; the tray (or a second start) opens a fresh one.
  • Message toasts stay on the existing GPUI / Windows card path for now. macOS Notification Center is a follow-up once the shared desktop-notification policy from the Linux toast work lands.

Consequences

  • One close-to-tray mental model for Linux and macOS.
  • Signing / notarization still matter for TCC and Gatekeeper; packaging scripts may ship a bare Mach-O or a signed .app.
  • Contributors should not add a macOS-only hide path without revisiting this ADR.
Source
1---
2status: proposed
3date: 2026-11-15
4---
5
6# ADR 0018: macOS tray and close-to-tray match Linux
7
8Upstream already shipped Linux desktop toasts as ADR 0015, so this macOS tray note is 0018.
9
10## Context
11
12Linux already has a StatusNotifierItem tray and closes the main window into the tray because GPUI cannot hide a Wayland window (ADR 0012). macOS daily-driver use needs the same affordances: a menu-bar icon with presence / Open / Quit, and Settings → Close to tray. Native window hide is unreliable enough across GPUI versions that reusing the Linux “really close, reopen from tray” path is simpler than a separate Cocoa hide path.
13
14Windows already uses `tray-icon`; macOS can share that crate instead of inventing a third tray stack.
15
16## Decision
17
18- On macOS, the tray is `tray-icon` (same implementation as Windows).
19- Close to tray on macOS follows the Linux path: the main window closes for real; the tray (or a second start) opens a fresh one.
20- Message toasts stay on the existing GPUI / Windows card path for now. macOS Notification Center is a follow-up once the shared desktop-notification policy from the Linux toast work lands.
21
22## Consequences
23
24- One close-to-tray mental model for Linux and macOS.
25- Signing / notarization still matter for TCC and Gatekeeper; packaging scripts may ship a bare Mach-O or a signed `.app`.
26- Contributors should not add a macOS-only hide path without revisiting this ADR.