Repository navigation
Closed
Description
What
Operating-system notifications (Windows toast, Linux desktop notification, macOS later) when something in a stack or one of its lanes needs attention, configurable per kind of event:
| Event | Default |
|---|---|
| A build failed (main tree or a lane) | on |
A candidate is held and waits for promote |
on |
| A service exited by itself / crash loop | on |
| A lane's start or move on a node failed | on |
| A lane took (or gave back) the main ports | off |
| A candidate went live | off |
Each kind on/off, per machine; possibly overridden per stack or per lane (an agent's lane may stay quiet). Clicking a notification opens the dashboard on the stack, lane and service it is about.
Why not now
ADR-0018 point 2 puts notifications in a tray, and the tray is deferred in #1 because the usual tray crates break the static Linux build. Notifications do not need a tray. Decoupling them is an architectural change: it needs an amendment of ADR-0018 (or a new ADR) before the code.
Proposal
- The hub sends them. It already runs per user at logon (ADR-0021) and sees every stack's events over its daemon connections, so one place covers the main tree and every lane, local and on nodes. Daemons stay headless; a node never notifies.
- Windows: WinRT toast (
windowscrate,ToastNotificationManager). Needs an AppUserModelID;devstack hub installalready registers the hub at logon and thedevstack://link, so it would also register a Start-menu shortcut with that id. Fallback without it: aShell_NotifyIconballoon. - Linux:
org.freedesktop.Notificationsover D-Bus in pure Rust (zbus), so the binary stays static; without a session bus (server, container) silently off. - macOS: later (
osascriptorUNUserNotificationCenter). - Dashboard tab open: optionally the browser's Notification API as well, same settings, so nothing is shown twice (the hub knows whether a dashboard is connected).
- Settings: per kind of event, in the hub's settings (dashboard: Settings → Notifications; CLI:
devstack hub notify <event> on|off); a per-stack or per-lane mute from the stack/lane menu. - Noise: one notification per build and candidate; repeated failures of the same service within a few minutes are folded into one, and a crash loop is one notification, not one per restart.
Open points
- Per-stack override in the stack file (
[notify]) or only in the hub's settings? Probably the hub only: it is a preference of the person, not of the repository. - Whether the tray of Tray icon for the hub (Windows first; Linux without losing the static build) #1 later shares this code (it should: the tray then only adds the icon).
Done when
- An ADR (or the ADR-0018 amendment) is accepted.
- On Windows and on a Linux desktop a failed build and a held candidate notify, each kind can be switched off, and clicking opens the dashboard there.
- The Linux binary stays static (
filesays "statically linked"); without a desktop session nothing fails.
Metadata
Metadata
Assignees
Labels
No labels
Activity
feat(hub): desktop notifications for what needs attention (ADR-0045) (#…