Repository navigation
fix(sources): a scene that shows a source you turned off waits with plain copy - #824
Conversation
…lain copy With Screen set to None while Screen + camera stayed the active scene (or Camera Off on Camera only), Record, Go Live and Clips started a session that the backend refused with 'the screen preview source(s) produced no frames ... Re-select the source (or restart the app)', and Clips burned its three start attempts. The start now waits up front and says which source the scene shows and how to fix it. A chosen-but-missing source is unchanged. Recalibrates the eager gzip budget to 400,000 with the same edit as #817. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Detect explicit source-off state apps/desktop/src/renderer/src/lib/scene-presets.ts, apps/desktop/src/renderer/src/lib/start-blocked-copy.ts, apps/desktop/src/renderer/src/lib/scene-presets.test.ts |
New helpers identify explicitly turned-off screen and camera sources and return source-specific blocking messages. Tests cover single-source and combined blocking, and cases where a source does not count as explicitly turned off. |
Apply source-off blocking to starts apps/desktop/src/renderer/src/hooks/use-studio.tsx |
The start-reason callback checks the requested scene sources against the current device list. It returns a source-off reason before checking profile entitlements. |
Renderer asset budget
| Layer / File(s) | Summary |
|---|---|
Update renderer gzip ceiling scripts/check-renderer-asset-budget.mjs |
The default total gzip limit increases from 395,000 to 400,000 bytes. A calibration comment records the measurements and associated Studio fixes. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant StartIntent
participant startBlockedReasonFor
participant sceneSourcesTurnedOff
participant sceneSourceOffBlockedReason
StartIntent->>startBlockedReasonFor: layout, visual sources, and current devices
startBlockedReasonFor->>sceneSourcesTurnedOff: inspect required screen and camera sources
sceneSourcesTurnedOff-->>startBlockedReasonFor: screen and camera off flags
startBlockedReasonFor->>sceneSourceOffBlockedReason: build reason from off flags
sceneSourceOffBlockedReason-->>startBlockedReasonFor: source-specific reason or null
startBlockedReasonFor-->>StartIntent: return blocker before entitlement checks
Possibly related PRs
- TheOrcDev/videorc#817: Both changes affect source selection in
use-studio.tsxand use the same renderer asset-budget recalibration. - TheOrcDev/videorc#803: It covers persistence of explicit Screen None selections, which this change reads when determining whether to block starts.
- TheOrcDev/videorc#823: It changes Clips rearming based on source or blocker changes, and this change adds a source-off blocker to the shared start-blocked state.
Merge Risk: 
Minimal · up to 74b86
-
The source-off change is ready to merge with normal checks; no actionable blocking issue was established.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 inconclusive Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title names the main change: a scene that shows a source the user turned off now waits with plain copy. The raw summary confirms the change adds a source-off check to start blocking and a tailored reason message. The title is specific and conventional. It does not list every file, which is expected. The 'fix(sources)' scope is slightly generic, but the description still names the affected behavior.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 4 files. (1 skipped: 1 too large.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
…opy (#829) Sonner has two button slots. #797 put Copy in the free one, so a toast that used both (Recording / Livestream stopped unexpectedly: Open in Library and Show in folder) dropped it, on the error users most need to send to support. Copy now rides after the description there and closes the toast like the slot's Copy. Recalibrates the eager gzip budget with the same edit as #817 and #824. Co-authored-by: OrcDev <billing@videorc.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Symptom
Found in the Linux retest on ogre (retest 150). Fresh profile: the active scene is Screen + camera. Sources → Screen → None (the #742 sticky None). The gallery greys the screen scenes ("No screen is chosen…"), but Screen + camera stays the active scene. Then:
evidence/screen-none/record-attempt.png). Restarting doesn't help, and "re-select the source" isn't what the user needs.The scene the renderer sends still has a visible
screenlayer with no source (scene.get:[('screen', True, None), ('camera', True, …)]). The backend's start preflight correctly refuses to record something that doesn't match the preview.Fix (renderer)
sceneSourcesTurnedOff(visual, devices)(lib/scene-presets.ts): which sources the active scene shows that were turned off on purpose (captureOff/cameraOff). A never-chosen or chosen-but-missing source is unchanged (it can come back, and the existing paths handle it).sceneSourceOffBlockedReason(lib/start-blocked-copy.ts): the start-blocked copy:startBlockedReasonForchecks it right after the connection and session checks, so Record, Go Live, remote intents and Clips (Starts once a source is ready. …) all wait instead of starting a doomed session.Budget: +281 eager gzip bytes; main has 152 bytes of headroom (394,848 / 395,000). Recalibrated to 400,000 with an edit byte-identical to the one now on #817, so the two merge in either order (checked with
git merge-tree).Tests
scene-presets.test.ts: Screen None on Screen + camera, Camera Off on Camera only, both; a scene without the turned-off source starts; never-chosen and missing sources aren't treated as turned off. 33/33.studio-provider.integration.test.ts,capture.test.ts,scene-presets.test.ts: 351/351.pnpm typecheckclean,pnpm lint0 errors (the one pre-existing exhaustive-deps warning).Real-app verification (ogre, Linux, production renderer + release backend)
replay.statuson, buffer-only)🤖 Generated with Claude Code
Summary by CodeRabbit