enhancementhelp wanted
Repository metrics
- Stars
- (0 stars)
- PR merge metrics
- (PR metrics pending)
Description
Goal
Today the only way to know that something happened (a peer connected, a conflict was created, a directory was added) is to have the GUI open. Add OS-level desktop notifications so important events surface even when the browser tab is closed.
Requirements
- New
app/src/infra/notifications/module using a small cross-platform crate such asnotify-rust. Behind the existing port pattern if there's an obvious home, otherwise an in-place adapter is fine for this iteration. - Subscribe the notifier to the same
ServerEventbroadcast that drives SSE (AppState::sse_sender()), so we don't grow a second event bus. - Emit notifications for at least:
- Peer connected / disconnected
- Conflict created (depends on / aligns with the conflicts GUI issue)
- Sync directory added / removed
- Opt-in via
config.toml. Default is off. Per-event-class toggles would be nice but a singlenotifications.enabled = trueis acceptable for this iteration. - Failures to display a notification must not crash or block the synchronizer — log at
warnand move on.
Out of scope
- A system tray / menu-bar icon (separate, larger issue)
- Notification actions (''click to open GUI'') — nice to have, but optional for this iteration
- Aggregating notification storms (revisit if it turns out to be annoying)
Acceptance criteria
- With
notifications.enabled = true, connecting a peer on another device fires a desktop notification - With notifications disabled (default), no notifications fire even when events occur
- The notifier never blocks
ServerEventpropagation to the GUI - Linux (libnotify) verified; macOS / Windows ''best-effort'' is acceptable for now if the crate covers them