Overview
The codebase has hooks/use-notifications.ts and live GraphQL subscriptions in hooks/use-bounty-subscription.ts that already collect events for bountyCreated, bountyUpdated, application reviews, and submission status changes. But there is no surfaced UI; events are stored in localStorage and never shown to the user. Build a notification center so users can actually see and act on these events.
Goals
- Provide a notification bell in the global navbar with unread count badge
- Open a dropdown/panel listing recent notifications
- Allow mark-as-read, mark-all-as-read, and clear-all
- Link each notification to the relevant resource (bounty, dispute, profile)
- Persist read state in localStorage (already partially set up)
Implementation Details
1. Notification bell component
Create: components/notifications/notification-bell.tsx
- Shows a bell icon with an unread count badge in the navbar
- Click opens a
Popover or Sheet with the notification list
- Connects to
useNotifications()
2. Notification list and item
Create: components/notifications/notification-list.tsx, components/notifications/notification-item.tsx
- Item shows icon (per notification type), title, timestamp, and link
- Unread items have a visual marker
- Click marks as read and navigates to the linked resource
3. Wire into navbar
Modify: components/global-navbar.tsx
- Mount
NotificationBell next to the wallet button (only when authenticated)
4. Notification types to support
bounty-updated → link to /bounty/[id]
new-application → link to /bounty/[id] (creator only)
submission-reviewed → link to /bounty/[id] (contributor only)
dispute-raised → link to /dispute/[id] (creator and contributor)
payment-received → link to /wallet
Files Affected
Created
components/notifications/notification-bell.tsx
components/notifications/notification-list.tsx
components/notifications/notification-item.tsx
Modified
components/global-navbar.tsx
hooks/use-notifications.ts (extend to cover dispute and payment events)
Acceptance Criteria
Additional Notes
- Keep the panel max height bounded with internal scroll
- Consider grouping by date (Today, Yesterday, Earlier)
- Subscription events should push into the same store consumed by the UI
Overview
The codebase has
hooks/use-notifications.tsand live GraphQL subscriptions inhooks/use-bounty-subscription.tsthat already collect events forbountyCreated,bountyUpdated, application reviews, and submission status changes. But there is no surfaced UI; events are stored in localStorage and never shown to the user. Build a notification center so users can actually see and act on these events.Goals
Implementation Details
1. Notification bell component
Create:
components/notifications/notification-bell.tsxPopoverorSheetwith the notification listuseNotifications()2. Notification list and item
Create:
components/notifications/notification-list.tsx,components/notifications/notification-item.tsx3. Wire into navbar
Modify:
components/global-navbar.tsxNotificationBellnext to the wallet button (only when authenticated)4. Notification types to support
bounty-updated→ link to/bounty/[id]new-application→ link to/bounty/[id](creator only)submission-reviewed→ link to/bounty/[id](contributor only)dispute-raised→ link to/dispute/[id](creator and contributor)payment-received→ link to/walletFiles Affected
Created
components/notifications/notification-bell.tsxcomponents/notifications/notification-list.tsxcomponents/notifications/notification-item.tsxModified
components/global-navbar.tsxhooks/use-notifications.ts(extend to cover dispute and payment events)Acceptance Criteria
Additional Notes