feat(notifications): tabbed inbox with parent-cast context - #20
Merged
Merged
Conversation
Inspired by herocast's inbox. Replaces the two-tab (All/Mentions) notifications with six tabs — All, Replies, Mentions, Likes, Recasts, Follows — each filtering by Neynar notification type, and shows the parent cast inline on reply/mention notifications so you get context without opening the thread. - /api/notifications: generalize the legacy `mode` (all/mentions) param into a `type` filter (replies|mentions|likes|recasts|follows, comma-ok); `mode` still works for backward-compat. - NotificationsProvider: a NotificationTab type + tab->Neynar-type map; sends the type filter and persists the selected tab. - NotificationsFeed: six-tab bar (horizontally scrollable on mobile). - New ParentCastPreview: compact, react-query-cached parent fetch via /api/cast/single, rendered in ReplyNotification + MentionNotification when the cast has a parent_hash; renders nothing if the parent can't load. Verified: typecheck + build green. Tab filtering + parent context verified live on the deploy (read-only; needs real notifications).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
The top-voted pick from the herocast feature comparison. Castora's notifications were a single flat list with an All/Mentions toggle; this brings the herocast-style tabbed inbox plus parent-cast context.
What's new
How
GET /api/notifications: generalized the legacymode(all/mentions) param into atypefilter (replies|mentions|likes|recasts|follows, comma-ok).modestill works (backward-compatible); invalid types → 400.NotificationsProvider: aNotificationTabtype + tab→Neynar-type map; sends the filter, persists the selected tab to localStorage (existing'mentions'value stays valid).NotificationsFeed: a six-tab bar (horizontally scrollable on mobile).ParentCastPreview: fetches the parent via the existing/api/cast/single, cached by react-query (30-min stale), rendered inReplyNotification+MentionNotificationonly when the cast has aparent_hash; renders nothing if the parent can't load (deleted/not-found).Verification
npm run typecheck✅,npm run build✅.Deliberately matches herocast's tab set (it folds quotes into All); no new API keys or cost (reuses existing Neynar notifications + single-cast endpoints).