docs: advance ChicoryTV issue queue past #104/#111 (PRs #117/#118); single-session prompt for #102
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,241 +4,169 @@ Paste the prompt below into a fresh session to work the next issue. Each session
|
||||
UPDATING THIS FILE in place (rewrite the "Issue #N state" section and the queue for the next
|
||||
issue) so it always holds the current handoff. History: created 2026-07-02 after the plan audit
|
||||
(#59 epic) filed backend gap issues #100–#111; a 7–9-way parallel workflow build once exhausted
|
||||
RAM, so builds are limited to 2–3 concurrent, never wide fan-outs. #97 finished 2026-07-02
|
||||
(PR #112, stacked on docs/59-ui-redesign-brief; issue stays open until the stack reaches main).
|
||||
#105 finished 2026-07-02 (PR #113 merged, closed). #108 finished 2026-07-03 (PR #114 merged).
|
||||
#100+#101+#107+#110 (playout read API) finished 2026-07-03: **PR #116 merged to main**, all four
|
||||
issues closed; adversarial review passed after one major fix (see "lessons" below).
|
||||
RAM, so builds are limited to 2–3 concurrent, never wide fan-outs. Done so far: #97 (PR #112,
|
||||
still stacked on docs/59-ui-redesign-brief), #105 (PR #113), #108 (PR #114), #100+#101+#107+#110
|
||||
(PR #116), #103+#106 (PR #115, Codex), #104 (PR #117), #111 (PR #118, implemented by Codex,
|
||||
reviewed/finished/merged by Claude). All merged to main and closed as of 2026-07-04.
|
||||
|
||||
**Parallel-session state (2026-07-03)**: the Codex session finished #103+#106 → **PR #115**
|
||||
(feat/103-media-sources-api → main, CI green). At handoff-write time #115 was awaiting its fable
|
||||
adversarial review verdict and was NOT yet merged. Next session: check PR #115 first — if merged,
|
||||
fine; if still open and review was satisfied, merge it (rebase + ./scripts/update-openapi.sh
|
||||
regen first if main moved, since #116 changed v1.json after #115 branched). Merge PRs
|
||||
sequentially, never simultaneously — every open feat/* branch conflicts on v1.json.
|
||||
**Session state (2026-07-04)**: Codex usage is EXHAUSTED — no more parallel Codex sessions;
|
||||
this handoff now carries a SINGLE prompt per session. main is at 43f81d3a (post-#118) with the
|
||||
full backend read API + artwork upload; ErsatzTV.Tests on main = 312 tests, all green.
|
||||
Remaining pre-seeded WIP branch: feat/102-json-guide only.
|
||||
|
||||
**Lessons for all remaining prompts** (found by the #116 review):
|
||||
- DTO records in ErsatzTV.Core/Api that have genuinely-nullable properties MUST be file-scoped
|
||||
`#nullable enable` with `?` on those properties — the project default Nullable=disable makes
|
||||
the regenerated OpenAPI document them as non-nullable, which silently breaks SPA typegen.
|
||||
**Lessons for all remaining prompts** (accumulated from #116/#104/#111 reviews):
|
||||
- DTO records in ErsatzTV.Core/Api MUST get file-scoped `#nullable enable` — with the project
|
||||
default Nullable=disable the regenerated OpenAPI documents every string as `["null","string"]`
|
||||
(breaks SPA typegen with needless `| null`); with it, non-`?` properties emit plain `string`.
|
||||
This exact miss was the one MAJOR in the #104 review. Precedent:
|
||||
ErsatzTV.Core/Api/Playouts/PlayoutResponseModel.cs.
|
||||
- `Option<T>.ToNullable()` does NOT exist in this LanguageExt version; Option→nullable is
|
||||
`MatchUnsafe(v => (T?)v, () => null)` (idiom: ErsatzTV.Application/Health/Mapper.cs). Plain
|
||||
`Match` throws ResultIsNullException on a null-returning branch.
|
||||
- ./scripts/update-openapi.sh runs `dotnet build -t:GenerateOpenApiDocuments` ONLY — after
|
||||
editing code, run a normal `dotnet build ErsatzTV/ErsatzTV.csproj` FIRST or the script fails
|
||||
with MSB3680 ("ErsatzTV.json does not exist": the rename target runs but generation was
|
||||
skipped against the stale build).
|
||||
- Id-taking child-collection GETs 404 on unknown parent via a pre-check + ApiResults
|
||||
(precedent now: ScheduleController.GetItems AND PlayoutController.GetItems) + an
|
||||
(precedent: ScheduleController.GetItems, PlayoutController.GetItems) + an
|
||||
OpenApiErrorResponseContractTests [TestCase] entry.
|
||||
- Backlog nits (not filed as issues yet): pageSize is unclamped on all paged endpoints;
|
||||
PlayoutController Create/Delete lack route Name=; PlayoutController.GetItems' existence
|
||||
pre-check reuses GetPlayoutById (3 Includes) instead of a lightweight exists query.
|
||||
pre-check reuses GetPlayoutById (3 Includes) instead of a lightweight exists query;
|
||||
uploads >30 MB hit Kestrel's default cap and return a bare 413 (no ProblemDetails) — an
|
||||
operator raising ETV_MAXIMUM_UPLOAD_MB past 30 silently can't take effect; artwork
|
||||
content-type is trusted from the client header (magic-byte sniffing = #66); schedule
|
||||
duration estimator: expression-based `Count` and `Count="0"` both yield null estimates,
|
||||
and it fully materializes each referenced collection per GET (SQL aggregate if ever polled).
|
||||
|
||||
---
|
||||
|
||||
# PROMPT A (Claude session) — Finish issue #104 — artwork upload API (review WIP → implement → verify → review → PR)
|
||||
# PROMPT — Finish issue #102 — JSON guide endpoint (the hardest one)
|
||||
|
||||
You are the ORCHESTRATOR in the main conversation (Fable). Fable is EXPENSIVE — reserve it for
|
||||
orchestration decisions and the adversarial review; DELEGATE the bulk work to cheaper models:
|
||||
- Recon/reads (issue body, WIP diff, Blazor artwork-upload precedent): Explore agent or model: haiku.
|
||||
- Implementation (handler, DTOs, controller, tests): Agent with model: sonnet (opus only if
|
||||
sonnet's attempt fails review twice). Give it exact file paths, conventions, and the diff.
|
||||
- Mechanical chores (regen scripts, commit wording, API curls): inline is fine, but don't
|
||||
spawn Fable subagents for them.
|
||||
- Recon/reads (issue body, WIP diff, RefreshChannelDataHandler + XMLTV pipeline study):
|
||||
Explore agent or model: haiku.
|
||||
- Implementation (shared projection extraction, handler, DTOs, controller, tests): Agent with
|
||||
model: sonnet (opus only if sonnet's attempt fails review twice). Give it exact file paths,
|
||||
conventions, and the diff. For the projection-extraction refactor specifically, consider
|
||||
opus first — it touches the XMLTV generation path guarded by golden tests.
|
||||
- Mechanical chores (regen scripts, commit wording, API curls): inline, no Fable subagents.
|
||||
- Adversarial review (final review step): the ONE place to use a fable subagent (read-only,
|
||||
high effort).
|
||||
HARD CONSTRAINTS:
|
||||
- Never 5+ simultaneous dotnet builds MACHINE-WIDE (a 7–9-way parallel build once crashed the
|
||||
machine); 2–3 concurrent builds are fine, even with the parallel Codex session running.
|
||||
- Never 5+ simultaneous dotnet builds MACHINE-WIDE; 2–3 concurrent are fine. No Codex session
|
||||
runs in parallel anymore (usage exhausted) — but the user may be working in the main checkout.
|
||||
- Do NOT use the Workflow tool. Sequential Agent calls or inline work only.
|
||||
- This session works ONLY feat/104-artwork-upload. A Codex session may be working
|
||||
feat/111-schedule-durations in parallel — do not touch that branch, its worktree, or
|
||||
ScheduleController/ProgramSchedule files.
|
||||
- Do NOT regenerate the XMLTV/M3U golden files (ETV_UPDATE_GOLDENS) — they are the regression
|
||||
net for this exact refactor. A golden diff means the refactor changed guide output: fix the
|
||||
code, not the goldens.
|
||||
- End by updating this handoff file (see "On completion").
|
||||
- The merge of your own green PR may be blocked by the permission classifier — if so, ask the
|
||||
user for a one-word "merge" consent instead of retrying.
|
||||
- Merging your own green PR will be blocked by the permission classifier — ask the user for a
|
||||
one-word "merge" consent (they pre-approved "merge when tests are green and issue complete"
|
||||
last session, but consent doesn't carry across sessions).
|
||||
|
||||
## Project context (read CLAUDE.md first; docs/contributing.md + docs/rest-api.md before code)
|
||||
- Repo: /Users/timothy/ersatztv — ErsatzTV fork (.NET 10, CQRS/MediatR, LanguageExt, EF Core),
|
||||
being rebuilt as React SPA "ChicoryTV" (web/) over its REST API. Gitea:
|
||||
http://192.168.1.95:3000/timothy/ersatztv (API auth: basic timothy:ded89Lm4).
|
||||
- Tests: NUnit + Shouldly + NSubstitute in ErsatzTV.Tests (NOT xUnit). Error contract:
|
||||
ProblemDetails; 404 title "Resource not found", 422 "Validation failed".
|
||||
- OpenAPI regen: ./scripts/update-openapi.sh (rewrites ErsatzTV/wwwroot/openapi/v1.json).
|
||||
This branch is based on origin/main which has NO web/ dir — SKIP web type-regen steps.
|
||||
- BRANCH TOPOLOGY: origin/main now has the REST API foundation + #105 picker lists + #108
|
||||
health + #116 playout read API, and possibly #115 media sources (check). The
|
||||
ProblemDetails; 404 title "Resource not found", 422 "Validation failed". main has 312 tests
|
||||
green. XMLTV golden tests live in ErsatzTV.Core.Tests (ChannelGuideGoldenTests) — run that
|
||||
project too when touching guide code: TZ=UTC dotnet test ErsatzTV.Core.Tests.
|
||||
- OpenAPI regen: ./scripts/update-openapi.sh — run a normal
|
||||
`dotnet build ErsatzTV/ErsatzTV.csproj` first or it fails with MSB3680 (see Lessons above).
|
||||
origin/main has NO web/ dir — SKIP web type-regen steps.
|
||||
- BRANCH TOPOLOGY: origin/main (43f81d3a) has the full backend API through #104/#111. The
|
||||
docs/59-ui-redesign-brief branch carries the SPA foundation + #96/#98; PR #112 (#97) targets
|
||||
it — all unmerged to main. feat/104-artwork-upload is based on the PRE-#113 origin/main:
|
||||
REBASE onto origin/main first — v1.json WILL conflict with later regens; resolve by taking
|
||||
either side and re-running ./scripts/update-openapi.sh at the end (regen is authoritative).
|
||||
- Patterns proven in #97/#105/#108/#116: 200-only GETs use typed returns with
|
||||
it — all unmerged to main. feat/102-json-guide is based on the PRE-#113 origin/main:
|
||||
REBASE onto origin/main first — v1.json WILL conflict; resolve by taking either side and
|
||||
re-running the regen at the end (regen is authoritative).
|
||||
- Patterns proven in #97/#105/#108/#116/#104/#111: 200-only GETs use typed returns with
|
||||
`[HttpGet("/api/...", Name = "...")]`, `[Tags]`, `[EndpointSummary]`,
|
||||
`[EndpointGroupName("general")]` (precedent: FillerPresetController, HealthController,
|
||||
PlayoutController); endpoints that can 404/422 use the ApiResults/ProblemDetails path and
|
||||
NEED an OpenApiErrorResponseContractTests entry (explicit [TestCase] allowlist); DTO records
|
||||
live in ErsatzTV.Core/Api/... (project has Nullable=disable — add file-scoped
|
||||
`#nullable enable` + `?` when a property is genuinely nullable, else the OpenAPI spec
|
||||
documents it non-nullable and breaks SPA typegen; precedent:
|
||||
ErsatzTV.Core/Api/Playouts/PlayoutResponseModel.cs); handler tests use the
|
||||
ErsatzTV.Tests/Support/InMemoryTvContext harness; controller tests assert route template +
|
||||
Name + mediator pass-through (see ErsatzTV.Tests/Controllers/PlayoutControllerTests.cs).
|
||||
`[EndpointGroupName("general")]` (precedent: PlayoutController, FillerPresetController);
|
||||
endpoints that can 404/422 use ApiResults/ProblemDetails + an
|
||||
OpenApiErrorResponseContractTests [TestCase] entry; DTO records in ErsatzTV.Core/Api/...
|
||||
with file-scoped `#nullable enable` (see Lessons — this was the #104 review MAJOR); handler
|
||||
tests use ErsatzTV.Tests/Support/InMemoryTvContext; controller tests assert route template +
|
||||
Name + mediator pass-through (ErsatzTV.Tests/Controllers/PlayoutControllerTests.cs).
|
||||
Branch protection: PR must pass "Build & test (.NET)" to merge.
|
||||
- **LanguageExt traps**: `Option<T>.Match` THROWS ResultIsNullException if a branch returns
|
||||
null — use `MatchUnsafe(v => (T?)v, () => null)` (idiom: Application/Health/Mapper.cs);
|
||||
`Option<T>.ToNullable()` does not exist. The salvaged WIP drafts share authorship — audit.
|
||||
- **LanguageExt traps**: `Option<T>.Match` THROWS if a branch returns null — use
|
||||
`MatchUnsafe(v => (T?)v, () => null)`; `Option<T>.ToNullable()` does not exist.
|
||||
|
||||
## Issue state (UNTRUSTED WIP — review before trusting anything)
|
||||
- Branch feat/104-artwork-upload covers #104 (artwork upload; unblocks #89 Channel Builder).
|
||||
Read the issue body + comments via the Gitea API.
|
||||
- WIP commit 31a4aaba "wip: partial implementation salvaged from interrupted workflow run" —
|
||||
never built, never tested. 154 insertions across 4 NEW files:
|
||||
ErsatzTV.Application/Artworks/Commands/UploadArtwork.cs + UploadArtworkHandler.cs,
|
||||
ErsatzTV.Core/Api/Artwork/ArtworkUploadResponseModel.cs,
|
||||
ErsatzTV/Controllers/Api/ArtworkUploadController.cs. NO tests in the WIP — they must be
|
||||
written. It's an upload (multipart/IFormFile?) POST: check how Blazor does artwork upload
|
||||
today (ArtworkController? channel logo upload path?) and mirror validation (file size/type
|
||||
→ 422 with title "Validation failed" + contract-test entry).
|
||||
- Session pattern that worked for #108/#116: recon brief (haiku) → sonnet implement+test →
|
||||
inline verify + regen → fable adversarial review → fix majors inline → amend/push → PR.
|
||||
- Work in a worktree: git worktree add .worktrees/feat-104 feat/104-artwork-upload.
|
||||
Worktrees to LEAVE ALONE: .worktrees/issue-97-channel-state-api (open PR #112), any
|
||||
Codex worktree (feat-111 or feat-103).
|
||||
- Branch feat/102-json-guide covers #102 (JSON guide/EPG endpoint; unblocks #85 EPG screen).
|
||||
Read the issue body + comments via the Gitea API before anything else.
|
||||
- The branch has a "wip: partial implementation salvaged from interrupted workflow run"
|
||||
commit — never built, never tested. Prior WIPs in this series ranged from structurally-sound
|
||||
(#104) to needing controller fixes; audit every file.
|
||||
- The hard part: the XMLTV guide is produced by
|
||||
ErsatzTV.Application/Channels/Queries/GetChannelGuideHandler.cs fed by data assembled in
|
||||
RefreshChannelDataHandler — #102 wants a JSON guide endpoint sharing that projection WITHOUT
|
||||
duplicating it and WITHOUT changing XMLTV output. The XMLTV goldens
|
||||
(ChannelGuideGoldenTests in ErsatzTV.Core.Tests) are the regression net: they must pass
|
||||
UNCHANGED. Run them before starting (baseline) and after every refactor step.
|
||||
- Session pattern that worked for #104/#108/#116: recon brief (haiku) → sonnet/opus
|
||||
implement+test → inline verify + regen → fable adversarial review → fix majors inline →
|
||||
amend/push → PR.
|
||||
- Work in a worktree: git worktree add .worktrees/feat-102 feat/102-json-guide.
|
||||
Worktrees to LEAVE ALONE: .worktrees/issue-97-channel-state-api (open PR #112). Stale
|
||||
merged worktrees (.worktrees/feat-111, .worktrees/feat-103) may still exist — ignore or
|
||||
`git worktree remove` them, they're merged.
|
||||
|
||||
## Plan
|
||||
1. RECON [Explore agent or haiku]: fetch #104 body+comments; diff
|
||||
origin/main...origin/feat/104-artwork-upload; find the existing Blazor/legacy artwork upload
|
||||
path (controller, size limits, storage via IArtworkRepository or similar) and any existing
|
||||
Artwork domain plumbing; structured brief with per-file WIP verdicts + precedent refs.
|
||||
2. IMPLEMENT/FIX [Agent, model: sonnet]: rebase onto origin/main (v1.json conflict — any
|
||||
resolution, regen wins later), then fix/complete per recon. Handler tests (InMemoryTvContext
|
||||
if DB-backed) + controller tests; contract-test entries for 404/422 responses.
|
||||
One build slot.
|
||||
3. VERIFY [inline]: dotnet build ErsatzTV.sln; TZ=UTC dotnet test
|
||||
ErsatzTV.Tests/ErsatzTV.Tests.csproj; ./scripts/update-openapi.sh; re-test (contract tests
|
||||
read the static v1.json); commit.
|
||||
1. RECON [Explore agent or haiku]: fetch #102 body+comments; diff
|
||||
origin/main...origin/feat/102-json-guide; map the XMLTV data flow
|
||||
(RefreshChannelDataHandler → GetChannelGuideHandler → goldens) and what the WIP extracted;
|
||||
structured brief with per-file WIP verdicts + a proposed extraction seam that leaves XMLTV
|
||||
byte-identical.
|
||||
2. IMPLEMENT/FIX [Agent, sonnet or opus — see above]: rebase onto origin/main (v1.json
|
||||
conflict — any resolution, regen wins later), then fix/complete per recon. Handler tests
|
||||
(InMemoryTvContext) + controller tests; contract-test entries for any 404/422. One build
|
||||
slot. Golden tests must pass unchanged at every step.
|
||||
3. VERIFY [inline]: dotnet build ErsatzTV.sln; TZ=UTC dotnet test on ErsatzTV.Tests AND
|
||||
ErsatzTV.Core.Tests (goldens); dotnet build ErsatzTV/ErsatzTV.csproj then
|
||||
./scripts/update-openapi.sh; re-test; commit.
|
||||
4. FINAL REVIEW [fable subagent, high effort, read-only]: diff origin/main...HEAD. Focus:
|
||||
parity with the legacy upload path (storage location, cache-busting, dedup), validation and
|
||||
limits (413/422 behavior), error contract, DTO nullability vs the regenerated spec, OpenAPI
|
||||
consistency, test meaningfulness. Fix blockers/majors (+ quick minors), re-verify, push
|
||||
(force-push fine post-rebase).
|
||||
5. PR against main [inline]: title "feat(api): artwork upload endpoint (#104)", body listing
|
||||
endpoint + review verdict, "fixes #104", footer
|
||||
"🤖 Generated with [Claude Code](https://claude.com/claude-code)". Wait for CI green — poll
|
||||
.../actions/runs?limit=10 by head_sha (zsh: don't name a variable `status`). Merge when
|
||||
green (ask for one-word "merge" consent if the classifier blocks); verify main's post-merge
|
||||
run also green. COORDINATION: if PR #115 or the Codex #111 PR merged first, rebase + regen
|
||||
before merging.
|
||||
6. Comment on #104 as you work + closing comment per CLAUDE.md Task Completion Protocol.
|
||||
XMLTV output preservation (is the shared projection truly identical — timezone handling,
|
||||
{RequestBase}/{AccessTokenUri} substitution, etv-tag strip, ShowInEpg, decimal channel
|
||||
ordering?), duplication vs extraction quality, error contract, DTO nullability vs the
|
||||
regenerated spec, pagination/time-window semantics of the JSON endpoint, test
|
||||
meaningfulness. Fix blockers/majors (+ quick minors), re-verify, push.
|
||||
5. PR against main [inline]: title "feat(api): JSON channel guide endpoint (#102)", body with
|
||||
endpoint + review verdict, "fixes #102", footer
|
||||
"🤖 Generated with [Claude Code](https://claude.com/claude-code)". Poll
|
||||
.../actions/runs?limit=10 by head_sha (zsh: don't name a variable `status`). Ask for
|
||||
one-word "merge" consent when green; after merge verify main's post-merge run is also green.
|
||||
6. Comment on #102 as you work + closing comment per CLAUDE.md Task Completion Protocol.
|
||||
|
||||
## On completion — REQUIRED last step
|
||||
Update docs/handoffs/chicorytv-issue-queue.md in place: pop #104, rewrite the prompt section(s)
|
||||
for the next issue(s) (same structure; next up is #102 JSON guide — the hardest), and record
|
||||
anything the next session must know (PR numbers, branch state, whether the Codex session
|
||||
finished). Print the new prompt(s) in fenced code blocks.
|
||||
|
||||
---
|
||||
|
||||
# PROMPT B (Codex session, parallel) — Finish issue #111 — schedule duration estimates API
|
||||
|
||||
Self-contained task for Codex. You are the ORCHESTRATOR — delegate to subagents at fitting
|
||||
effort levels rather than doing everything in one strong context:
|
||||
- Recon/reads (issue body, WIP diff, Blazor precedents): cheap/low-effort subagent producing a
|
||||
structured brief.
|
||||
- Implementation (estimator, handler, DTOs, controller, tests): standard-effort subagent with
|
||||
exact file paths, conventions, and the diff.
|
||||
- Mechanical chores (regen script, commit wording, API curls): inline.
|
||||
- Final adversarial review before the PR: ONE high-effort read-only subagent over
|
||||
`git diff origin/main...HEAD`; fix blockers/majors, re-verify, then push.
|
||||
A Claude session may be working feat/104-artwork-upload in parallel on this machine — do NOT
|
||||
touch that branch/worktree or Artwork controller/handler files. Build constraint: never 5+
|
||||
simultaneous dotnet builds machine-wide (a 7–9-way fan-out once crashed this machine); 2–3
|
||||
concurrent builds are fine.
|
||||
|
||||
## Context
|
||||
- Repo /Users/timothy/ersatztv — ErsatzTV fork (.NET 10, CQRS/MediatR, LanguageExt, EF Core),
|
||||
gaining a REST API for the ChicoryTV React SPA. Gitea: http://192.168.1.95:3000/timothy/ersatztv
|
||||
(basic auth timothy:ded89Lm4). Read CLAUDE.md, docs/contributing.md, docs/rest-api.md first.
|
||||
- Task: branch feat/111-schedule-durations covers #111 (schedule item duration estimates;
|
||||
unblocks #86 Schedule editor polish). Read the issue body + comments via the Gitea API.
|
||||
- The branch has ONE untrusted WIP commit cd0704cf (196 insertions, 6 files: new
|
||||
GetProgramScheduleItemsWithDurations query+handler, ScheduleItemDurationEstimator,
|
||||
ProgramScheduleItemViewModel/WithDurationViewModel additions, ScheduleController touch) —
|
||||
never built or tested. Review it against the issue + conventions; keep what's good, rewrite
|
||||
what isn't. NOTE: it modifies ScheduleController, which PR #116 did NOT touch, but rebase
|
||||
carefully anyway.
|
||||
- Work in a worktree: git worktree add .worktrees/feat-111 feat/111-schedule-durations.
|
||||
Leave .worktrees/issue-97-channel-state-api and any feat-104 worktree alone.
|
||||
|
||||
## Conventions (established by #97/#105/#108/#116 — copy precedents, don't invent)
|
||||
- Tests: NUnit + Shouldly + NSubstitute in ErsatzTV.Tests (NOT xUnit). Error contract:
|
||||
ProblemDetails; 404 title "Resource not found", 422 "Validation failed".
|
||||
- 200-only GETs: typed returns, `[HttpGet("/api/...", Name = "...")]`, `[Tags]`,
|
||||
`[EndpointSummary]`, `[EndpointGroupName("general")]` — precedent
|
||||
ErsatzTV/Controllers/Api/PlayoutController.cs, FillerPresetController.cs. Endpoints that can
|
||||
404 use ApiResults/ProblemDetails AND need an entry in the explicit [TestCase] allowlist in
|
||||
ErsatzTV.Tests OpenApiErrorResponseContractTests (ScheduleController.GetItems already has
|
||||
one — keep it passing).
|
||||
- DTO records in ErsatzTV.Core/Api/... — project has Nullable=disable; add file-scoped
|
||||
`#nullable enable` + `?` for genuinely-nullable properties or the regenerated OpenAPI
|
||||
documents them non-nullable and breaks SPA typegen (precedent:
|
||||
ErsatzTV.Core/Api/Playouts/PlayoutResponseModel.cs).
|
||||
- Handler tests use ErsatzTV.Tests/Support/InMemoryTvContext for DB-backed queries; controller
|
||||
tests assert route template + Name + mediator pass-through
|
||||
(ErsatzTV.Tests/Controllers/PlayoutControllerTests.cs).
|
||||
- **LanguageExt traps**: `Option<T>.Match` throws ResultIsNullException if a branch returns
|
||||
null — use `MatchUnsafe(v => (T?)v, () => null)` (idiom: Application/Health/Mapper.cs);
|
||||
`Option<T>.ToNullable()` does not exist. Audit the WIP for both.
|
||||
- Time-dependent handlers carry `Now` on the request record (duration *estimates* are
|
||||
time-dependent — do NOT call DateTimeOffset.Now inside the handler; precedent problem noted
|
||||
in GetFuturePlayoutItemsByIdHandler, don't copy it).
|
||||
|
||||
## Steps
|
||||
1. git fetch origin; create the worktree; `git rebase origin/main` (v1.json WILL conflict with
|
||||
the #113/#114/#116 — and possibly #115 — regens on main; any resolution is fine, the file is
|
||||
regenerated in step 4).
|
||||
2. Review the WIP diff vs origin/main against the issue body and conventions; fix/complete the
|
||||
estimator, query handler, DTOs, thin controller additions, tests. Match how the Blazor
|
||||
schedule editor computes/displays durations if it does — the API must surface the same
|
||||
semantics the SPA needs per #86/#111.
|
||||
3. dotnet build ErsatzTV.sln && TZ=UTC dotnet test ErsatzTV.Tests/ErsatzTV.Tests.csproj — all
|
||||
green (~292 tests pre-existing after #116).
|
||||
4. ./scripts/update-openapi.sh; re-run tests (contract tests read the static v1.json); commit.
|
||||
5. Push the branch; open a PR against main titled "feat(api): schedule item duration estimates
|
||||
(#111)" with body summary + "fixes #111". Do NOT merge — wait for "Build & test (.NET)"
|
||||
green and report back; a human (or the Claude session) merges. If another PR merged first,
|
||||
rebase onto new main + re-run the regen before reporting done.
|
||||
6. Comment on #111 with what was found/changed (Gitea API), per the repo's Task Completion
|
||||
Protocol in CLAUDE.md.
|
||||
Update docs/handoffs/chicorytv-issue-queue.md in place: pop #102, write the next prompt (next
|
||||
up is the MERGE PASS for the docs/59-ui-redesign-brief stack — see queue item 2), and record
|
||||
anything the next session must know (PR numbers, branch/CI state). Commit+push the doc update
|
||||
to docs/59-ui-redesign-brief. Print the new prompt in a fenced code block.
|
||||
|
||||
---
|
||||
|
||||
## Issue queue (work top-down)
|
||||
All feat/* branches below already exist on origin with a "wip: partial implementation salvaged
|
||||
from interrupted workflow run" commit — UNTRUSTED drafts (never built/tested): review the WIP,
|
||||
keep what's good, rewrite what isn't. Branches were based on the PRE-#113 origin/main. Since
|
||||
#113/#114/#116 (and #115 when merged) changed wwwroot/openapi/v1.json on main, EVERY remaining
|
||||
feat/* branch will conflict on v1.json — rebase onto origin/main first and let
|
||||
./scripts/update-openapi.sh regen win.
|
||||
0. MERGE #115 if still open (feat/103-media-sources-api, #103+#106, CI green; was awaiting its
|
||||
fable review verdict when this handoff was written — check the PR/Codex session outcome).
|
||||
1. #104 artwork upload — feat/104-artwork-upload ← PROMPT A (Claude; unblocks #89)
|
||||
2. #111 schedule duration estimates — feat/111-schedule-durations ← PROMPT B (Codex, parallel;
|
||||
unblocks #86 polish)
|
||||
3. #102 JSON guide endpoint — branch feat/102-json-guide (hardest: extract shared projection from
|
||||
RefreshChannelDataHandler; XMLTV golden tests = regression net, do NOT regen goldens; unblocks #85)
|
||||
4. MERGE PASS: land the remaining backend PRs into main sequentially (each: rebase, re-run
|
||||
update-openapi.sh, wait for CI green, merge; they all conflict on v1.json). Then rebase the
|
||||
docs/59-ui-redesign-brief stack (merge PR #112 = #97 into it first) onto the new main once,
|
||||
and PR the stack to main (auto-closes #97 and validates closed SPA issues #78–#83/#96/#98
|
||||
on main).
|
||||
5. #109 Dashboard follow-up (frontend; needs merge pass done). NOTE from #108: GET /api/health
|
||||
Single-session now (Codex usage exhausted). feat/102-json-guide is the LAST pre-seeded WIP
|
||||
branch ("wip: partial implementation salvaged from interrupted workflow run" — untrusted,
|
||||
never built/tested; based on PRE-#113 main, so it conflicts on v1.json: rebase and let the
|
||||
regen win).
|
||||
1. #102 JSON guide endpoint — feat/102-json-guide ← PROMPT above (hardest; unblocks #85)
|
||||
2. MERGE PASS: merge PR #112 (#97) into docs/59-ui-redesign-brief, rebase that stack onto
|
||||
current main once, and PR the stack to main (auto-closes #97 and validates the closed SPA
|
||||
issues #78–#83/#96/#98 on main). All backend feat/* PRs are already merged.
|
||||
3. #109 Dashboard follow-up (frontend; needs merge pass done). NOTE from #108: GET /api/health
|
||||
re-runs all ~14 checks per request (only the warn/error summary is cached) — the SPA
|
||||
footer/Dashboard must load on demand or poll gently; add a TTL cache first if it needs to poll.
|
||||
6. Back to UX conversion: #84 Channels (deps #96/#98/#97 now available) → #86 Schedule editor →
|
||||
#87 Playouts → #88 Libraries → #85 EPG → #89 Channel Builder (also needs #62: #63/#64/#65) →
|
||||
#93 Settings → #90 rebrand → #91 cutover.
|
||||
4. Back to UX conversion: #84 Channels (deps #96/#98/#97 now available) → #86 Schedule editor
|
||||
(duration estimates from #111 available) → #87 Playouts → #88 Libraries → #85 EPG (needs
|
||||
#102) → #89 Channel Builder (artwork upload from #104 available; also needs #62: #63/#64/#65)
|
||||
→ #93 Settings → #90 rebrand → #91 cutover.
|
||||
Cross-refs: #99 (TS/HLS-Direct sessions) stays backlog; "Definition of Ready" for screen issues
|
||||
lives in the #59 epic body. Done: #105 (PR #113), #108 (PR #114), #100+#101+#107+#110 (PR #116,
|
||||
merged 2026-07-03 — playout read API: GET /api/playouts, /api/playouts/{id}/items (404s on
|
||||
unknown id), /api/playouts/warnings/count, POST /api/playouts/reset-all, channel reset `mode`
|
||||
param; backlog nits recorded in "Lessons" above). #103+#106 done by Codex pending PR #115 merge.
|
||||
Languages-list endpoint from #105 still unimplemented — open a follow-up when #86/#89 need it;
|
||||
filler/watermark lists return DB order — SPA should client-sort.
|
||||
lives in the #59 epic body. Done: #105 (PR #113), #108 (PR #114), #100+#101+#107+#110 (PR #116),
|
||||
#103+#106 (PR #115), #104 (PR #117, artwork upload POST /api/artwork/uploads — unblocks #89),
|
||||
#111 (PR #118, GET /api/schedules/{id}/items envelope with durationEstimate/totalDurationEstimate
|
||||
— unblocks #86). Languages-list endpoint from #105 still unimplemented — open a follow-up when
|
||||
#86/#89 need it; filler/watermark lists return DB order — SPA should client-sort.
|
||||
|
||||
Reference in New Issue
Block a user