openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

[Feature] Native macOS notifications + in-app notification center

Open graycyrus opened this issue 7 months ago • 2 comments

Summary

Add native OS-level push notifications (macOS first) and a unified in-app notification center so users see real-time alerts for messages, skill events, agent completions, and other activity — both as system banners and in a dedicated notification screen within the app.

Problem

Today the app has no OS-level notifications and no persistent notification history. Users must keep the app in the foreground to know when something happens. The only notification-like UI is ephemeral toasts (Intelligence page) and error report popups — none of which persist, none fire when the app is in the background/minimized, and there's no unified place to review past notifications. This is especially painful for a community platform where timely awareness of messages, agent results, and skill events matters.

Current gaps:

  • No tauri-plugin-notification installed (not in Cargo.toml or capabilities)
  • No notification Redux slice or persistent storage
  • No /notifications route or notification center UI
  • No notification permissions flow
  • Toast notifications are component-local and ephemeral

Solution

Phase 1 — Native OS notifications (macOS)

  • Install and configure tauri-plugin-notification (Tauri v2)
  • Add notification permissions to capabilities/default.json
  • Add a Rust notification service that can fire native notifications from the core process
  • Permission request flow on first launch / from settings
  • Fire native notifications for: new messages, agent task completions, skill sync events, channel activity
  • Clicking a notification should focus the app window and navigate to the relevant context

Phase 2 — In-app notification center

  • Add a notificationSlice to Redux store with persistent storage
  • Create a /notifications route and Notification Center page/panel
  • Unified notification model: type, title, body, timestamp, read/unread, deep-link target
  • Notification bell icon in the nav bar with unread badge count
  • Mark as read (individual + mark all read)
  • Notification preferences in Settings (per-category toggles: messages, agents, skills, system)

Phase 3 — Cross-platform & channels

  • Extend to Windows/Linux native notifications
  • Notification grouping/stacking for high-volume events
  • Do Not Disturb / quiet hours support
  • Sound customization

Acceptance criteria

  • [ ] Native macOS notifications — tauri-plugin-notification installed, permissions requested, notifications fire for key events (messages, agent completions, skill events)
  • [ ] Click-to-navigate — Clicking a native notification focuses the app and navigates to the relevant screen/thread
  • [ ] Notification center UI — Dedicated in-app screen listing all notifications with read/unread state, timestamps, and deep-link navigation
  • [ ] Unread badge — Nav bar icon shows unread notification count
  • [ ] Notification preferences — Settings panel to toggle notification categories on/off
  • [ ] Persistence — Notifications survive app restart (Redux persist or local DB)
  • [ ] Background support — Notifications fire even when the app window is hidden/minimized to tray

Related

  • macOS background execution / tray support is already implemented (see 16-macos-background-execution.md)
  • Tauri notification plugin docs: https://tauri.app/plugin/notification/
  • Current toast system: app/src/components/Toast.tsx
  • Error notification system: app/src/components/ErrorReportNotification.tsx

graycyrus avatar Apr 07 '26 06:04 graycyrus

Still valid? @graycyrus

Al629176 avatar Apr 20 '26 08:04 Al629176

Phase 1a landed in #741 (webview notifications end-to-end) — native notifications now fire from embedded webview apps.

Remaining scope for this issue:

  • Core-side native notifications for messages, agent completions, skill sync events (not just webview)
  • /notifications route + in-app notification center UI
  • Redux notificationSlice with persistence
  • Unread badge on nav
  • Per-category preference toggles in Settings
  • Click-to-navigate from native banner to relevant in-app context

Picking this up now — will split into PRs per surface so review stays tight.

jwalin-shah avatar Apr 22 '26 07:04 jwalin-shah