feat(notifications): in-app notification center (Phase 1b of #395)#769
Conversation
…nsai#395) Adds persistent notification center that captures events from the existing webview notification surface shipped in tinyhumansai#741. - notificationSlice (Redux + redux-persist) with categories + preferences - /notifications route + Notification Center page (read/unread, click-to-navigate, mark all, clear) - Bell tab in BottomTabBar with unread badge - NotificationsPanel in Settings → Features for per-category toggles (messages/agents/skills/system) - Webview notification handler dispatches into the center in addition to bumping account unread - Tests: 7 reducer cases covering prepend, preference gating, read flips, cap, unread count Next: PR B wires core-side native banners for agent/skill/channel events (tauri-plugin-notification).
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR introduces a comprehensive in-app notifications feature, adding a Redux-persisted notification slice with category preferences, a protected Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant WebviewService as Webview Service
participant Redux as Redux Store
participant UI as Notifications UI
User->>WebviewService: Native notification fires
WebviewService->>Redux: notificationReceived action<br/>(with id, category, timestamp)
Redux->>Redux: Prepend to items list<br/>(if category enabled)
Redux->>Redux: Truncate to 200 items max
Redux->>UI: Selector triggers re-render
UI->>User: Display notification in list<br/>(with unread indicator)
User->>UI: Click unread notification
UI->>Redux: markRead action
Redux->>Redux: Update item.read = true
UI->>User: Remove unread styling<br/>Navigate to deepLink
sequenceDiagram
participant User
participant BottomBar as Bottom Tab Bar
participant NotifPage as Notifications Page
participant Redux as Redux Store
User->>Redux: Navigate to /notifications
Redux->>BottomBar: Badge renders unread count
BottomBar->>User: Show badge (capped at 9+)
User->>NotifPage: View notifications page
NotifPage->>Redux: selectUnreadCount selector
Redux->>NotifPage: Return unread count
NotifPage->>User: Display list with read/unread states
User->>NotifPage: Click "Mark all as read"
NotifPage->>Redux: markAllRead action
Redux->>Redux: Set all items.read = true
Redux->>BottomBar: Badge count updates to 0
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ore and routing panel - notificationSlice (PR) persisted as `notifications` key; notificationsSlice (main) mounted as `integrationNotifications` so both coexist without Redux key collision - NotificationCenter updated to read from `integrationNotifications` - NotificationsPanel: PR category-toggle version kept; DND toggle from main merged in - Notifications.tsx: PR full-page local notification center retained - Settings.tsx: both `/notifications` and `/notification-routing` routes wired
…nsai#395) (tinyhumansai#769) Co-authored-by: Jwalin Shah <jshah1331@gmail.com> Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
Summary
Adds the in-app Notification Center from #395. Phase 7 (#741) shipped native webview notifications (Phase 1a) — this PR mirrors those events into a persistent in-app surface so users have notification history plus preferences.
notificationSlice(Redux Toolkit + redux-persist) with categories and per-category preferences/notificationsroute + Notification Center page (read/unread, timestamps, click-to-navigate, mark-all-read, clear)BottomTabBarwith unread badgeNotificationsPanelin Settings → Features for per-category toggles (messages / agents / skills / system)notificationReceivedinto the center (kept existing per-account unread-badge behavior untouched)Out of scope — follow-up PRs
This is deliberately frontend-only to keep review tight. Next up:
tauri-plugin-notification+DomainEventsubscribers insrc/core/event_bus/Test plan
tsc --noEmitcleaneslintclean/notificationspage empty state + list renderSummary by CodeRabbit
Release Notes
New Features
Tests