Skip to content

feat(notifications): tabbed inbox with parent-cast context - #20

Merged
arcabotai merged 1 commit into
mainfrom
feat/tabbed-notifications
Jun 25, 2026
Merged

arcabotai merged 1 commit into
mainfrom
feat/tabbed-notifications

Conversation

@felirami

Copy link
Copy Markdown
Collaborator

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

  • Six tabs — All / Replies / Mentions / Likes / Recasts / Follows — each filtering by Neynar notification type. Jump straight to the type you care about.
  • Parent-cast context — reply and mention notifications now show the cast they're responding to, inline (compact, clickable preview), so you read a reply without losing the thread.

How

  • GET /api/notifications: generalized the legacy mode (all/mentions) param into a type filter (replies|mentions|likes|recasts|follows, comma-ok). mode still works (backward-compatible); invalid types → 400.
  • NotificationsProvider: a NotificationTab type + 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).
  • New ParentCastPreview: fetches the parent via the existing /api/cast/single, cached by react-query (30-min stale), rendered in ReplyNotification + MentionNotification only when the cast has a parent_hash; renders nothing if the parent can't load (deleted/not-found).

Verification

  • npm run typecheck ✅, npm run build ✅.
  • Read-only feature (no mutation) — tab filtering + parent context verified on the live deploy with real notifications.

Deliberately matches herocast's tab set (it folds quotes into All); no new API keys or cost (reuses existing Neynar notifications + single-cast endpoints).

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).
@vercel

vercel Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
castora Ready Ready Preview, Comment Jun 25, 2026 12:41am

@arcabotai
arcabotai merged commit 1e3ae83 into main Jun 25, 2026
6 checks passed

This branch was successfully deployed

1 active deployment
Preview — 1713e18a Deployed Jun 25, 2026 by vercel[bot]
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.

2 participants