Skip to content

feat(notifications): wire the bell to a /notifications screen#296

Merged
KishParikh13 merged 1 commit into
v2from
feat/v2-notifications-route
May 29, 2026
Merged

feat(notifications): wire the bell to a /notifications screen#296
KishParikh13 merged 1 commit into
v2from
feat/v2-notifications-route

Conversation

@KishParikh13

Copy link
Copy Markdown
Collaborator

What

The notification bell (TabHeader action="notifications") pushes to /notifications, but that route didn't exist — taps fell through to +not-found. This connects the already-built pieces so the bell actually works.

Found during review of #291 (which placed the bell next to the new profile avatar on the home header): notifications was ~80% built — backend API (packages/backend/src/app.ts:2440+), D1 schema (migrations/0005_notifications.sql), the NotificationCenter UI and notificationService all exist. Only the frontend route was missing.

Changes

  • New app/notifications.tsxStackHeader (themed back button + title) + <NotificationCenter showHeader={false} />. Notification taps deep-link to actionUrl when present.
  • Register the route in the root Stack (app/_layout.tsx, one line).
  • Theme NotificationCenter + NotificationItem — they hardcoded light colors (#fff, iOS-blue #007AFF), so they'd render a white panel in the dark app. Now use useColors() → match light/dark and use the brand orange.
  • NotificationCenter gains a showHeader prop so the route's StackHeader supplies the title without a duplicate.

Scope

  • Independent PR off v2 (sits on top of merged feat(nav): move profile to top-right avatar, 3-tab native nav #291). No dependency on other branches.
  • In-app notifications only. Push (APNs/FCM) is unbuilt (expo-notifications not installed; schema's push_enabled flagged "future") — left as separate, larger work.
  • Unread badge/dot on the bell itself is not included (would need an unread-count fetch in TabHeader) — noted as a follow-up.

Verification

  • tsc --noEmit: 0 errors in the changed files (6 pre-existing baseline errors elsewhere, unrelated).
  • ⚠️ Not yet simulator-smoke-tested (sandbox couldn't complete npm install). Recommend confirming: bell opens the screen, back works, empty state reads "No notifications yet" in dark mode, All/Unread filters toggle.

🤖 Generated with Claude Code

The notification bell in TabHeader pushes to /notifications, but no such
route existed — it fell through to +not-found. The backend API, D1 schema
and the NotificationCenter UI were already built; this connects them.

- Add app/notifications.tsx: StackHeader (back + title) + NotificationCenter
- Register the route in the root Stack (app/_layout.tsx)
- Theme NotificationCenter + NotificationItem via useColors (they hardcoded
  light #fff / iOS-blue #007AFF; now match light/dark + brand orange and no
  longer render a white panel in dark mode)
- NotificationCenter gains a `showHeader` prop so the route's StackHeader
  supplies the title without a duplicate

In-app notifications only. Push (APNs/FCM) remains future work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying chinmaya-janata with  Cloudflare Pages  Cloudflare Pages

Latest commit: c95735a
Status: ✅  Deploy successful!
Preview URL: https://1d50a16a.project-janatha.pages.dev
Branch Preview URL: https://feat-v2-notifications-route.project-janatha.pages.dev

View logs

@KishParikh13 KishParikh13 merged commit 4d316d7 into v2 May 29, 2026
1 check passed
@KishParikh13 KishParikh13 deleted the feat/v2-notifications-route branch June 3, 2026 14:56
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