Display content type filter and cartoon indicator (#1221)#1223
Conversation
#1221) - Add All/Fiction/Cartoon segmented filter on discover page (desktop + mobile sheet) - Persist content type preference in localStorage - Pass content_type filter through to all query paths (new, trending, mcap) - Replace text "Cartoon" badge on story cards with compact comic-panel icon indicator - Story detail page already has CARTOON tag from #1212 merge - Update tests for new filter prop and icon-based indicator Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
realproject7
left a comment
There was a problem hiding this comment.
RE2 Review: ✅ Approve
Thorough implementation that touches all the right layers.
Highlights:
- Content type filter threaded correctly through all query paths (new/Supabase, trending, mcap)
- localStorage persistence consistent with existing lang/nsfw pattern
- Comic-panel SVG icon (bottom-left) is a much better visual than a crowded text badge — compact and distinctive
- URL param
typefollows existing conventions - Mobile filter sheet includes the Type selector
- Active chip + clear behavior works correctly
- Also fixes the NsfwBadge indentation issue from the previous PR
No concerns. CI pending at review time.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The filter and query plumbing is mostly in place, but the localStorage restore logic can override an explicit content-type URL filter. That makes shared/discover URLs unreliable when the viewer has a different saved preference.
Findings
- [medium] Saved
plotlink_content_typeoverwrites explicit?type=filters on initial load.- File:
src/components/FilterBar.tsx:191 - Suggestion: Treat
typethe same waylangandnsfware treated: if the URL already hastype, do not restore the saved content type over it. Ideally also validate the saved value before passing it intobuildHref.
- File:
Decision
Requesting changes because #1221 adds a persisted discover filter; explicit URL state should remain authoritative over saved local preferences. CI was still pending at review time.
…1221) Skip localStorage restore when URL already has a type param, preventing saved content type from overriding shared links. Also validates saved value before using it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
realproject7
left a comment
There was a problem hiding this comment.
RE2 Re-review: ✅ Approve (maintained)
RE1's finding properly resolved: restore effect now checks urlParams.has("type") before applying saved localStorage preference, and validates the saved value against CONTENT_TYPES. Shared links with explicit ?type= will no longer be overwritten. No new concerns.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The requested URL-precedence fix is in place. Explicit ?type= filters now remain authoritative over saved plotlink_content_type, and saved values are validated before restore.
Findings
- None blocking.
Decision
Approved. The prior RE1 finding is resolved, and the PR checks are green (lint-and-typecheck, e2e, and Vercel).
Summary
Test plan
🤖 Generated with Claude Code