feat(notifications): wire the bell to a /notifications screen#296
Merged
Conversation
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>
Deploying chinmaya-janata with
|
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The notification bell (
TabHeaderaction="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), theNotificationCenterUI andnotificationServiceall exist. Only the frontend route was missing.Changes
app/notifications.tsx—StackHeader(themed back button + title) +<NotificationCenter showHeader={false} />. Notification taps deep-link toactionUrlwhen present.app/_layout.tsx, one line).NotificationCenter+NotificationItem— they hardcoded light colors (#fff, iOS-blue#007AFF), so they'd render a white panel in the dark app. Now useuseColors()→ match light/dark and use the brand orange.NotificationCentergains ashowHeaderprop so the route'sStackHeadersupplies the title without a duplicate.Scope
v2(sits on top of merged feat(nav): move profile to top-right avatar, 3-tab native nav #291). No dependency on other branches.expo-notificationsnot installed; schema'spush_enabledflagged "future") — left as separate, larger work.TabHeader) — noted as a follow-up.Verification
tsc --noEmit: 0 errors in the changed files (6 pre-existing baseline errors elsewhere, unrelated).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