feat(521): migrate decisions.md range A: through #340 decision records to lifecycle schema [decisions-edit]
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -134,6 +134,10 @@ in-file entries.
|
||||
---
|
||||
|
||||
## 2026-06 — REST API wraps existing MediatR handlers 1:1, no service layer
|
||||
`key: api.mediatr-passthrough` · `status: active` · `since: 2026-06` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The REST API is thin controllers over existing MediatR handlers, with no new service/business-logic layer.
|
||||
**Signals:** CQRS passthrough, `Either<BaseError, T>` mapping, handler-level fixes not controller papering · paths: `docs/rest-api.md`, `docs/api-conventions.md` §3 · issues: #2, #172
|
||||
**Mechanics:** `docs/api-conventions.md` §3
|
||||
|
||||
The REST API (#2, `docs/rest-api.md`) is thin controllers over the existing MediatR
|
||||
Create/Update/Delete handlers — no new service/business-logic layer was introduced, since nearly
|
||||
@@ -146,6 +150,10 @@ that depth, to avoid N+1 validation queries — precedent set by the schedules e
|
||||
`docs/api-conventions.md` §3 for the up-to-date statement of this rule.
|
||||
|
||||
## 2026-06 — UI rebuild is a React SPA (ChicoryTV) on the REST API, not a Blazor reskin
|
||||
`key: spa.spa-rebuild-decision` · `status: active` · `since: 2026-06` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The UI is a full React SPA (ChicoryTV) rebuild over the REST API, not a Blazor Server reskin.
|
||||
**Signals:** Blazor removal phases (a)/(b), root-flip, legacy-route redirects · paths: `ErsatzTV/LegacyUiRedirects.cs`, `docs/blazor-route-parity.md` · issues: #59, #91, #148
|
||||
**Mechanics:** `docs/blazor-route-parity.md`
|
||||
|
||||
#59 committed to a full SPA rebuild rather than reskinning Blazor Server pages. Blazor removal is
|
||||
split into two phases under #91: **(a)** root-flip (SPA becomes `/`) + legacy-route redirects —
|
||||
@@ -154,6 +162,10 @@ Blazor removal — gated on every route having an SPA equivalent; tracked route-
|
||||
`docs/blazor-route-parity.md`.
|
||||
|
||||
## 2026-07 — Response DTOs live in `ErsatzTV.Core/Api`, file-scoped `#nullable enable`
|
||||
`key: api.response-dtos` · `status: active` · `since: 2026-07` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** New REST response DTOs live in `ErsatzTV.Core/Api/<Domain>/*ResponseModel.cs` with a file-scoped `#nullable enable` pragma; controllers never expose Application VM types directly.
|
||||
**Signals:** nullable-disabled Core project, ResponseModel mirroring ViewModel shape · paths: `ErsatzTV.Core/Api`, `docs/api-conventions.md` §2 · issues: none cited
|
||||
**Mechanics:** `docs/api-conventions.md` §2
|
||||
|
||||
New REST response DTOs go in `ErsatzTV.Core/Api/<Domain>/*ResponseModel.cs` and mirror the shape of
|
||||
the corresponding Application-layer ViewModel — controllers never expose VM types directly. Because
|
||||
@@ -163,6 +175,10 @@ with an optional member needs its own `#nullable enable` pragma at the top (most
|
||||
there; that's a Core/Api-layer-only convention. Full detail: `docs/api-conventions.md` §2.
|
||||
|
||||
## 2026-07 — PUT-replace list endpoints derive `Index` from array order; alternate-schedules last row = catch-all default
|
||||
`key: api.put-replace-index-order` · `status: active` · `since: 2026-07` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** PUT-replace-the-whole-list endpoints derive each item's `Index` from its request-array position, never a client-supplied field; alternate-schedule/playout-template rows are evaluated in `Index` order with the least-conditional row placed last as the catch-all default.
|
||||
**Signals:** `ReplaceScheduleItemsRequest.ToCommand`, `IAlternateScheduleItem`, first-match-wins · paths: `AlternateScheduleSelector.cs` · issues: #179
|
||||
**Mechanics:** PR #179, `AlternateScheduleSelector.cs`
|
||||
|
||||
For "replace the whole list" endpoints (PUT over a collection — schedule items, template items,
|
||||
etc.), the item's `Index` is derived from its position in the request array, not from a
|
||||
@@ -174,6 +190,10 @@ so it acts as the catch-all default. Established by the alternate-schedules work
|
||||
`AlternateScheduleSelector.cs`).
|
||||
|
||||
## 2026-07 — Templates editor in the SPA is a table, not Blazor's drag-calendar
|
||||
`key: spa.templates-editor-table` · `status: active` · `since: 2026-07` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The SPA templates editor renders day/block assignment as a table, not Blazor's drag-and-drop calendar grid — an accepted, deliberate parity deviation.
|
||||
**Signals:** `TemplateEditor.razor` vs table UI · paths: `/app/templates/{id}` · issues: #173
|
||||
**Mechanics:** PR #173
|
||||
|
||||
The legacy Blazor `TemplateEditor.razor` used a drag-and-drop day-grid calendar UI. The SPA
|
||||
equivalent (`/app/templates/{id}`, PR #173) renders the same day/block assignment as a table
|
||||
@@ -181,6 +201,10 @@ instead. This is an accepted, deliberate parity deviation — don't "fix" it to
|
||||
interaction model without discussing it first.
|
||||
|
||||
## 2026-07-07 — API artwork contract: rooted URLs produced server-side
|
||||
`key: api.artwork-rooted-urls` · `status: active` · `since: 2026-07-07` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** API response DTOs return artwork as rooted, directly-usable URLs (plus passthrough for absolute/proxy URLs), never relative Blazor-convention paths.
|
||||
**Signals:** no SPA `<base href>`, `ApiArtwork` helper · paths: `ErsatzTV.Core/Api/ApiArtwork.cs`, `ErsatzTV.Application/LibraryBrowse/Queries/GetLibraryBrowseItemsHandler.cs` · issues: none cited (PR #181, PR #183)
|
||||
**Mechanics:** `ErsatzTV.Core/Api/ApiArtwork.cs`
|
||||
|
||||
API response DTOs return artwork as rooted, directly-usable URLs (`/artwork/posters/...`,
|
||||
`/artwork/thumbnails/...`, `/artwork/fanart/...`), plus passthrough for absolute `http(s)://` URLs
|
||||
@@ -195,6 +219,10 @@ DTOs — those still return old Blazor-convention relative paths; map from the d
|
||||
root the path via `ApiArtwork`.
|
||||
|
||||
## 2026-07-07 — Decode-style endpoints take a row id and look up server-side
|
||||
`key: api.decode-by-id` · `status: active` · `since: 2026-07-07` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** Endpoints that decode/expand opaque stored state accept a database row id and resolve it server-side rather than round-tripping client-supplied serialized state.
|
||||
**Signals:** `PlayoutHistoryDetailsResponseModel` · paths: `PlayoutController.GetHistoryDetails` · issues: none cited (PR #182)
|
||||
**Mechanics:** `GET /api/playouts/history/{id}`, `PlayoutController.GetHistoryDetails`
|
||||
|
||||
Endpoints that decode/expand opaque stored state accept a database row id and resolve server-side,
|
||||
rather than accepting client-supplied serialized state to decode. Established by
|
||||
@@ -203,6 +231,10 @@ JSON (`Key`/`Details`) is decoded server-side into `PlayoutHistoryDetailsRespons
|
||||
never round-trips the raw payload itself.
|
||||
|
||||
## 2026-07-07 — Season/episode/music-video drill-in via `parentId`, not new child-listing endpoints
|
||||
`key: api.parentid-drillin` · `status: active` · `since: 2026-07-07` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** Media drill-in (season/episode/artist/music-video) is served by an optional `parentId` query param on library-browse, not dedicated per-kind child-listing endpoints.
|
||||
**Signals:** library-picker season drill-in, media-detail browsing · paths: library-browse endpoint · issues: none cited (PRs #181/#183)
|
||||
**Mechanics:** library-browse endpoint `parentId` param
|
||||
|
||||
Rather than adding dedicated child-listing endpoints per media kind (e.g. "list episodes of a
|
||||
season"), the library-browse endpoint takes an optional `parentId` query param and the SPA drills
|
||||
@@ -211,6 +243,10 @@ media-detail's season/episode/artist/music-video browsing). Avoids a combinatori
|
||||
per-kind child endpoints.
|
||||
|
||||
## 2026-07-07 — Convention docs read at session start, updated in-PR
|
||||
`key: docs.convention-docs-session-start` · `status: active` · `since: 2026-07-07` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The standing convention-doc set (api-conventions, spa-conventions, e2e-local, blazor-route-parity, domain-model, decisions, README) is read at session start and updated in the same PR that changes what it documents, replacing per-session recon.
|
||||
**Signals:** `docs/README.md` index, `ApiControllerSecurityTests` drift · paths: `docs/README.md`, `docs/api-conventions.md` §6 · issues: #184, #185
|
||||
**Mechanics:** `docs/README.md`
|
||||
|
||||
`docs/api-conventions.md`, `docs/spa-conventions.md`, `docs/e2e-local.md`,
|
||||
`docs/blazor-route-parity.md`, `docs/domain-model.md`, `docs/decisions.md`, and `docs/README.md`
|
||||
@@ -226,6 +262,10 @@ follow-up under #184 rather than fixed inline, since it's a pre-existing gap, no
|
||||
doc-drafting pass caused.
|
||||
|
||||
## 2026-07-09 — Playback-troubleshooting completion feedback: poll status, no push channel
|
||||
`key: spa.playback-troubleshoot-poll` · `status: active` · `since: 2026-07-09` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The playback-troubleshooting screen reports FFmpeg completion by polling `GET /api/troubleshoot/playback/status` (~2s) rather than a server push channel.
|
||||
**Signals:** `PlaybackTroubleshootingScreen.tsx`, `ICourier`/`ISnackbar` parity · paths: `web/src/screens/PlaybackTroubleshootingScreen.tsx` · issues: #145
|
||||
**Mechanics:** `GET /api/troubleshoot/playback/status`
|
||||
|
||||
The SPA playback-troubleshooting screen (`PlaybackTroubleshootingScreen.tsx`, #145) reports FFmpeg
|
||||
completion by **polling `GET /api/troubleshoot/playback/status` every ~2s** while a session is
|
||||
@@ -240,6 +280,10 @@ real-time transport. Speed thresholds and the "(Speed: Nx)" badge colors are cop
|
||||
Blazor `GetSpeedClass` (red <0.9, green >1.1, amber otherwise).
|
||||
|
||||
## 2026-07-09 — datetime-local instead of Chronic natural-language start parsing
|
||||
`key: spa.datetime-local-input` · `status: active` · `since: 2026-07-09` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The channel-mode date/time input uses a native `<input type="datetime-local">` instead of free-text Chronic natural-language parsing.
|
||||
**Signals:** `playback.m3u8` `start` param, ISO-8601 round-trip · paths: none beyond the screen itself · issues: none cited
|
||||
**Mechanics:** playback-troubleshooting screen, `playback.m3u8` `start` param
|
||||
|
||||
The channel-mode "Date and Time" input in the SPA playback-troubleshooting screen uses a native
|
||||
`<input type="datetime-local">`, a **deliberate deviation** from the Blazor page, which parsed a
|
||||
@@ -249,6 +293,10 @@ Chronic dependency and a picker is unambiguous; the selected local datetime is s
|
||||
controller binds to `DateTimeOffset?` exactly as the Blazor round-trip (`"o"`) format did.
|
||||
|
||||
## 2026-07-09 — SPA gates Download Media Sample while a session is active
|
||||
`key: spa.download-sample-gate` · `status: active` · `since: 2026-07-09` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The SPA disables both Download Media Sample and Download Results while a troubleshooting session is starting/running (Blazor only gated Download Results).
|
||||
**Signals:** I/O contention with the live transcode · paths: none · issues: none cited
|
||||
**Mechanics:** playback-troubleshooting screen
|
||||
|
||||
Minor intentional deviation: the SPA playback-troubleshooting screen disables **Download Media
|
||||
Sample** (alongside Download Results) while a troubleshooting session is starting/running; Blazor
|
||||
@@ -257,6 +305,10 @@ archiver reads the same media file, so gating both during a session is strictly
|
||||
nothing (sessions are short).
|
||||
|
||||
## 2026-07-09 — OpenAPI spec mirrors the runtime Newtonsoft serializer (#198)
|
||||
`key: api.openapi-mirrors-runtime` · `status: active` · `since: 2026-07-09` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The generated OpenAPI spec is made to match the runtime Newtonsoft wire contract (via `NewtonsoftSchemaNamingTransformer`), not the reverse.
|
||||
**Signals:** `CustomContractResolver`, `CustomNamingStrategy`, System.Text.Json drift · paths: `OpenApiSerializerContractTests` · issues: #198
|
||||
**Mechanics:** `NewtonsoftSchemaNamingTransformer`, `OpenApiSerializerContractTests`
|
||||
|
||||
The generated OpenAPI document is made to follow the **runtime** JSON contract, not the reverse. Runtime
|
||||
`/api/*` responses are serialized by Newtonsoft via `CustomContractResolver`/`CustomNamingStrategy`
|
||||
@@ -273,6 +325,10 @@ real contract resolver.** This also fixed a latent SPA bug (the channel-list "FF
|
||||
`fFmpegProfile` and always showed "Unassigned"). Issue #198.
|
||||
|
||||
## 2026-07-09 — YAML playout validator: paste-textarea instead of a server file path
|
||||
`key: spa.yaml-validator-textarea` · `status: active` · `since: 2026-07-09` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The YAML playout validator takes pasted YAML via a `<textarea>`, not a server-side file path, since the SPA has no filesystem access.
|
||||
**Signals:** `YamlValidatorScreen.tsx` · paths: `web/src/screens/YamlValidatorScreen.tsx` · issues: none cited
|
||||
**Mechanics:** `YamlValidatorScreen.tsx`
|
||||
|
||||
The legacy Blazor YAML playout validator took a **server-side file path** (read directly off the
|
||||
container's filesystem). The SPA's `YamlValidatorScreen.tsx` instead uses a paste `<textarea>` — a
|
||||
@@ -282,6 +338,10 @@ filesystem-browsing endpoint or silently fail; pasting the YAML directly is simp
|
||||
every other SPA editor already round-trips content through the API instead of the disk.
|
||||
|
||||
## 2026-07-09 — Channel numbers: prompt-driven sequential renumber instead of drag-to-reorder
|
||||
`key: spa.channel-renumber-prompt` · `status: active` · `since: 2026-07-09` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** Channel renumbering uses a sequential `prompt()`-driven "Renumber" action instead of drag-to-reorder.
|
||||
**Signals:** `App.tsx` Renumber action · paths: `web/src/App.tsx` · issues: none cited
|
||||
**Mechanics:** `App.tsx` Renumber action
|
||||
|
||||
The legacy Blazor channel list let you drag-and-drop rows to reorder channel numbers. The SPA
|
||||
(`App.tsx`) instead offers a "Renumber" action that walks the list and asks for each channel's new
|
||||
@@ -291,6 +351,10 @@ existing per-channel update call and needs no new UI dependency. Revisit only if
|
||||
large enough that prompt-per-channel becomes tedious.
|
||||
|
||||
## 2026-07-09 — "Table, not calendar" convention also covers the deco-templates editor
|
||||
`key: spa.deco-templates-table` · `status: active` · `since: 2026-07-09` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The deco-templates editor also renders its day/deco assignment as a table, extending (not replacing) the templates-editor-table convention.
|
||||
**Signals:** `DecoTemplatesScreen.tsx`, same accepted-deviation status · paths: `web/src/screens/DecoTemplatesScreen.tsx` · issues: none cited
|
||||
**Mechanics:** `DecoTemplatesScreen.tsx`
|
||||
|
||||
Extends the 2026-07 "Templates editor in the SPA is a table, not Blazor's drag-calendar" entry
|
||||
above (not editing that entry — this generalizes it): the deco-templates editor
|
||||
@@ -300,6 +364,10 @@ accepted-deviation status — don't "fix" either editor to match Blazor's intera
|
||||
discussing it first.
|
||||
|
||||
## 2026-07-11 — Trash "See all" reuses library-browse paging; search stays capped per kind (#213)
|
||||
`key: api.search-paging-cap` · `status: active` · `since: 2026-07-11` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** Search stays capped at 100 items per media kind; an overflowing kind's "See all" reuses library-browse paging instead of adding new API surface.
|
||||
**Signals:** `GetLibraryBrowseItems`, `state:FileNotFound` query · paths: `GET /api/v1/search`, `GET /api/v1/library/browse` · issues: #213
|
||||
**Mechanics:** `GET /api/v1/library/browse`
|
||||
|
||||
`GET /api/v1/search` still returns at most 100 items per media kind, which is the cheap first page for
|
||||
the common case. For an overflowing kind, the SPA's "See all N …" action pages `GET
|
||||
@@ -308,6 +376,10 @@ appends the results client-side. This reuses the same `GetLibraryBrowseItems` qu
|
||||
adds no API surface, and only pays for follow-up requests when a kind exceeds the first-page cap.
|
||||
|
||||
## 2026-07-11 — Logs page-size is a client-local preference, not a server ConfigElement
|
||||
`key: spa.logs-page-size-local` · `status: active` · `since: 2026-07-11` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The Logs page rows-per-page preference is stored in `window.localStorage` (`ctv-logs-page-size`), not a server `ConfigElement`.
|
||||
**Signals:** `LogsScreen.tsx`, wrapped-`Storage` pattern, `designSystem.ts`/`auth.ts` precedent · paths: `LogsScreen.tsx`, `designSystem.ts` · issues: none cited
|
||||
**Mechanics:** `LogsScreen.tsx` localStorage key `ctv-logs-page-size`
|
||||
|
||||
The legacy Blazor Logs page persisted the user's chosen rows-per-page via
|
||||
`ConfigElementKey.LogsPageSize` (`SaveConfigElementByKey`/`GetConfigElementByKey`), a
|
||||
@@ -322,6 +394,10 @@ localStorage convention (`designSystem.ts` theme, `auth.ts` token) rather than i
|
||||
persistence mechanism.
|
||||
|
||||
## 2026-07-11 — Logs column sorting: allow-listed `sortField`/`sortDirection` on `GET /api/logs`
|
||||
`key: api.logs-sort-params` · `status: active` · `since: 2026-07-11` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** `GET /api/logs` takes allow-listed `sortField` (`timestamp`|`level`) and `sortDirection` (`asc`|`desc`) query params, normalized (not rejected) on an unrecognized value.
|
||||
**Signals:** `MudTableSortLabel` parity, clamp-not-422 normalization · paths: `LogsController.GetLogs`, `LogsScreen.tsx` · issues: none cited
|
||||
**Mechanics:** `LogsController.GetLogs`
|
||||
|
||||
Parity for `Logs.razor`'s `MudTableSortLabel` columns (Timestamp, Level — Message was never
|
||||
sortable in Blazor either). `LogsController.GetLogs` adds `sortField` (`timestamp` | `level`,
|
||||
@@ -334,6 +410,10 @@ indicating the active field/direction; clicking the active column toggles direct
|
||||
other column switches to it ascending.
|
||||
|
||||
## 2026-07-09 — Per-playout "Schedule reset" button dropped; Reset uses the server-default build mode
|
||||
`key: spa.playout-reset-button` · `status: active` · `since: 2026-07-09` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The SPA keeps a single Reset action (server picks the default build mode) and drops Blazor's separate "Schedule reset" button since its capability already exists via the playout's Edit-details flow.
|
||||
**Signals:** `POST /api/channels/{channelNumber}/playout/reset`, no `mode` param · paths: none · issues: #210
|
||||
**Mechanics:** `POST /api/channels/{channelNumber}/playout/reset`
|
||||
|
||||
Blazor's playouts page had both a per-playout **Reset** and a separate **Schedule Reset** control
|
||||
(setting the daily rebuild time). The SPA keeps Reset — `POST
|
||||
@@ -344,6 +424,10 @@ Edit-details flow, so a second entry point would duplicate an existing capabilit
|
||||
deviation, not a lost capability. Issue #210.
|
||||
|
||||
## 2026-07-09 — Collection custom order: move up/down buttons, any-kind collections
|
||||
`key: spa.collection-custom-order-ui` · `status: active` · `since: 2026-07-09` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** Collection custom ordering uses per-row Move up/Move down buttons (not drag) and is offered for any manual collection with custom order enabled, not just movies-only.
|
||||
**Signals:** `CollectionsScreen.tsx`, `PUT /api/collections/{id}/custom-order`, `CustomOrderCollectionEnumerator` · paths: `CollectionsScreen.tsx` · issues: #211
|
||||
**Mechanics:** `PUT /api/collections/{id}/custom-order`
|
||||
|
||||
Blazor reordered collection items with SortableJS drag-and-drop and only enabled custom ordering
|
||||
for movies-only collections. The SPA (`CollectionsScreen.tsx`) uses per-row **Move up / Move
|
||||
@@ -355,6 +439,10 @@ the movies-only gate: the API and the playback-side `CustomOrderCollectionEnumer
|
||||
custom order enabled. Issue #211.
|
||||
|
||||
## 2026-07-10 — Shared "Add to…" layer lives in `web/src/media/addTo/`; select-mode is an explicit toggle
|
||||
`key: spa.add-to-layer` · `status: active` · `since: 2026-07-10` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** All add-to-collection/playlist/schedule affordances share one component layer at `web/src/media/addTo/`; multi-select is an explicit screen-level toggle, and the per-card menu offers schedule only for the server-validated kinds.
|
||||
**Signals:** `AddToCollectionDialog`, `AddToPlaylistDialog`, `AddToScheduleDialog`, `AddToMenu`, `ProgramScheduleItemCommandBase.CollectionTypeMustBeValid` · paths: `web/src/media/addTo/` · issues: #208, #209
|
||||
**Mechanics:** `web/src/media/addTo/`
|
||||
|
||||
The media mutation surface (#208/#209) is built on one reusable component group,
|
||||
`web/src/media/addTo/` (media-domain components, like `MediaPosterCard` — not generic
|
||||
@@ -379,6 +467,10 @@ via `GET /api/search/all-items`, then reuse the id-list add endpoints — no que
|
||||
command exists server-side. Issues #208/#209.
|
||||
|
||||
## 2026-07-10 — Schedule-item GET returns a flat, non-polymorphic DTO (`ScheduleItemResponseModel`)
|
||||
`key: api.schedule-item-flat-dto` · `status: active` · `since: 2026-07-10` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** Schedule-item GET/POST/PUT use a flat, non-polymorphic `ScheduleItemResponseModel` (every subtype field promoted to a nullable top-level member) instead of the polymorphic Application VM hierarchy, with mutation field names matching `ScheduleItemRequest` 1:1 for a lossless round-trip.
|
||||
**Signals:** `ScheduleItemResponseMapper`, `ScheduleItemResponseRoundTripTests`, `EnforceProperties` normalization · paths: `ErsatzTV.Core/Api/Scheduling/` · issues: #126, #207, #212
|
||||
**Mechanics:** `ScheduleItemResponseRoundTripTests`
|
||||
|
||||
`GET/POST/PUT /api/schedules/{id}/items` return `ScheduleItemResponseModel` /
|
||||
`ScheduleItemsResponseModel` (`ErsatzTV.Core/Api/Scheduling/`), **not** the Application-layer
|
||||
@@ -399,6 +491,10 @@ deliberate and lives on the read side (documented + tested). New shared `NamedId
|
||||
(`ErsatzTV.Core/Api/`) is the generic `{id, name}` embed for API responses. Issues #126/#207/#212.
|
||||
|
||||
## 2026-07-10 — Playout API mutations return 409 while the build lock is held (#215)
|
||||
`key: api.playout-build-lock-409` · `status: active` · `since: 2026-07-10` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** Every id-keyed playout/channel mutation endpoint checks `IEntityLocker.IsPlayoutLocked(id)` and returns 409 Conflict while a build is in-flight, mirroring Blazor's disabled-buttons behavior; reset-all stays 202 and silently skips locked playouts.
|
||||
**Signals:** `ApiResults.ConflictProblem`, `PlayoutListItemResponseModel.IsLocked`, advisory check-then-act · paths: `PlayoutController.cs`, `ChannelController.cs` · issues: #215, adversarial-reviewer#18
|
||||
**Mechanics:** `ApiResults.ConflictProblem`
|
||||
|
||||
Blazor disabled per-playout Reset/Erase/Delete/Edit while a `BuildPlayout` was in flight
|
||||
(`EntityLocker.IsPlayoutLocked`, `Playouts.razor` + per-kind editors); the REST API had no
|
||||
@@ -436,6 +532,10 @@ Precedent for the 409 shape: `TraktController` (left as-is with its own private
|
||||
to keep the diff small). Convention recorded in `api-conventions.md` §3a.
|
||||
|
||||
## 2026-07-11 — Schedules SPA editor: draft/explicit-Save over instant-persist; Copy includes multi/smart/rerun; shuffled-GET normalization preserved
|
||||
`key: spa.schedules-editor-draft-save` · `status: active` · `since: 2026-07-11` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The schedules SPA editor mutates a local draft and flushes one explicit Save (`PUT /api/schedules/{id}/items`) instead of instant-persisting each action; Copy deep-copies all source references (fixing a Blazor omission); the shuffled-schedule GET's `EnforceProperties` lossy normalization is preserved and mirrored in the SPA's option lists.
|
||||
**Signals:** draft/dirty guard, `navigationGuard.ts`, `copyDraftItem`, `EnforceProperties` · paths: `web/src/screens/SchedulesScreen.tsx`, `web/src/schedules/`, `docs/spa-conventions.md` §8 · issues: #207
|
||||
**Mechanics:** `docs/spa-conventions.md` §8
|
||||
|
||||
The ChicoryTV schedules editor (`web/src/screens/SchedulesScreen.tsx` + `web/src/schedules/`,
|
||||
issue #207) rebuilds the schedule-item lineup to full mutation parity with the legacy Blazor editor.
|
||||
@@ -467,6 +567,10 @@ mode from the option lists (and disables the reorder arrows) for shuffled schedu
|
||||
so a GET→edit→PUT round-trip stays consistent with the server's read-side normalization. Issue #207.
|
||||
|
||||
## 2026-07-11 — Channel editor: bare-create entry point + external-logo mutual exclusion (#212)
|
||||
`key: spa.channel-editor-create-logo` · `status: active` · `since: 2026-07-11` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** Bare-channel create is a "New blank channel" action on the channels list (reusing Blazor's add-mode defaults) that navigates into the full editor, and an external logo URL always wins over an uploaded logo, matching `ChannelEditViewModel` precedence.
|
||||
**Signals:** `ChannelEditor.razor` add-mode defaults, `ArtworkContentTypeModel.isExternalUrl`, `EMPTY_LOGO` · paths: `web/src/App.tsx`, `ChannelEditScreen.tsx` · issues: #212
|
||||
**Mechanics:** `ChannelEditScreen.tsx`
|
||||
|
||||
Two Blazor-parity decisions closing the channel-editor gaps (`ChannelEditor.razor` +
|
||||
`ChannelEditViewModel`):
|
||||
@@ -502,6 +606,10 @@ an existing channel never silently changes the value out from under an unmanaged
|
||||
template/selector file removed from disk since save.
|
||||
|
||||
## 2026-07-11 — Queue state lives in the pinned Gitea tracker (#237), not in the handoff file
|
||||
`key: docs.queue-state-gitea-tracker` · `status: active` · `since: 2026-07-11` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** Volatile session/queue state lives in pinned Gitea tracker issue #237 (goal + arc in the body, append-only session-comment log, in-progress/review labels), not in a wholesale-rewritten handoff file; the handoff file keeps only the static kickoff prompt and append-only lore.
|
||||
**Signals:** last-writer-wins race, claim/`in-progress` label, triage verdict · paths: `docs/handoffs/chicorytv-issue-queue.md` · issues: #237
|
||||
**Mechanics:** Gitea tracker issue #237
|
||||
|
||||
With multiple sessions/agents working the repo in parallel, the old protocol — every session
|
||||
wholesale-rewrites `docs/handoffs/chicorytv-issue-queue.md` on main (session state + queue +
|
||||
@@ -519,6 +627,10 @@ the arc doesn't drift. The handoff file keeps only the **static kickoff prompt**
|
||||
**append-only Lessons lore** (per-session prompts are gone; task context lives in issue bodies).
|
||||
|
||||
## 2026-07-11 — EntityLocker: atomic flags + single-owner release discipline, no owner tokens (#231)
|
||||
`key: locking.entitylocker-atomic-flags` · `status: active` · `since: 2026-07-11` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** `EntityLocker` uses `Interlocked.CompareExchange`-guarded atomic flags plus a documented single-owner-release discipline (no owner tokens/leases); `Unlock*` on an already-unlocked slot returns `false` and logs a Warning rather than throwing.
|
||||
**Signals:** six `bool`→`int` flags, `TraktController.EnqueueWithTraktLock`, `unlock: last` tail pattern · paths: `ErsatzTV.Infrastructure/Locking/EntityLocker.cs`, `IEntityLocker` · issues: #231, #232, #234, adversarial-reviewer#20/F5
|
||||
**Mechanics:** `ErsatzTV.Infrastructure/Locking/EntityLocker.cs`
|
||||
|
||||
`EntityLocker` (process-wide singleton, `ErsatzTV.Infrastructure/Locking/EntityLocker.cs`) is the
|
||||
advisory "operation on entity X is in progress" mutex layer. Adversarial review (#20/F5, →#231)
|
||||
@@ -553,6 +665,10 @@ successful lock, compensating unlock on enqueue failure, one release per acquisi
|
||||
#234 (BuildPlayout/subtitles gate their `finally` unlock on the captured acquire result).
|
||||
|
||||
## 2026-07-11 — Media-source management REST write API + SPA (#202)
|
||||
`key: media.source-mgmt-write-api` · `status: active` · `since: 2026-07-11` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** Media-source management (local/Plex/Jellyfin/Emby) is a REST write API + SPA under `/app/libraries/*`, wrapping existing MediatR commands 1:1 with no new commands or DB migration; connection GETs never leak a stored `apiKey`, and each PUT-replace family's identity contract is documented per-family (not assumed uniform).
|
||||
**Signals:** `RemoteConnectionResponseModel {hasApiKey}`, per-family identity contracts, Plex pin-flow polling, EntityLocker non-owner-token discipline · paths: `LocalLibrariesController`, `Plex|Jellyfin|EmbyMediaSourcesController` · issues: #202, #197, #231
|
||||
**Mechanics:** `docs/handoffs/` session record, issue #202
|
||||
|
||||
Replaced the Blazor `/media/sources/{local,plex,jellyfin,emby}/...` pages (14 routes) with SPA
|
||||
screens under `/app/libraries/*` over new write controllers (`LocalLibrariesController`,
|
||||
@@ -639,6 +755,10 @@ App re-pushes the pre-pop URL and the wrapper never sees the rejected path. This
|
||||
list and the resolved caveat text.
|
||||
|
||||
## 2026-07-11 — Legacy→SPA redirect matcher: exact map + ordered segment-template patterns (#204)
|
||||
`key: spa.legacy-redirect-matcher` · `status: active` · `since: 2026-07-11` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** `LegacyUiRedirects.TryGetRedirect` is a two-tier matcher — an exact `OrdinalIgnoreCase` `Map` (Tier 1) then an ordered segment-template pattern list (Tier 2, first-match-wins) — collision-free by construction, with a guard invariant that no rule may prefix-match `/api`, `/artwork`, `/docs`, `/openapi`, `/iptv`, `/app`, or `/media/sources`.
|
||||
**Signals:** `{id}` strict-positive-integer token, `{any}` token, `AppendQueryString` merge · paths: `ErsatzTV/LegacyUiRedirects.cs` · issues: #204
|
||||
**Mechanics:** `LegacyUiRedirects.TryGetRedirect`, `AppendQueryString`
|
||||
|
||||
`LegacyUiRedirects.TryGetRedirect` grew from a single exact-path dictionary to a **two-tier matcher**
|
||||
behind the unchanged `(PathString, out string)` signature. **Tier 1** is the existing
|
||||
@@ -680,6 +800,10 @@ a single unified rule list (loses the O(1) dictionary hit for the ~52 exact rout
|
||||
traffic). No `/api` change, no OpenAPI regen, no SPA change.
|
||||
|
||||
## 2026-07-11 — Pre-removal Blazor rollback tag `blazor-final` (#205)
|
||||
`key: blazor.rollback-tag` · `status: active` · `since: 2026-07-11` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The commit immediately preceding the Blazor-removal merge is tagged `blazor-final` (not a `v*` tag, so it doesn't trigger a prod release build) as the documented rollback/restore path.
|
||||
**Signals:** `git tag -a blazor-final`, `ersatztv:blazor-final` test-image restore path · paths: none · issues: #205
|
||||
**Mechanics:** `git tag blazor-final`
|
||||
|
||||
Removal-gate item #205: the removal PR deletes both the Blazor reference implementation and the
|
||||
`/system/health` escape hatch, so a post-deletion parity gap would otherwise be an archaeology exercise
|
||||
@@ -701,6 +825,10 @@ action of the Step 2 deletion PR merge** (not before — `main` moves until then
|
||||
Not cut this session — `main` still carries Blazor and will advance before the removal PR.
|
||||
|
||||
## 2026-07-11 — Async-op API contract normalization + playout build observability + F9 scan endpoints (#235)
|
||||
`key: api.async-op-contract` · `status: active` · `since: 2026-07-11` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** Queue-triggering `/api/*` endpoints normalize onto one contract — 202 Accepted (queued), 404 (missing entity), 409 (lock held), 422 (domain precondition) — with Trakt as the reference implementation; playout list/detail GETs also carry an `isLocked` observability flag as the HTTP-observable substitute for a live push channel.
|
||||
**Signals:** `QueueShowScanResult`, `ResetAllPlayoutsResponseModel`, `MaintenanceController.EmptyTrash`/`CleanArtwork` · paths: `LibrariesController.ScanShow`, `ChannelController.ResetPlayout`, `PlayoutController.ResetAll` · issues: #235, adversarial-reviewer#20 F7/F8/F9, #232, #215
|
||||
**Mechanics:** `docs/api-conventions.md` §3a/§3b
|
||||
|
||||
Reviewer#20 F7/F8/F9. Normalizes the queue-triggering `/api/*` endpoints onto one contract, closes the two
|
||||
F9 `Libraries.razor` parity gaps, and hardens the Trakt batch-lock lifecycle. Much of the F8 surface was
|
||||
@@ -756,6 +884,10 @@ a lock outlives its batch while the process keeps running). Adding a bounded-cha
|
||||
drain is out of scope and would not fix a correctness bug.
|
||||
|
||||
## 2026-07-11 — Post-commit side effects run on `CancellationToken.None` (generalized from #251 to #254)
|
||||
`key: api.postcommit-cancellation-none` · `status: active` · `since: 2026-07-11` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** Once a mutation commits, its entire compensating side effect (enqueues, publishes, reindexes, cache refresh, and any post-commit lookup gating one of those) runs on `CancellationToken.None` so a late client disconnect can't half-abort an already-committed change.
|
||||
**Signals:** `WriteAsync` enqueue, `mediator.Publish`, search-index reindex · paths: `docs/api-conventions.md` §7b, `MediaCollections/`, `ProgramSchedules/`, `Playouts/`, `Channels/` handlers · issues: #251, #254, adversarial-reviewer#22
|
||||
**Mechanics:** `docs/api-conventions.md` §7b
|
||||
|
||||
Audit #22 (adversarial-reviewer) found ~20 command handlers threading the request `cancellationToken`
|
||||
into work that runs **after** `SaveChangesAsync` commits — the post-commit `WriteAsync` enqueue that
|
||||
@@ -797,6 +929,10 @@ region). Low git-conflict risk, but merge `main` in and expect to see the `Cance
|
||||
convention already present on the post-commit enqueues.
|
||||
|
||||
## 2026-07-12 — External-collections scans get an authoritative status surface (#271); the SPA timeout is retired
|
||||
`key: scan.collections-scan-status` · `status: active` · `since: 2026-07-12` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** `GET /api/v1/media-sources/collections-scan-status` reports a family-global (not per-source), boolean-only active-scan set read from `IEntityLocker`; the SPA reconciles authoritatively against it (with a grace-tick helper) instead of a fixed client-side timeout.
|
||||
**Signals:** `CollectionsScanStatusResponseModel`, `useCollectionsScan`, `pruneGraceExpiredPending`, `COLLECTIONS_PENDING_TIMEOUT_MS` removed · paths: `MediaSourcesController.GetCollectionsScanStatus` · issues: #271
|
||||
**Mechanics:** `GET /api/v1/media-sources/collections-scan-status`
|
||||
|
||||
**External Collections rows stay client-derived.** The SPA derives them from `GET
|
||||
/api/v1/media-sources`: remote sources expose only sync-enabled libraries, so a non-empty `libraries` list is
|
||||
@@ -827,6 +963,10 @@ the fast-scan-between-polls race — the same bounded-pending discipline #232/#2
|
||||
`COLLECTIONS_PENDING_TIMEOUT_MS` is gone.
|
||||
|
||||
## 2026-07-11 — Blazor Server UI removed (#91 phase b)
|
||||
`key: blazor.ui-removed` · `status: active` · `since: 2026-07-11` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The legacy Blazor Server UI (`Pages/`, `Shared/`, `ViewModels/`, `Validators/`, MudBlazor + 8 other packages, Blazor Startup wiring) is fully deleted now that the SPA has parity; the legacy `MapWhen` branch is kept only for controllers/docs/OpenAPI/`LegacyUiRedirects`, and the catch-all fallback 302s any unmatched non-api/artwork/docs/openapi path to `/app`.
|
||||
**Signals:** `blazor-final` rollback tag, #206 auth-posture sign-off, forbidden-prefix guard lifted for `/media/sources` · paths: `ErsatzTV/Pages/**`, `ErsatzTV/Shared/**`, `ErsatzTV/ViewModels/**`, `ErsatzTV/Validators/**` · issues: #91, #145, #151, #152, #153, #155, #202, #207, #212, #213, #235, #204, #206, #25
|
||||
**Mechanics:** `Startup.cs` MapFallback, `LegacyUiRedirects.cs`
|
||||
|
||||
The #91 phase (b) removal PR deletes the legacy Blazor Server UI now that the ChicoryTV SPA has parity
|
||||
(all gates cleared: #145, #151/#152/#153/#155, #202, #207, #212/#213, #235 F9). The SPA is the only UI.
|
||||
@@ -872,6 +1012,10 @@ Also removed the now-dead ersatztv#25 razor-Sonar `<NoWarn>S6966;S3267;…</NoWa
|
||||
restore path). Not a `v*` tag → no prod release build.
|
||||
|
||||
## 2026-07-12 — Live-E2E is a required step for API write-path handler changes (#303)
|
||||
`key: release.live-e2e-required` · `status: active` · `since: 2026-07-12` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** A PR that changes an API write-path handler must include a live-E2E pass (driving the real endpoint/screen and confirming the round-trip through a subsequent read), not only unit/characterization tests, and must state whether live-E2E ran or wasn't required.
|
||||
**Signals:** lazy LanguageExt `Map` blind spot, #229 finding · paths: `docs/e2e-local.md`, `docs/api-conventions.md` §7 · issues: #303, #229
|
||||
**Mechanics:** `docs/e2e-local.md`
|
||||
|
||||
**A PR that changes an API write-path handler (a `POST`/`PUT`/`DELETE` `/api/*` command that mutates
|
||||
state and reloads it through the read path) MUST include a live-E2E pass** — driving the real endpoint
|
||||
@@ -889,6 +1033,10 @@ wasn't required (the same stated-exemption discipline as the review skip rubric)
|
||||
remains the only net for this class") into a standing convention.
|
||||
|
||||
## 2026-07-12 — TopBar primary-action button: wire creates, drop the rest (#238)
|
||||
`key: spa.topbar-primary-action` · `status: active` · `since: 2026-07-12` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The TopBar's primary-action "+" button renders only when the active route declares a non-empty `primaryAction`, is wired (via a shared `usePrimaryAction` hook) only on single-unambiguous-create-flow list screens, and is dropped everywhere else rather than left as a dead/no-op button.
|
||||
**Signals:** `usePrimaryAction` hook, `ctv:primary-action` event, dead-button class · paths: `web/src/primaryAction.ts`, `docs/spa-conventions.md` §10 · issues: #238, #229, #247, #295
|
||||
**Mechanics:** `web/src/primaryAction.ts`, `docs/spa-conventions.md` §10
|
||||
|
||||
The shell TopBar rendered a prominent top-right primary-action button (Plus icon) for **every** screen, but
|
||||
only `SchedulesScreen` had ever subscribed to its `ctv:primary-action` event — so on every other screen the
|
||||
@@ -927,6 +1075,10 @@ formalize; #238 keeps it a documented convention guarded by a data-driven `App.t
|
||||
create screens (a typo'd route id → the banner navigates nowhere → red). Refs #238 #247.
|
||||
|
||||
## 2026-07-13 — API versioning: the whole `/api` surface is mounted at `/api/v1`, additive-only after freeze (#286)
|
||||
`key: api.versioning-v1` · `status: active` · `since: 2026-07-13` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The entire `/api` surface is versioned to `/api/v1` uniformly (no unversioned corner); legacy unversioned callers are rewritten in-pipeline (not redirected) with Deprecation/Link/Sunset headers, and post-freeze `/api/v1` is additive-only — a breaking change requires `/api/v2`.
|
||||
**Signals:** `ApiVersionRewriteMiddleware`, `ApiRouteVersioningTests`, RFC 8594 Deprecation header · paths: `docs/api-conventions.md` §1/§9 · issues: #286, #197
|
||||
**Mechanics:** `ApiRouteVersioningTests`, `docs/api-conventions.md` §1/§9
|
||||
|
||||
The #197 cold review's C1 **BLOCKER**: `/api/*` was entirely unversioned (`info.version` was cosmetic), so the
|
||||
first breaking change would silently break the SPA and any external/MCP client with no negotiation path. This is
|
||||
@@ -969,6 +1121,10 @@ asserts it matches `^/api/v\d+/` — so a new controller that drifts (relative o
|
||||
`/api` (e.g. `GET /auth/oidc/login`) are out of scope for the test. Docs: `api-conventions.md` §1/§9. Refs #286 #197.
|
||||
|
||||
## 2026-07-13 — Scheduling API hardening: null-name 500s, duplicate template items, unreachable 404 (#172)
|
||||
`key: api.scheduling-hardening` · `status: active` · `since: 2026-07-13` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** Create/Replace handlers guard against null/whitespace `name` (`IsNullOrWhiteSpace`, not just `Length`) to prevent NRE-500s, template-item overlap validation compares by index (not record value-equality) to catch exact-duplicate items, and unreachable 404 `ProducesResponseType` attributes on create-only actions are trimmed.
|
||||
**Signals:** `BlockTemplateItem` record value-equality bypass, `api-conventions.md` §3b handler-hardening checklist · paths: `ReplaceTemplateItemsHandler`, `api-conventions.md` §3b · issues: #172, #144
|
||||
**Mechanics:** `docs/api-conventions.md` §3b
|
||||
|
||||
Cleared the still-live findings from issue #172 (consolidated non-blocking nits from the #144 S1/S2
|
||||
reviews). Most of the 2026-07-07 list had already been ratified deliberate (§8 "(none)" synthesized
|
||||
@@ -1003,6 +1159,10 @@ non-existence-check, and the missing `Name=` on `PlayoutController` Create/Delet
|
||||
`Name=`-less ops, and adding `Name=` would risk renaming generated SPA client methods). Refs #172 #197.
|
||||
|
||||
## 2026-07-16 — Functional-E2E CI harness: advisory curl-contract job over an app booted from source (#299)
|
||||
`key: ci.functional-e2e-harness` · `status: active` · `since: 2026-07-16` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** The `functional-e2e` CI job boots the PR's own code from source via `dotnet run` (`scripts/e2e-local.sh`) and runs curl-only, deterministic assertions (`scripts/e2e-functional.sh`) as an advisory (non-blocking) job, not a `build` dependency or required check.
|
||||
**Signals:** staged rollout precedent (`migrations` job), racy/interactive flows deferred · paths: `scripts/e2e-local.sh`, `scripts/e2e-functional.sh` · issues: #299
|
||||
**Mechanics:** `scripts/e2e-functional.sh`
|
||||
|
||||
The manual live-E2E curl flows sessions had been re-running by hand (and leaving only as PR/issue
|
||||
comments) are now a CI regression net. Two decisions shaped it:
|
||||
@@ -1032,6 +1192,10 @@ flaky. Assertions were written against a real running instance, not the source
|
||||
`/artwork/*` returns `400` (not the `404` a static read suggested); extend the harness the same way.
|
||||
|
||||
## 2026-07-16 — Optional advertised IPTV base URL (`iptv.base_url`) resolved centrally in the two generators (#340)
|
||||
`key: iptv.base-url` · `status: active` · `since: 2026-07-16` · `supersedes: none` · `superseded-by: none`
|
||||
**Rule:** An optional advertised base URL (`iptv.base_url`) is resolved centrally via a pure Core helper (`AdvertisedBaseUrl`) inside the two IPTV generation handlers (M3U + XMLTV); unset/malformed values fall back byte-identical to the request-derived host, and it's a new `iptv` settings group distinct from `ETV_BASE_URL` and out of scope for HDHomeRun.
|
||||
**Signals:** `AdvertisedBaseUrl.TryParse`/`Resolve`, `ConfigElementKey.IptvBaseUrl`, request-derived-host symptom (Gitea #1) · paths: `ErsatzTV.Core/Iptv/AdvertisedBaseUrl.cs`, `docs/m3u-xmltv.md` · issues: #340
|
||||
**Mechanics:** `ErsatzTV.Core/Iptv/AdvertisedBaseUrl.cs`, `GET`/`PUT /api/v1/settings/iptv`
|
||||
|
||||
ErsatzTV's absolute IPTV URLs (M3U stream/logo/guide URLs, XMLTV `<icon>`/artwork) were always
|
||||
derived from the incoming request's `Scheme`/`Host`/`PathBase`, so any client that fetched with a
|
||||
|
||||
Reference in New Issue
Block a user