Skip to content

feat(notifications): add in-app notification bell for goals and streaks#411

Open
mallya-m wants to merge 2 commits into
Priyanshu-byte-coder:mainfrom
mallya-m:feat/notification-bell-232
Open

feat(notifications): add in-app notification bell for goals and streaks#411
mallya-m wants to merge 2 commits into
Priyanshu-byte-coder:mainfrom
mallya-m:feat/notification-bell-232

Conversation

@mallya-m
Copy link
Copy Markdown
Contributor

@mallya-m mallya-m commented May 19, 2026

What does this PR do?

Adds a notification bell icon to the dashboard header that shows unread
notification count and a dropdown list of recent notifications.

Related issue

Closes #232

Changes made

  • Created notifications Supabase table with user_id, type, message, read, created_at
  • New GET /api/notifications endpoint — returns 10 most recent + unread count
  • New PATCH /api/notifications endpoint — marks all as read
  • Created NotificationBell.tsx component with bell icon, unread badge, dropdown
  • Polls every 60s for new notifications via setInterval in useEffect
  • Marks all as read when dropdown is opened
  • Added bell to DashboardHeader next to avatar

How to test

  1. Sign in and go to dashboard
  2. Bell icon appears in header next to avatar
  3. Click bell — dropdown opens
  4. Insert a test notification via Supabase SQL editor
  5. Within 60s (or on refresh) badge appears with unread count
  6. Click bell — notifications show, badge clears

Screenshots

Screenshot 2026-05-20 040629 Screenshot 2026-05-20 040607

@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

@mallya-m is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@mallya-m
Copy link
Copy Markdown
Contributor Author

@Priyanshu-byte-coder
Could you please add the gssoc:approved and type:feature labels?
Thank you!

Copy link
Copy Markdown
Owner

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1. Missing migration file — PR description says it created the notifications table but no supabase/migrations/ file is in the diff. The API will throw on every request in any fresh deployment. Include the migration.

2. /notifications page doesn't exist — the "See all notifications" link points to a 404. Remove it or create the page.

3. Unrelated file changesBadgeSection.tsx and CommitTimeChart.tsx are modified with changes unrelated to notifications (removing the Tip box, changing button colors). These belong in separate PRs.

4. Hardcoded text-white on the unread count badge — use text-[var(--accent-foreground)].

5. Missing EOF newlines on route.ts and NotificationBell.tsx.

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.

[FEAT] Add in-app notification bell for goal completions and streak milestones

2 participants