Repository navigation
feat(setup-ui): Recordings tab with list, playback and download - #228
Conversation
Add a read-only Recordings tab after Outputs. It lists
GET /api/v1/recordings, or GET /api/v1/productions/:id/recordings when a
production filter is chosen, sorted newest first by startedAt. Columns:
file name (key basename), production name ("Deleted production" with the
id when it is gone), started, duration (durationMs, "unknown" when
absent), size and storage ("Default" without a connectionId). Each
production row gets a Recordings shortcut that opens the tab filtered.
Play opens a player that fetches GET /api/v1/recordings/:id every time
(the listed presigned URL expires after RECORDING_PRESIGN_TTL_S). Download
fetches a fresh link too and uses downloadUrl, falling back to opening
playbackUrl in a new tab. A row without playbackUrl shows the
playbackUnavailable reason with Play and Download disabled. A video load
failure is classified as link expired/denied, host unreachable from this
browser (mentions https on an https page) or unsupported file, with a
"Reload link" that refetches the recording.
The selected production's lastRecordingUpload drives a failure banner
(count, reason, retry note). While a deactivate for it is in flight in
this browser the tab shows "Uploading recordings" and refreshes the list
when it finishes. A backend 503 shows the backend message with Retry and
never the empty message. Recordings calls are quiet so each error is
shown once, inline.
Closes #220
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
daily-backlog-pr Phase 3:
The conflict was not force-resolved. The card goes back to Ready. Phase 2's conflict path will merge |
…s-tab Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
PR Review: feat(setup-ui): Recordings tab with list, playback and download
Verdict: APPROVE
Prior findings
Sources read: PR #228 reviews (none), PR review comments (none), PR issue comments (1, birme 2026-10-19), issue #220 comments (none), parent #216 body and comments. There is no earlier REQUEST CHANGES review. The earlier read-through APPROVE was on 5ef6a1c. The head is now the merge 5f44687, which this review covers.
| # | Finding / criterion (source) | Status | Evidence on head 5f44687 |
|---|---|---|---|
| 1 | Merge conflict with #227 in src/lib/api.ts / src/store/productions.store.ts: keep both ActivationWarning[] and lastRecordingUpload (birme, PR comment 2026-10-19) |
FIXED | 5f44687: src/lib/api.ts:259-261,292-293,317-318; src/store/productions.store.ts:5,35-36,91-92. #227's change is intact |
| 2 | Blocked on Eyevinn/open-live#534 items 2, 4, 5, 6, 7 (#220 body) | FIXED (upstream) | open-live#534 was closed by open-live#543 (merged 2026-10-19). The fields and routes on open-live main match the Studio types at src/lib/api.ts:928-981 |
| 3 | Blocked by #219 (#220 body) | FIXED (upstream) | #219 is closed. PR #225 is in this branch's base |
| 4 | 19: tab after Outputs, list/filter, newest first, shortcut on production rows | FIXED | src/pages/SetupPage/index.tsx:20,32-33,67; src/store/recordings.store.ts:64-90; src/lib/recordings.ts:40-46; ProductionsPanel.tsx:1299 |
| 5 | 20: columns | FIXED | src/lib/recordings.ts:26-29,49-57,80-96; RecordingsPanel.tsx:183-216. mixerInput is not handled, correctly: it depends on open-live#411 |
| 6 | 21: fresh-link Play, Download via downloadUrl or a playbackUrl fallback |
FIXED | RecordingPlayerModal.tsx:42-60; recordings.store.ts:92-99; RecordingsPanel.tsx:82-115; recordings.ts:119-123 |
| 7 | 22: upload-failure banner, "Uploading recordings" state | FIXED | src/lib/recordings.ts:154-170,280-294; RecordingsPanel.tsx:60-68,75-76,146-160 |
| 8 | 23: empty, 503 with Retry, disabled rows, player error states, "Reload link" | FIXED | RecordingsPanel.tsx:117,163-177,201-203,218-227; recordings.ts:98-116,186-273; RecordingPlayerModal.tsx:62-75,106-113 |
| 9 | 24: read-only | FIXED | recordingsApi (src/lib/api.ts:985-993) only sends GET |
| 10 | Unit tests: list store, fresh-link fetch, error states | FIXED | src/store/recordings.store.test.ts, src/lib/recordings.test.ts. 24 files / 215 tests pass on 5f44687 |
| 11 | Phase 4 live criteria (#216) | FIXED (code), live run outstanding | The code paths are rows 4-8. A live check is still needed: tester on openlivedev after deploy (beta-regression gate) |
Critical Issues
None.
Warnings (non-blocking)
RecordingsPanel.tsx:107window.location.assign(downloadUrl): if the storage host can't be reached, the SPA navigates away from Studio. A hidden<a download>orwindow.openwould keep the page.- A Recordings shortcut for a deleted production (stale
?production=URL) gets a 404 "Production not found" instead of that production's orphaned recordings, which are still listed under "All productions".
Nits
- CI runs lint, typecheck and build but not
pnpm test. This is outside this PR.
What Was Verified
- Merge resolution in 5f44687 is the union of #227 and this PR. No fabricated fields: the types match open-live main exactly. The tab still works against an older backend or with missing fields. Stale-response guards are in place.
- Local run on 5f44687: lint, typecheck, build and test (215/215) pass. CI
build-and-lintis green. - No secrets. Presigned URLs are not logged. No new write routes.
Summary
GET /api/v1/recordings/:id, so an expired presigned URL from the list is never used.lastRecordingUploadfailure banner, an "Uploading recordings" state during deactivate, and a separate message plus Retry for each error and empty state.Closes #220
Changes
src/lib/api.ts:ApiRecording,PlaybackUnavailableReason,RecordingUploadSummary,RecordingUploadReasonandrecordingsApi(list,listForProduction,get), allquietso each error shows once, inline. AddslastRecordingUploadto the production shape. These match open-live main (src/routes/recordings.ts,src/db/types.ts, from feat(recording): connection-only recording target, downloads and upload outcome open-live#543). No fields were invented.src/lib/recordings.ts(new): pure helpers. Newest-first sort bystartedAt, key basename, joins to production names ("Deleted production (id)") and storage names ("Default"), duration formatting ("unknown" whendurationMsis absent),playbackUnavailabletext,downloadUrlwith aplaybackUrlnew-tab fallback, upload banner, deactivate-in-flight detection, and the player error classification.src/store/recordings.store.ts(new): the list for all recordings or one production, with a request sequence number so a stale response cannot overwrite the list after the filter changes.loadErrorkeeps the backend message and status.fetchFresh(id)re-reads one recording.src/pages/SetupPage/RecordingsPanel.tsx(new): the table (file, production, started, duration, size, storage), production filter, Refresh, banners, empty and 503 states, and per-row Play and Download. A row withoutplaybackUrlshows the reason, and Play and Download are disabled.src/pages/SetupPage/RecordingPlayerModal.tsx(new): fetches a fresh link each time it opens or "Reload link" is clicked. If<video>fails, it probes the URL to tell apart: link expired or denied (403), host not reachable from this browser (mentions https when Studio uses https, and covers mixed content), and unsupported file.src/pages/SetupPage/index.tsx: Recordings tab.?tab=recordings&production=<id>opens it with that production filtered.src/pages/SetupPage/ProductionsPanel.tsx: read-only "Recordings" shortcut on each production row.src/store/productions.store.ts: carrieslastRecordingUploadthrough.Test Plan
pnpm test: 23 files, 206 tests; 42 new insrc/lib/recordings.test.tsandsrc/store/recordings.store.test.ts). They cover the list store (sorting, production filter, stale-response guard, join to production names), the fresh-link fetch on Play (fetchFreshrefetches every call,recordingsApi.getpath), and each error state (503 with no toast, 404, network, empty,playbackUnavailablereasons, upload banner, player expired/denied/unreachable/unsupported).pnpm run lint(0 warnings),pnpm run typecheck,pnpm run buildpass..mp4download, a 403 storage key to see the banner,RECORDING_PRESIGN_TTL_S=60to check that Play still works after 2 min, an unreachable storage endpoint, and DB down (503). Not run here because there is no live backend in this environment. Needstesteron openlivedev.Checklist
Notes:
mixerInputper-input recordings (item 20) are not handled.RecordingDocon open-live main has nomixerInput; it only exists if feat(recording): record inputs chosen per source assignment open-live#411 lands.<video>cannot report an HTTP status. After a failure Studio checks the link's expiry and mixed content, then probes it with ano-corsrequest (host reachable or not) and acorsrange request (reads the status if the bucket has a CORS rule). If neither gives a status, a decode error counts as "unsupported" and anything else as "expired or denied", which "Reload link" addresses.🤖 Generated with Claude Code