feat: shared Add-to layer — search + media mutation surface (#208, #209) #216

Merged
timothy merged 13 commits from feat/208-209-add-to into main 2026-07-10 08:19:04 +02:00
Owner

Closes the two remaining search/media #91-phase-(b) gates.

#208 — search screen mutations: result-card drill-in navigation, per-card Add-to menu, screen-level Select mode with add-selection to collection/playlist, query-wide Add All (via new GET /api/search/all-items), Save As Smart Collection dialog.

#209 — media browse/detail mutations: shared Add-to layer (web/src/media/addTo/: AddToCollectionDialog with inline create, AddToPlaylistDialog, AddToScheduleDialog replicating AddProgramScheduleItem.ForMediaItem defaults, SaveAsSmartCollectionDialog, AddToMenu) wired onto browse tiles (+ multi-select w/ select-all-on-page) and all four detail screens; per-show Quick/Deep scan gated to Plex/Jellyfin/Emby; per-episode Media Info + Troubleshoot entries; stale #153/#155 pointer removed; MediaPosterCard gains an actions overlay slot.

API: new POST /api/playlists/{id}/items (wraps existing AddItemsToPlaylist; handler hardened to reject system playlists — a latent Blazor-path gap) and GET /api/search/all-items (wraps QuerySearchIndexAllItems; Blazor two-step Add-All parity). OpenAPI/v1.json, endpoint-index, generated TS types regenerated.

Docs: parity verdict rows #208/#209 → PARITY-OK; decisions.md entry (shared addTo layer, Select-toggle + per-card target-superset deviations); spa-conventions §5c.

Tests: web 469 passed; .NET 974 passed.

🤖 Generated with Claude Code

Closes the two remaining search/media #91-phase-(b) gates. **#208 — search screen mutations**: result-card drill-in navigation, per-card Add-to menu, screen-level Select mode with add-selection to collection/playlist, query-wide Add All (via new `GET /api/search/all-items`), Save As Smart Collection dialog. **#209 — media browse/detail mutations**: shared Add-to layer (`web/src/media/addTo/`: AddToCollectionDialog with inline create, AddToPlaylistDialog, AddToScheduleDialog replicating `AddProgramScheduleItem.ForMediaItem` defaults, SaveAsSmartCollectionDialog, AddToMenu) wired onto browse tiles (+ multi-select w/ select-all-on-page) and all four detail screens; per-show Quick/Deep scan gated to Plex/Jellyfin/Emby; per-episode Media Info + Troubleshoot entries; stale #153/#155 pointer removed; `MediaPosterCard` gains an `actions` overlay slot. **API**: new `POST /api/playlists/{id}/items` (wraps existing `AddItemsToPlaylist`; handler hardened to reject system playlists — a latent Blazor-path gap) and `GET /api/search/all-items` (wraps `QuerySearchIndexAllItems`; Blazor two-step Add-All parity). OpenAPI/v1.json, endpoint-index, generated TS types regenerated. **Docs**: parity verdict rows #208/#209 → PARITY-OK; decisions.md entry (shared addTo layer, Select-toggle + per-card target-superset deviations); spa-conventions §5c. Tests: web 469 passed; .NET 974 passed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
timothy added 10 commits 2026-07-10 00:19:28 +02:00
- POST /api/playlists/{id:int}/items wraps the existing AddItemsToPlaylist
  command (mirrors CollectionController.AddItems); controller pre-checks
  playlist existence for a real 404, and the handler now rejects adds to
  system (generated) playlists, matching the guard already applied to
  rename/delete/replace-items so the Blazor path gets the same protection.
- GET /api/search/all-items wraps the existing QuerySearchIndexAllItems
  query, returning a new SearchResultAllItemsResponseModel (never expose
  the VM directly) so the SPA's shared "add all to collection/playlist"
  component can materialize ids before calling the add endpoints, same
  two-step flow Blazor's Search.razor already uses.
- Show-detail DTO check: ShowDetailResponseModel already exposes
  libraryId, title, and mediaSourceKind (serialized as a string enum via
  the global StringEnumConverter) - no changes needed.

Adds controller tests (route table + per-action) for both endpoints and
regenerates the OpenAPI document, endpoint index, and SPA client types.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
docs: parity verdicts + shared add-to decision entry + spa-conventions §5c (#208 #209)
Build ErsatzTV Image / Build & test (.NET) (pull_request) Failing after 3m15s
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 11s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 9m29s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
a2ed834ef6
timothy added 1 commit 2026-07-10 07:52:30 +02:00
fix(spa): review + E2E fixes — schedule-kind gating, portal body font, system-playlist filter, seasons browse, feedback/UX nits (#208 #209)
Build ErsatzTV Image / Build & test (.NET) (pull_request) Failing after 3m9s
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 11s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 9m47s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
50911eb456
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
timothy added 1 commit 2026-07-10 07:56:36 +02:00
fix(e2e): stale-asset gotcha — rm build wwwroot before copy in e2e-local.sh (+doc)
Build ErsatzTV Image / Build & test (.NET) (pull_request) Failing after 2m45s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Failing after 2s
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 11s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
279052ccd4
timothy added 1 commit 2026-07-10 08:07:27 +02:00
fix(spa): debounce commit must not wipe selection/page when query is unchanged (CI flake + real UX race) (#208 #209)
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 7m55s
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 12s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 10m11s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
9e6ea3567c
timothy merged commit c63cadb834 into main 2026-07-10 08:19:04 +02:00
Sign in to join this conversation.