Backend: playout reset-all endpoint + reset-mode reconciliation #110

Closed
opened 2026-07-02 19:44:03 +02:00 by timothy · 2 comments
Owner

From the ChicoryTV plan audit (epic #59, 2026-07-02).

Two gaps behind the Playouts screen's reset actions (#87):

  1. No reset-all: the internal ResetAllPlayouts command exists (Blazor-only); the prototype's header "Reset All" button has no endpoint. Add POST /api/playouts/reset-all.
  2. Mode mismatch: POST /api/channels/{channelNumber}/playout/reset hardcodes PlayoutBuildMode.Reset, but Blazor uses Refresh for classic playouts (Playouts.razor) — the REST semantics differ from the UI it replaces. Expose the mode as a parameter or branch by ScheduleKind.

Soft-blocks #87. Effort: S.

From the ChicoryTV plan audit (epic #59, 2026-07-02). Two gaps behind the Playouts screen's reset actions (#87): 1. **No reset-all**: the internal `ResetAllPlayouts` command exists (Blazor-only); the prototype's header "Reset All" button has no endpoint. Add `POST /api/playouts/reset-all`. 2. **Mode mismatch**: `POST /api/channels/{channelNumber}/playout/reset` hardcodes `PlayoutBuildMode.Reset`, but Blazor uses `Refresh` for classic playouts (`Playouts.razor`) — the REST semantics differ from the UI it replaces. Expose the mode as a parameter or branch by ScheduleKind. Soft-blocks #87. Effort: S.
timothy added the enhancementapi labels 2026-07-02 19:44:03 +02:00
Author
Owner

Working on this via branch feat/playouts-read-api. Recon of WIP 49a6d4ee: POST /api/playouts/reset-all (202 Accepted → ResetAllPlayouts) is implemented, and ChannelController.ResetPlayout gained an optional mode param defaulting per ScheduleKind (Classic→Refresh, others→Reset), matching Playouts.razor behavior. Looks correct; verifying via build/tests and adversarial review before the PR.

Working on this via branch `feat/playouts-read-api`. Recon of WIP 49a6d4ee: POST /api/playouts/reset-all (202 Accepted → ResetAllPlayouts) is implemented, and ChannelController.ResetPlayout gained an optional mode param defaulting per ScheduleKind (Classic→Refresh, others→Reset), matching Playouts.razor behavior. Looks correct; verifying via build/tests and adversarial review before the PR.
Author
Owner

Closed via PR #116. POST /api/playouts/reset-all (202 Accepted → ResetAllPlayouts, Name=ResetAllPlayouts) and POST /api/channels/{channelNumber}/playout/reset gained an optional mode param defaulting per ScheduleKind: Classic→Refresh, others→Reset — byte-for-byte the Playouts.razor behavior; explicit mode skips the playout lookup. New ChannelControllerTests cover Classic/Block/Sequential defaulting (asserted by reading BuildPlayout off the worker channel) plus explicit-mode override. Merged via PR #116 (commit 20ca71b3, squashed from salvaged WIP 49a6d4ee, rebased onto main). Build 0 errors; TZ=UTC tests 289/289 green; OpenAPI regenerated via scripts/update-openapi.sh. Adversarial (fable) review verdict FIX-FIRST → fixed before merge: DTO files lacked #nullable enable so the spec wrongly documented buildStatus/scheduleFile as non-nullable (would have broken SPA typegen).

**Closed via PR #116.** POST /api/playouts/reset-all (202 Accepted → ResetAllPlayouts, Name=ResetAllPlayouts) and POST /api/channels/{channelNumber}/playout/reset gained an optional mode param defaulting per ScheduleKind: Classic→Refresh, others→Reset — byte-for-byte the Playouts.razor behavior; explicit mode skips the playout lookup. New ChannelControllerTests cover Classic/Block/Sequential defaulting (asserted by reading BuildPlayout off the worker channel) plus explicit-mode override. Merged via PR #116 (commit 20ca71b3, squashed from salvaged WIP 49a6d4ee, rebased onto main). Build 0 errors; TZ=UTC tests 289/289 green; OpenAPI regenerated via scripts/update-openapi.sh. Adversarial (fable) review verdict FIX-FIRST → fixed before merge: DTO files lacked #nullable enable so the spec wrongly documented buildStatus/scheduleFile as non-nullable (would have broken SPA typegen).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: timothy/ersatztv#110