feat(web): hide adult items from Library/Continue Watching by default, add category tabs - #109
Merged
Merged
Conversation
…, add category tabs Adult-sourced favourites and stream-history items used to stay visible forever once saved, regardless of the search-time adultContent setting — browsing the Porn category left Continue Watching full of adult items with no way to hide them. A new independent adultHistoryVisible setting (default off) now gates them out entirely server-side, and while we're splitting the lists at all, Library and Continue Watching both gain general category tabs (Movies/TV/Anime/etc, derived from each item's source) rather than a single flat list. - src/sources/registry.ts: categoryForSource/isAdultSource/ visibleWithAdultHistory/nonEmptyCategories — the shared classification and filtering helpers, reused by the TUI in a follow-up PR. - src/config/config.ts: adultHistoryVisible config field + resolver + sanitiseSettingsPatch entry. - src/web/wire.ts, routes.ts: PublicFavourite/PublicStreamHistoryItem gain a server-computed `category`; SavedResponse/LibraryResponse/ ContinueWatchingResponse gain non-empty tab lists; savedLists/libraryAction/ continueWatchingAction filter adult items out of every response when the setting is off, so they never reach the browser at all. - src/web/static/savedModel.ts, app.ts, settingsModel.ts, index.html: tab strips for both lists, driven by the server-provided category lists, plus the new "Adult history" toggle in the settings dialog. Verified manually via serve --web: toggling the setting live updates the tab strips and their data with no page reload. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XddtC9qHvnPLb4xp9fiL7n
5 tasks
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.
Summary
adultContentsetting only ever gated search-time results).adultHistoryVisiblesetting (default off) that excludes adult items from Library and Continue Watching entirely, server-side — they are never even sent to the browser when it's off.source), rather than one flat list. The Porn tab only appears once the new setting is on.Test plan
npm test— 3334 tests passnpm run typechecknpm run lint— only the pre-existingreact-hooks/exhaustive-depswarningnpm run buildserve --web:GET /api/savedexcludes adult items/tabs entirely with the setting off, includes them with it on; toggling "Adult history" in the settings dialog live-updates both tab strips with no page reload; clicking a category tab filters rows client-side with no refetch.🤖 Generated with Claude Code