Skip to content

feat(ui): bring adult-hidden-by-default and category tabs to the TUI - #110

Merged
WarlaxZ merged 2 commits into
mainfrom
feat/saved-category-tabs-tui
Sep 2, 2026
Merged

WarlaxZ merged 2 commits into
mainfrom
feat/saved-category-tabs-tui

Conversation

@WarlaxZ

@WarlaxZ WarlaxZ commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up to #109 (core + web) — stacked on that branch since it needs the adultHistoryVisible config field and the categoryForSource/visibleWithAdultHistory/nonEmptyCategories registry helpers it introduces. Base this against main once #109 merges, or merge #109 first.

  • Adult items are filtered out of the Store's favourites/streamHistory fields in App.tsx (one choke point), gated by the same adultHistoryVisible setting — Favourites and Continue Watching never see them when it's off, matching the web UI's guarantee.
  • Both panes gain category tabs, cycled with [ / ] (the only free key pair in both panes' existing bindings — arrows/j/k/Return/x, plus r/s in Continue Watching).
  • New "Adult history" toggle row in the Settings pane, right after "Adult screenshots".
  • testHarness.ts and render-previews-impl.tsx get the matching Store field per this repo's CLAUDE.md rule; preview/settings.svg regenerated to match (left browse.svg/help.svg untouched — their diffs on a npm run previews run were unrelated pre-existing drift from an o keybinding, not this change).

Test plan

  • npm test — 3344 tests pass, including new Favourites.test.tsx (no test file existed for this component before) and new tab-cycling tests in ContinueWatching.test.tsx/Settings.test.tsx
  • npm run typecheck
  • npm run lint — only the pre-existing react-hooks/exhaustive-deps warning
  • npm run build
  • npm run previews — regenerated preview/settings.svg shows the new "Adult history" row rendering correctly

🤖 Generated with Claude Code

ashalliants and others added 2 commits September 2, 2026 10:06
…, 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
Follow-up to the web PR: the TUI's Favourites and Continue Watching panes
get the same treatment. Adult items are filtered out of the Store's
favourites/streamHistory fields in App.tsx (gated by the adultHistoryVisible
setting added in the core+web PR), so neither pane ever sees them when the
setting is off — same guarantee as the web wire. Both panes also gain
category tabs (cycled with [ and ]), reusing categoryForSource/
nonEmptyCategories from src/sources/registry.ts rather than re-deriving
categories locally.

- src/ui/store.ts, App.tsx: adultHistoryVisible store field + toggle action,
  and the one filtering choke-point for both lists.
- src/ui/components/Favourites.tsx, ContinueWatching.tsx: category tab strip,
  [ / ] to cycle (the only free key pair in both panes' existing bindings).
- src/ui/components/Settings.tsx: "Adult history" toggle row, after "Adult
  screenshots".
- src/ui/testHarness.ts, scripts/render-previews-impl.tsx: matching Store
  field per this repo's CLAUDE.md rule; preview/settings.svg regenerated to
  match (browse.svg/help.svg left untouched — their diffs were unrelated
  pre-existing drift from an "o" keybinding, not this change).
- New Favourites.test.tsx (no test file existed before) plus tab-cycling
  tests in ContinueWatching.test.tsx and the new toggle row in
  Settings.test.tsx.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XddtC9qHvnPLb4xp9fiL7n
Base automatically changed from feat/saved-category-tabs-core-web to main September 2, 2026 09:43
@WarlaxZ
WarlaxZ merged commit 21edd7d into main Sep 2, 2026
6 checks passed
@WarlaxZ
WarlaxZ deleted the feat/saved-category-tabs-tui branch September 2, 2026 09:43
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