Repository navigation
feat(setup-ui): Recording output type with storage selector - #225
Conversation
Add `recording` to OutputType and the Outputs tab. The create form has a storage selector offering the instance default plus connections with role `recording` or `both`; with nothing selectable it shows "No storage available" with a link to the Storage tab and Save is disabled. The output row shows the connection, and the edit dialog re-points it through PATCH (re-pointing to the default sends the reserved id "default"). Production output slots label a Recording output, show the help line that changes take effect at the next activation (as a notice on an active production), and refuse a second Recording output with the reason. Output create/update are now quiet: the backend 400 is shown once inside the dialog, which stays open with the entered values. Closes #219 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
daily-backlog-pr Phase 3: the |
There was a problem hiding this comment.
PR Review: Recording output type with storage selector (Closes #219)
Verdict: APPROVE
The review covered f5c624f. The current head 8fe6f2a adds only an update-branch merge of main, and build-and-lint is green on it.
Prior findings
There were no earlier reviews or comments on this PR or on #219. The #216 comments add scope but no findings. The rows below are the #219 scope and the #216 Phase 3 acceptance criteria.
| # | Criterion | Status |
|---|---|---|
| 1 | recording in OutputType and the create form |
FIXED: src/lib/api.ts:163, OutputsPanel.tsx:25,32 |
| 2 | Storage selector: default plus recording/both connections |
FIXED: src/lib/recordingOutput.ts:31-33,60-82 |
| 3 | connectionId stored and shown; the default stores none |
FIXED: recordingOutput.ts:92-94, OutputsPanel.tsx:267,442 |
| 4 | "No storage available" with a Storage-tab link; Save disabled | FIXED: OutputsPanel.tsx:122-133,244-245, SetupPage/index.tsx:54 |
| 5 | Connection shown on the output row | FIXED: OutputsPanel.tsx:440-444 |
| 6 | Re-point through PATCH | FIXED: recordingOutput.ts:101-113 |
| 7 | A connection in use can't be deleted (409) | FIXED: backend storage-connections.ts:361; Studio StoragePanel.tsx:185 |
| 8 | Slot labelled "Recording" | FIXED: ProductionsPanel.tsx:255-266,296,700 |
| 9 | Help line and active-production notice | FIXED: recordingOutput.ts:12-13, ProductionsPanel.tsx:339,704 |
| 10 | A second Recording output is refused, with the reason | FIXED: recordingOutput.ts:119-131, ProductionsPanel.tsx:287,320-323,342,391 |
| 11 | Backend 400 shown once in the dialog, entered values kept | FIXED: api.ts:758,765, OutputsPanel.tsx:249-262,337-348; tested in recordingOutput.test.ts:155-183 |
No row is OPEN. Checked against open-live main e737975 src/routes/outputs.ts (POST/PATCH connectionId, the three recordingTargetError 400s, and "default").
What was verified
- CI
build-and-lintpasses. Locally: lint, typecheck and build pass, and vitest gives 20 files / 149 tests.
Warnings (not blocking)
- Studio CI does not run
pnpm test(pre-existing). - open-live
docs/openapi.yamldoes not documentconnectionIdon outputs (a backend docs gap).
Summary
Closes #219
Backend prerequisite checked on open-live main (
e737975, PR Eyevinn/open-live#543):POST /api/v1/outputsacceptsoutputType: "recording"with aconnectionIdthat resolves and has a default bucket, withoutMINIO_*. The 400 messages areRecording needs object storage: …,Storage connection not foundandStorage connection has no default bucket.PATCHre-validatesconnectionId."default"resolves to the env storage everywhere. Note:docs/openapi.yamlon open-live does not documentconnectionIdon outputs yet; Studio followssrc/routes/outputs.ts.Changes
src/lib/api.ts:OutputTypegainsrecording,ApiOutput.connectionId?, and newOutputCreateInput/OutputPatchInputtypes.outputsApi.create/updatearequietso the dialog is the only place the error appears.src/lib/recordingOutput.ts(new): pure helpers.recording/both. A connection with no default bucket is listed but disabled, because the backend rejects it. A current target that is no longer offered stays in the list on edit.Default, orUnknown connection (id)).connectionIdon create. Re-pointing to the default sends the reserved id"default"because PATCH cannot remove a field.src/pages/SetupPage/OutputsPanel.tsx:Storageselect. If nothing can be selected, the dialog shows "No storage available" with a link to the Storage tab, and Save is disabled.Storage: <connection>. The Edit dialog re-points the output through PATCH.src/pages/SetupPage/index.tsx: passesonOpenStorageso the link switches to the Storage tab.src/pages/SetupPage/ProductionsPanel.tsx:Recordingtag and optgroup (RTMP gets one too).handleOutputChangealso guards against it.src/lib/recordingOutput.test.tsandsrc/store/outputs.store.test.ts.connectionId, and re-point patches including back to the default.outputsApicreate/patch throwing the backend 400 with no toast.Test Plan
pnpm test: 20 files, 149 tests)pnpm run lint, zero warnings), typecheck and build passrecordingconnection and on the default. Re-point it. Try to delete the connection (expect the 409 in the Storage tab). Check that the selector shows "No storage available" without env storage and without connections. Assign two Recording outputs to one production. Open an active production's options to see the notice.Checklist
Notes for review:
.github/workflows/ci.ymldoes not runpnpm test. This PR does not touch workflows.🤖 Generated with Claude Code