Skip to content

feat(setup-ui): Recording output type with storage selector - #225

Merged
birme merged 2 commits into
mainfrom
feat/studio/recording-output-storage
Oct 19, 2026
Merged

birme merged 2 commits into
mainfrom
feat/studio/recording-output-storage

Conversation

@eyevinn-developer

Copy link
Copy Markdown
Contributor

Summary

Closes #219

Backend prerequisite checked on open-live main (e737975, PR Eyevinn/open-live#543): POST /api/v1/outputs accepts outputType: "recording" with a connectionId that resolves and has a default bucket, without MINIO_*. The 400 messages are Recording needs object storage: …, Storage connection not found and Storage connection has no default bucket. PATCH re-validates connectionId. "default" resolves to the env storage everywhere. Note: docs/openapi.yaml on open-live does not document connectionId on outputs yet; Studio follows src/routes/outputs.ts.

Changes

  • src/lib/api.ts: OutputType gains recording, ApiOutput.connectionId?, and new OutputCreateInput/OutputPatchInput types. outputsApi.create/update are quiet so the dialog is the only place the error appears.
  • src/lib/recordingOutput.ts (new): pure helpers.
    • Storage options: the default entry only when the backend lists it, plus connections with role 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.
    • Row label (connection name, Default, or Unknown connection (id)).
    • Create/patch bodies. The default sends no connectionId on create. Re-pointing to the default sends the reserved id "default" because PATCH cannot remove a field.
    • The second-Recording conflict check and the help/refusal texts.
    • Inline error message.
  • src/pages/SetupPage/OutputsPanel.tsx:
    • Recording is a creatable type with a Storage select. If nothing can be selected, the dialog shows "No storage available" with a link to the Storage tab, and Save is disabled.
    • Recording rows show Storage: <connection>. The Edit dialog re-points the output through PATCH.
    • Create and edit errors (all output types) are shown inline. The dialog stays open with the entered values.
  • src/pages/SetupPage/index.tsx: passes onOpenStorage so the link switches to the Storage tab.
  • src/pages/SetupPage/ProductionsPanel.tsx:
    • Output slots get a Recording tag and optgroup (RTMP gets one too).
    • Help line: "Recording runs while this production is active. Adding or removing it takes effect the next time the production is activated."
    • On an active production the same line appears as a notice next to the slot.
    • Once a slot holds a Recording output, other Recording outputs are disabled in the other slots with the label "(one Recording per production)". The assigned slot explains that open-live records only the first one assigned. handleOutputChange also guards against it.
  • Tests: src/lib/recordingOutput.test.ts and src/store/outputs.store.test.ts.
    • Option filtering by role, the default entry, no-storage, no-bucket and dangling connections.
    • Create with and without connectionId, and re-point patches including back to the default.
    • The second-Recording conflict.
    • Error messages, including zod issues.
    • outputsApi create/patch throwing the backend 400 with no toast.
    • Store create/patch success and rejection.

Test Plan

  • Unit tests pass (pnpm test: 20 files, 149 tests)
  • Lint (pnpm run lint, zero warnings), typecheck and build pass
  • Integration tests: none in this repo
  • Manual verification on openlivedev, still to do: create a Recording output on a stored recording connection 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

  • Code-quality checks passed
  • No hardcoded SRT ports
  • GStreamer pipelines have watchdogs (if applicable): n/a
  • EFP sequence validation present (if applicable): n/a
  • docs/repo-patterns.md updated if non-obvious issue encountered: Studio has no repo-patterns.md

Notes for review:

  • SRT and RTMP create/edit errors also moved from a toast to an inline message in the dialog. Before, they raised a toast and left an unhandled rejection.
  • .github/workflows/ci.yml does not run pnpm test. This PR does not touch workflows.
  • It does not touch the s3 clip form or the bucket browser (OL-21b.2: Read-only bucket browser for s3 clip references #218).

🤖 Generated with Claude Code

Claude Agent and others added 2 commits October 19, 2026 14:24
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>
@birme

birme commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

daily-backlog-pr Phase 3: the pr-reviewer read-through verdict on f5c624f was APPROVE (Prior findings table: every #219 / #216 Phase 3 row FIXED, none OPEN). The branch was BEHIND main after #224 merged, and this repo requires build-and-lint to have run against current main, so the branch was refreshed with update-branch (new head 8fe6f2a, a merge of main only). The App approval is submitted on the current head once CI is green; there is no second review.

@eyevinn-pr-reviewer eyevinn-pr-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-lint passes. 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.yaml does not document connectionId on outputs (a backend docs gap).

@birme
birme merged commit d66e4de into main Oct 19, 2026
1 check passed
@birme
birme deleted the feat/studio/recording-output-storage branch October 19, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OL-21b.3: Recording output type with storage selector (blocked on open-live#534 items 1-2)

1 participant