feat(web): collections management screen — manual + smart collections (#140) #156

Merged
timothy merged 1 commits from feat/140-collections-screen into main 2026-07-07 12:54:19 +02:00
Owner

Closes #140 (#91 blocker).

Replaces the /app/collections placeholder with a real collections workspace:

  • Manual collections: list/create/rename/delete + UseCustomPlaybackOrder toggle; item management (add via library-search picker with typed bucket mapping, per-item remove, best-effort item preview).
  • Smart collections: list/create/edit(name+query)/delete with live query preview via /api/library/browse.
  • New web/src/api/collections.ts (+getCollections/getSmartCollections moved from schedules.ts, ScheduleScreen unaffected).

Honest gaps (banner in UI, follow-ups filed): multi/rerun/playlist collections have no API (#151/#152/#153); no endpoint lists a manual collection's items — best-effort collection:"name" search preview covers movies/shows/seasons/artists only (#155); picker can only add those four kinds (browse limitation).

Quality: 174 web tests green post-rebase over #146 (21 new incl. bucket-mapping units); tsc/eslint/build clean. Live E2E: full manual+smart lifecycle via curl against a real server + Playwright pass over the rendered screen (create/list/dialogs, zero console errors), data cleaned up.

🤖 Generated with Claude Code

Closes #140 (#91 blocker). Replaces the /app/collections placeholder with a real collections workspace: - Manual collections: list/create/rename/delete + UseCustomPlaybackOrder toggle; item management (add via library-search picker with typed bucket mapping, per-item remove, best-effort item preview). - Smart collections: list/create/edit(name+query)/delete with live query preview via /api/library/browse. - New `web/src/api/collections.ts` (+`getCollections`/`getSmartCollections` moved from schedules.ts, ScheduleScreen unaffected). Honest gaps (banner in UI, follow-ups filed): multi/rerun/playlist collections have no API (#151/#152/#153); no endpoint lists a manual collection's items — best-effort `collection:"name"` search preview covers movies/shows/seasons/artists only (#155); picker can only add those four kinds (browse limitation). Quality: 174 web tests green post-rebase over #146 (21 new incl. bucket-mapping units); tsc/eslint/build clean. Live E2E: full manual+smart lifecycle via curl against a real server + Playwright pass over the rendered screen (create/list/dialogs, zero console errors), data cleaned up. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
timothy added 1 commit 2026-07-07 12:45:30 +02:00
feat(web): collections management screen for manual + smart collections (#140)
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 4m37s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 3m30s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
5995707c84
Replaces the PlaceholderScreen at /app/collections with a real screen that
covers manual and smart collections, matching the SPA's extracted-screen
pattern (screens/CollectionsScreen.tsx; App.tsx gets only the route branch +
import).

Manual collections: list, create, rename, delete, and a per-row toggle for
UseCustomPlaybackOrder (PUT). Item management: an add-items picker that searches
the library (library/browse) and buckets results into the typed
AddItemsToCollectionRequest, plus per-item remove.

Smart collections: list, create, edit (name + query), delete, with a live
result preview that runs the query through library/browse.

API layer: new api/collections.ts owns the typed CRUD (getCollections/
getSmartCollections moved here from schedules.ts; schedules imports them). Unit
tests cover the client, the add-items bucket mapping, and the screen.

Honest gap: no API endpoint lists a manual collection's items by id. The items
view uses a best-effort collection:"name" Lucene search (movies/shows/seasons/
artists only) behind a prominent note. Multi/rerun/playlist collections are out
of scope (no API) and pointed to the Classic UI. Follow-ups #151/#152/#153.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
timothy merged commit d58deddc48 into main 2026-07-07 12:54:19 +02:00
Sign in to join this conversation.