ChicoryTV SPA: Schedule editor screen #86

Closed
opened 2026-07-02 01:07:18 +02:00 by timothy · 3 comments
Owner

Recreate design-system/templates/chicorytv-admin/ScheduleEditor.jsx wired to the Schedule API.

Two-pane, drag-to-reorder schedule items + tabbed inspector. Acceptance: matches prototype; live data + reorder persists; all 3 themes.

Recreate `design-system/templates/chicorytv-admin/ScheduleEditor.jsx` wired to the Schedule API. Two-pane, drag-to-reorder schedule items + tabbed inspector. **Acceptance:** matches prototype; live data + reorder persists; all 3 themes.
timothy added the frontend label 2026-07-02 01:07:18 +02:00
timothy added a new dependency 2026-07-02 01:08:41 +02:00
timothy added a new dependency 2026-07-02 01:08:42 +02:00
Author
Owner

Done

What was done: Inspected the schedule API surface in web/src/api/generated/v1.d.ts and the related controllers. Mapped schedule DTOs, item DTO fields/nullability, replace-all/add-item request DTOs, and the picker list endpoints for collections, smart collections, filler presets, and watermarks.

Root cause: n/a

Files changed: none (read-only inspection)

Verification: read-only source inspection only; no tests run.

Deferred: no code changes were made.

Follow-up issues: none identified from this inspection.

Docs updated: n/a

## Done **What was done**: Inspected the schedule API surface in `web/src/api/generated/v1.d.ts` and the related controllers. Mapped schedule DTOs, item DTO fields/nullability, replace-all/add-item request DTOs, and the picker list endpoints for collections, smart collections, filler presets, and watermarks. **Root cause**: n/a **Files changed**: none (read-only inspection) **Verification**: read-only source inspection only; no tests run. **Deferred**: no code changes were made. **Follow-up issues**: none identified from this inspection. **Docs updated**: n/a
Author
Owner

Done

What was done: Implemented the ChicoryTV Schedule editor SPA screen in PR #125: #125

Head SHA: 2e58fa18152829ca13025e2cf16f31e617e7a107
Base: main
CI: green for head SHA; build/test and migration integrity succeeded, image push skipped under PR conditions.

Root cause: n/a

Files changed:

  • web/src/App.tsx
  • web/src/App.test.tsx
  • web/src/api/index.ts
  • web/src/api/schedules.ts
  • web/src/shell.css

Prototype/API mapping:

Prototype surface Endpoint / DTO Scope
Schedule list/header GET /api/schedules, ProgramScheduleViewModel In scope
Schedule item list GET /api/schedules/{id}/items, ProgramScheduleItemsWithDurationViewModel, ProgramScheduleItemViewModel In scope
Drag + keyboard reorder PUT /api/schedules/{id}/items, ReplaceScheduleItemsRequest, ScheduleItemRequest In scope
Add collection-backed item POST /api/schedules/{id}/items, ScheduleItemRequest In scope, conservative first-collection default
Delete item DELETE /api/schedules/{id}/items/{itemId} In scope
Collection picker GET /api/collections, MediaCollectionViewModel In scope
Smart collection picker GET /api/smart-collections, SmartCollectionViewModel In scope
Filler presets GET /api/filler-presets, FillerPresetResponseModel In scope, client-sorted
Watermarks GET /api/watermarks, WatermarkResponseModel In scope, client-sorted
Duration estimates durationEstimate, totalDurationEstimate from generated schedule DTOs In scope; null renders as unknown
Preferred language fields No languages-list endpoint yet Deferred, disabled controls with note
Schedule CRUD management POST/PUT/DELETE /api/schedules Out of scope for this editor pass
Preview/live playback surface No requested schedule preview endpoint Deferred/out of scope

Verification:

  • cd web && npm ci passed.
  • cd web && npm run lint passed.
  • cd web && npm run typecheck passed.
  • cd web && npm test -- --run passed: 4 files, 50 tests.
  • cd web && npm run build passed.
  • TZ=UTC dotnet build ErsatzTV.sln passed with existing NU1903/CS8604 warnings.
  • TZ=UTC dotnet test ErsatzTV.Tests --no-build passed: 368 tests.
  • TZ=UTC dotnet test ErsatzTV.Core.Tests --no-build passed: 493 passed, 1 skipped.
  • PR CI passed for 2e58fa18152829ca13025e2cf16f31e617e7a107.

Deferred:

  • Languages list remains deferred because the API still has no languages-list endpoint.
  • Multi-collection picker is not wired as a separate selector on this base; existing item values render when present.
  • Schedule CRUD controls are intentionally not implemented here; this screen focuses on item editing/reorder.

Follow-up issues: none created.

Docs updated: n/a; frontend-only screen work with no operational docs impact.

Fable review classification: NITS = Fable may fix on the branch. SUBSTANTIAL = back to Codex, or fixed in-session with subagents and user decides.

Issue left open intentionally because PR #125 is awaiting review/merge.

## Done **What was done**: Implemented the ChicoryTV Schedule editor SPA screen in PR #125: https://gitea.tblindustries.be/timothy/ersatztv/pulls/125 Head SHA: `2e58fa18152829ca13025e2cf16f31e617e7a107` Base: `main` CI: green for head SHA; build/test and migration integrity succeeded, image push skipped under PR conditions. **Root cause**: n/a **Files changed**: - `web/src/App.tsx` - `web/src/App.test.tsx` - `web/src/api/index.ts` - `web/src/api/schedules.ts` - `web/src/shell.css` **Prototype/API mapping**: | Prototype surface | Endpoint / DTO | Scope | | --- | --- | --- | | Schedule list/header | `GET /api/schedules`, `ProgramScheduleViewModel` | In scope | | Schedule item list | `GET /api/schedules/{id}/items`, `ProgramScheduleItemsWithDurationViewModel`, `ProgramScheduleItemViewModel` | In scope | | Drag + keyboard reorder | `PUT /api/schedules/{id}/items`, `ReplaceScheduleItemsRequest`, `ScheduleItemRequest` | In scope | | Add collection-backed item | `POST /api/schedules/{id}/items`, `ScheduleItemRequest` | In scope, conservative first-collection default | | Delete item | `DELETE /api/schedules/{id}/items/{itemId}` | In scope | | Collection picker | `GET /api/collections`, `MediaCollectionViewModel` | In scope | | Smart collection picker | `GET /api/smart-collections`, `SmartCollectionViewModel` | In scope | | Filler presets | `GET /api/filler-presets`, `FillerPresetResponseModel` | In scope, client-sorted | | Watermarks | `GET /api/watermarks`, `WatermarkResponseModel` | In scope, client-sorted | | Duration estimates | `durationEstimate`, `totalDurationEstimate` from generated schedule DTOs | In scope; null renders as unknown | | Preferred language fields | No languages-list endpoint yet | Deferred, disabled controls with note | | Schedule CRUD management | `POST/PUT/DELETE /api/schedules` | Out of scope for this editor pass | | Preview/live playback surface | No requested schedule preview endpoint | Deferred/out of scope | **Verification**: - `cd web && npm ci` passed. - `cd web && npm run lint` passed. - `cd web && npm run typecheck` passed. - `cd web && npm test -- --run` passed: 4 files, 50 tests. - `cd web && npm run build` passed. - `TZ=UTC dotnet build ErsatzTV.sln` passed with existing NU1903/CS8604 warnings. - `TZ=UTC dotnet test ErsatzTV.Tests --no-build` passed: 368 tests. - `TZ=UTC dotnet test ErsatzTV.Core.Tests --no-build` passed: 493 passed, 1 skipped. - PR CI passed for `2e58fa18152829ca13025e2cf16f31e617e7a107`. **Deferred**: - Languages list remains deferred because the API still has no languages-list endpoint. - Multi-collection picker is not wired as a separate selector on this base; existing item values render when present. - Schedule CRUD controls are intentionally not implemented here; this screen focuses on item editing/reorder. **Follow-up issues**: none created. **Docs updated**: n/a; frontend-only screen work with no operational docs impact. **Fable review classification**: NITS = Fable may fix on the branch. SUBSTANTIAL = back to Codex, or fixed in-session with subagents and user decides. Issue left open intentionally because PR #125 is awaiting review/merge.
Author
Owner

Closing — #86 Schedule editor shipped

What was done: ChicoryTV SPA Schedule editor (PR #125, Codex) — two-pane screen on the live Schedule API: item lineup with drag + keyboard reorder persisted via PUT replace-all, 4-tab read-only inspector (Content/Playback/Filler/Overrides), add/delete items, duration estimates (#111, null → "unknown"), pickers for collections/smart-collections/filler-presets/watermarks (client-sorted). Language fields deferred (no languages endpoint, #105 gap) with visible notes.

Fable review (3-lens subagents): approve, no blockers. A suspected reorder blocker (derived-type fields missing from OpenAPI schema) was REFUTED — the backend serializes with Newtonsoft by runtime type so the fields are on the wire; the contract gap is real though → follow-up #126 (flatten items DTO, then drop the SPA's widened type).

All findings fixed pre-merge (f18f2dc0, sonnet+haiku subagents): schedule selector added (previously only the first schedule was reachable); duplicate mount effect removed (screen data fetched once, asserted); collection picker in the add-item flow (was silently using alphabetically-first); reorder reconciles from the PUT response and add/delete refetch items only (pickers no longer refetched per mutation); ref-based double-submit guard; inert Save button removed; Tail filler + Keep-multi-part rows added; aria-current + draggable role description; CSS token fallback fixes; test hygiene (collection fixture, picker-failure test, dead mock branch removed). Final: 52/52 web tests, lint/typecheck/build green, PR CI green.

Merged: PR #125 → main 229f7cc1. 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/schedules.ts, web/src/shell.css.

Deferred: inspector editing (all controls read-only — item property editing is future scope); schedule CRUD; language fields (#105 gap); preview surface. Follow-up created: #126 (OpenAPI polymorphism gap).

Docs: handoff docs/handoffs/chicorytv-issue-queue.md updated with next prompt (#87 Playouts).

## Closing — #86 Schedule editor shipped **What was done**: ChicoryTV SPA Schedule editor (PR #125, Codex) — two-pane screen on the live Schedule API: item lineup with drag + keyboard reorder persisted via PUT replace-all, 4-tab read-only inspector (Content/Playback/Filler/Overrides), add/delete items, duration estimates (#111, null → "unknown"), pickers for collections/smart-collections/filler-presets/watermarks (client-sorted). Language fields deferred (no languages endpoint, #105 gap) with visible notes. **Fable review** (3-lens subagents): approve, no blockers. A suspected reorder blocker (derived-type fields missing from OpenAPI schema) was REFUTED — the backend serializes with Newtonsoft by runtime type so the fields are on the wire; the contract gap is real though → follow-up **#126** (flatten items DTO, then drop the SPA's widened type). **All findings fixed pre-merge** (f18f2dc0, sonnet+haiku subagents): schedule selector added (previously only the first schedule was reachable); duplicate mount effect removed (screen data fetched once, asserted); collection picker in the add-item flow (was silently using alphabetically-first); reorder reconciles from the PUT response and add/delete refetch items only (pickers no longer refetched per mutation); ref-based double-submit guard; inert Save button removed; Tail filler + Keep-multi-part rows added; aria-current + draggable role description; CSS token fallback fixes; test hygiene (collection fixture, picker-failure test, dead mock branch removed). Final: 52/52 web tests, lint/typecheck/build green, PR CI green. **Merged**: PR #125 → main `229f7cc1`. 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/schedules.ts, web/src/shell.css. **Deferred**: inspector editing (all controls read-only — item property editing is future scope); schedule CRUD; language fields (#105 gap); preview surface. Follow-up created: #126 (OpenAPI polymorphism gap). **Docs**: handoff docs/handoffs/chicorytv-issue-queue.md updated with next prompt (#87 Playouts).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: timothy/ersatztv#86