ChicoryTV SPA: Playouts screen #87
Notifications
Due Date
No due date set.
Blocks
Depends on
#91 ChicoryTV SPA: Blazor → SPA cutover (retire old UI)
timothy/ersatztv
#82 ChicoryTV SPA: app shell (sidebar + top bar + routing)
timothy/ersatztv
#100 Backend: GET /api/playouts (list) endpoint
timothy/ersatztv
#101 Backend: GET /api/playouts/{id}/items endpoint
timothy/ersatztv
Reference: timothy/ersatztv#87
Reference in New Issue
Block a user
Recreate
design-system/templates/chicorytv-admin/Playouts.jsxwired to the Playout API.Now/next monitor (live preview, up-next, timeline strip, upcoming list). Acceptance: matches prototype; live playout data; all 3 themes.
Starting #87 Playouts screen implementation on
feat/87-playoutsfromorigin/main.Prototype to API mapping:
GET /api/playoutspaged responseGET /api/channels/stateGET /api/playouts/{id}/itemspaged responsestart,finish,duration,fillerKind.GET /api/playouts/{id}plus list row build statusGET /api/playouts/warnings/countPOST /api/playouts/reset-allImplementation plan: add a focused
web/src/api/playouts.tshook, wire the/app/playoutsroute into the existing shell patterns, and add tests first for paged handling, mount call-count, state-only polling, selection item fetch, reset success/failure, error/retry, loading, and empty states.Progress update for #87:
Implemented the Playouts screen in
feat/87-playoutsas a frontend-only change.What is wired:
GET /api/playoutsfor the selector rail and total count.GET /api/playouts/{id}for selected playout details.GET /api/playouts/{id}/itemsfor timeline/upcoming items.GET /api/playouts/warnings/countfor the header badge.GET /api/channels/statefor now-playing/on-air metadata, with state-only polling.POST /api/playouts/reset-allbehind confirmation and mutation disable/guard behavior.Scope decisions:
/iptvplayback integration added.Verification run so far:
cd web && npm cinpm run lintcleannpm run typecheckcleannpm test -- --runpassed: 60 testsnpm run buildpassedTZ=UTC dotnet build ErsatzTV.slnpassed with existing NU1903/nullable test warningsTZ=UTC dotnet test ErsatzTV.Tests/ErsatzTV.Tests.csprojpassed: 368 testsTZ=UTC dotnet test ErsatzTV.Core.Tests/ErsatzTV.Core.Tests.csprojpassed: 493 passed, 1 skippedClosing — #87 Playouts monitor shipped
What was done: ChicoryTV SPA Playouts screen (PR #127, Codex) — selector rail (paged GET /api/playouts + search/filter), now-playing hero from the 30s channel-state poll, up-next/timeline/upcoming from GET /api/playouts/{id}/items (fetched on selection, never polled), warnings badge, reset-all with confirm + ref guard. Video preview deferred (metadata-only placeholder, no player dependency); Add Playout deferred.
Fable review (3-lens subagents): NOT mergeable as-is — 2 blocker-class defects + 6 substantials. Highlights: the filler feature was simultaneously wrong and dead (backend always emits fillerKind — real items got a truthy "None" → every real item rendered the Filler badge; meanwhile the client never sent showFiller=true so real filler could never appear; the prototype's Show filler toggle had been silently dropped); undefined
--ctv-surface-1token broke the hero background in all themes; a fetch ran inside a setState updater (StrictMode double-fetch); no responsive collapse for the new grids; several dishonest/missing tests (reset-all failure scenario the backend can't produce, mount-count test absorbing the Dashboard prefetch, untested search/filter, no paging coverage).All findings fixed pre-merge (
c4190e3a, sonnet+haiku subagents; adversarial fork verification: CONFIRMED-GOOD): isFillerItem predicate + Show filler Switch wired to ?showFiller=true + real-wire-value fixtures; baseRef hoist out of the updater + functional channel-state merge; --surface-card per prototype + responsive collapse + fallback fixes; visible disabled Reset/Schedule-reset deferrals; itemsLoading spinners; time-window now-matching; honest tests (mount delta isolation, transport-failure reset test, rail filter, paging "shown of total" label). Final: 63/63 web tests, lint/typecheck/build green, PR CI green.Merged: PR #127 → main
a8dd88ef(branch deleted). Post-merge main run being verified (image job included).Files changed: web/src/App.tsx, web/src/App.test.tsx, web/src/api/index.ts, web/src/api/playouts.ts, web/src/shell.css.
Deferred: live video preview (player integration); Add Playout workflow; per-playout reset (no endpoint — disabled buttons with note); pagination UI (monitor scope; label is now honest about truncation).
Docs: handoff docs/handoffs/chicorytv-issue-queue.md being updated with next prompt (#88 Libraries).