feat(spa): multi-collection & rerun-collection editor screens (#151, #152) #194

Merged
timothy merged 3 commits from feat/151-152-spa-editors into main 2026-07-08 20:22:01 +02:00
Owner

Closes #151. Closes #152.

Builds the two remaining SPA editor screens on the already-merged REST APIs (/api/multi-collections, /api/rerun-collections from PR #188), completing the last collection-editing parity gaps before #91 phase (b).

Screens

  • MultiCollectionsScreen (/app/multi-collections) — list + in-screen editor. Name + two add-pickers (over getCollections() / getSmartCollections(), already-present options filtered out), items list with a Schedule As Group toggle per item and remove. Per-item playbackOrder fixed to "Chronological" on save (matches MultiCollectionEditor.razor). Delete via ConfirmDialog.
  • RerunCollectionsScreen (/app/rerun-collections) — list + editor. Name, Collection Type select over the 13 REST-supported types (RerunCollectionRequestMapping.IsSupportedSelectionType: Collection/MultiCollection/SmartCollection + TelevisionShow/TelevisionSeason/Artist/Movie/Episode/MusicVideo/OtherVideo/Song/Image/RemoteStream — Playlist excluded, matching the backend), a conditional single-selection picker per type, and type-conditional First-Run / Rerun playback-order selects. Every offered type has a verified working picker.

Conventions followed

  • Custom ctv-* components + lucide-react (Layers/Repeat); mirrors CollectionsScreen dialogs/mutation-runner/error handling and the §3 data-loading pattern.
  • All six App.tsx touch points wired (import, ScreenId, two routes, mediaNavIds, ScreenContent dispatch); nav-label test selectors anchored to avoid the "Collections" substring collision.
  • Added messageFrom{Multi,Rerun}CollectionError helpers; wired both api modules into web/src/api/index.ts.

Tests / docs

  • New: MultiCollectionsScreen.test.tsx, RerunCollectionsScreen.test.tsx, multiCollections.test.ts, rerunCollections.test.ts; App.test.tsx nav coverage. 353 web tests pass, npm run lint + npm run build clean.
  • docs/blazor-route-parity.md: #151/#152 rows → SPA DONE. docs/domain-model.md: multi/rerun rows now point at the new routes.

No backend changes → no OpenAPI regen. Live-E2E of both new screens in progress.

🤖 Generated with Claude Code

Closes #151. Closes #152. Builds the two remaining SPA editor screens on the already-merged REST APIs (`/api/multi-collections`, `/api/rerun-collections` from PR #188), completing the last collection-editing parity gaps before #91 phase (b). ## Screens - **`MultiCollectionsScreen`** (`/app/multi-collections`) — list + in-screen editor. Name + two add-pickers (over `getCollections()` / `getSmartCollections()`, already-present options filtered out), items list with a **Schedule As Group** toggle per item and remove. Per-item `playbackOrder` fixed to `"Chronological"` on save (matches `MultiCollectionEditor.razor`). Delete via `ConfirmDialog`. - **`RerunCollectionsScreen`** (`/app/rerun-collections`) — list + editor. Name, **Collection Type** select over the 13 REST-supported types (`RerunCollectionRequestMapping.IsSupportedSelectionType`: Collection/MultiCollection/SmartCollection + TelevisionShow/TelevisionSeason/Artist/Movie/Episode/MusicVideo/OtherVideo/Song/Image/RemoteStream — **Playlist excluded**, matching the backend), a conditional single-selection picker per type, and type-conditional First-Run / Rerun playback-order selects. Every offered type has a verified working picker. ## Conventions followed - Custom `ctv-*` components + `lucide-react` (`Layers`/`Repeat`); mirrors `CollectionsScreen` dialogs/mutation-runner/error handling and the §3 data-loading pattern. - All six `App.tsx` touch points wired (import, `ScreenId`, two `routes`, `mediaNavIds`, `ScreenContent` dispatch); nav-label test selectors anchored to avoid the "Collections" substring collision. - Added `messageFrom{Multi,Rerun}CollectionError` helpers; wired both api modules into `web/src/api/index.ts`. ## Tests / docs - New: `MultiCollectionsScreen.test.tsx`, `RerunCollectionsScreen.test.tsx`, `multiCollections.test.ts`, `rerunCollections.test.ts`; `App.test.tsx` nav coverage. **353 web tests pass**, `npm run lint` + `npm run build` clean. - `docs/blazor-route-parity.md`: #151/#152 rows → **SPA DONE**. `docs/domain-model.md`: multi/rerun rows now point at the new routes. No backend changes → no OpenAPI regen. Live-E2E of both new screens in progress. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
timothy added 2 commits 2026-07-08 20:03:20 +02:00
Add two React SPA editor screens over the existing REST APIs, retiring the
last two "Classic UI only" media-collection editors.

MultiCollectionsScreen (/app/multi-collections, #151): list + in-screen
editor. Name + a list of manual/smart collection items, each with a
Schedule-As-Group toggle; two add-pickers dedupe already-present entries.
Items save with playbackOrder "Chronological" (matches the Blazor editor).

RerunCollectionsScreen (/app/rerun-collections, #152): list + in-screen
editor. Name, a Collection Type select restricted to the REST-supported
selection set (IsSupportedSelectionType) — Collection/MultiCollection/
SmartCollection plus the media-item types TelevisionShow/TelevisionSeason/
Artist/Movie/Episode/MusicVideo/OtherVideo/Song/Image/RemoteStream (every
one maps to a working LibraryBrowseMediaType picker); Playlist is excluded.
A conditional single-selection picker per type, and First/Rerun playback
order selects with the Blazor type-conditional option sets (reset on type
change).

Both screens toggle list<->editor via local state (mirroring
CollectionsScreen), no sub-path routing. Wired into App.tsx (imports,
ScreenId, routes, mediaNavIds, ScreenContent). Added messageFrom*Error
helpers + type re-export to the api clients.

Tests: multiCollections/rerunCollections api-client param+body tests,
both screen tests (list render, create body, rerun type-switch swaps
picker + order options, delete), and an App.tsx nav-registration test.
Docs: blazor-route-parity.md (rows moved to SPA DONE), domain-model.md.

web verify gate: 353 tests pass, eslint clean, tsc -b + vite build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into feat/151-152-spa-editors
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 4m34s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 4m18s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
72c57be6a2
timothy added 1 commit 2026-07-08 20:16:06 +02:00
fix(spa): preserve out-of-set rerun playback order on edit-load (#152 review)
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 4m54s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 5m1s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
3a260e67f8
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
timothy merged commit 636b680a29 into main 2026-07-08 20:22:01 +02:00
timothy deleted branch feat/151-152-spa-editors 2026-07-08 20:22:01 +02:00
Sign in to join this conversation.