Skip to content

feat(dashboard): LAN browser push notifications for mesh alerts#77

Open
iceice400 wants to merge 1 commit into
KMX415:mainfrom
iceice400:feat/lan-push-notifications
Open

feat(dashboard): LAN browser push notifications for mesh alerts#77
iceice400 wants to merge 1 commit into
KMX415:mainfrom
iceice400:feat/lan-push-notifications

Conversation

@iceice400

Copy link
Copy Markdown
Contributor

Summary

  • Add backend AlertEmitter that broadcasts additive WebSocket type: alert messages for node offline (2h threshold), node back online, and low battery (<=20%, 1h cooldown per node).
  • Add service worker, push_notifications.js prefs module, and Settings > System UI with per-event toggles and optional suppress-when-focused behavior.
  • Document browser notification setup in docs/CONFIGURATION.md; 8 unit tests in tests/test_alert_emitter.py.

Storm-guard alert kind is wired in the UI but inactive until PR 12 ships.

Test plan

  • python -m unittest tests.test_alert_emitter -v (8 passed)
  • Enable notifications in Settings > System, grant permission in Chromium/Firefox
  • Confirm no alerts when disabled; packet WS stream unchanged
  • Confirm suppress-when-focused hides toasts on active tab
  • Simulate low-battery telemetry and offline transition on live mesh

AI disclosure

Implemented with Cursor AI assistance; reviewed and tested locally.

Emit additive WebSocket alert events for node offline/online and low battery. Add service worker, localStorage preferences UI on Settings > System, and unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant