Skip to content

Display content type filter and cartoon indicator (#1221)#1223

Merged
realproject7 merged 2 commits into
mainfrom
task/1221-content-type-display
May 17, 2026
Merged

Display content type filter and cartoon indicator (#1221)#1223
realproject7 merged 2 commits into
mainfrom
task/1221-content-type-display

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Adds All/Fiction/Cartoon segmented content type filter on discover page (both desktop pills and mobile filter sheet)
  • Persists content type preference in localStorage, consistent with existing lang/nsfw prefs
  • Filters pass through to all query paths: new (Supabase), trending, and mcap (ranking lib)
  • Replaces crowded text "Cartoon" badge on story cards with a compact comic-panel SVG icon (bottom-left)
  • Fiction stories show no indicator (per spec)
  • Story detail page CARTOON tag already present from Add content_type support for fiction vs cartoon stories #1212

Test plan

  • All 62 tests pass (updated for new prop + icon indicator)
  • Typecheck clean
  • Lint: 0 errors
  • Visual check: content type pills render on desktop filter bar
  • Visual check: mobile filter sheet shows Type selector
  • Visual check: filtering by Cartoon shows only cartoon stories
  • Visual check: comic-panel icon visible on cartoon story cards

🤖 Generated with Claude Code

#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>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored May 17, 2026 0:40am

Request Review

Copy link
Copy Markdown
Owner Author

@realproject7 realproject7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 type follows 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.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_type overwrites explicit ?type= filters on initial load.
    • File: src/components/FilterBar.tsx:191
    • Suggestion: Treat type the same way lang and nsfw are treated: if the URL already has type, do not restore the saved content type over it. Ideally also validate the saved value before passing it into buildHref.

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>
Copy link
Copy Markdown
Owner Author

@realproject7 realproject7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@realproject7 realproject7 merged commit 44c6716 into main May 17, 2026
4 checks passed
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