Skip to content

fix(layout): show no-webcam for camera-less projects - #310

Open
arhxam wants to merge 2 commits into
getopenscreen:mainfrom
arhxam:codex/camera-less-layout-state
Open

fix(layout): show no-webcam for camera-less projects#310
arhxam wants to merge 2 commits into
getopenscreen:mainfrom
arhxam:codex/camera-less-layout-state

Conversation

@arhxam

@arhxamarhxam commented Aug 8, 2026

Copy link
Copy Markdown

Summary

  • derive the layout pane's displayed preset from actual camera availability
  • show the disabled No Webcam state for camera-less timelines, matching preview/export behavior
  • hide PiP-only shape, size, and reactive-zoom controls when no camera exists
  • preserve the stored camera layout preference so it returns unchanged when a camera-backed clip is present

This completes the remaining UI portion of #248 after the renderer/export correction merged in #261.

Related issue

Fixes#248

Type of change

  • Bug fix
  • Feature
  • Enhancement
  • Documentation
  • Refactor / maintenance
  • Performance
  • Security

Release impact

  • Patch
  • Minor
  • Major / breaking change
  • No release note needed

Desktop impact

  • Windows
  • macOS
  • Linux
  • Installer / packaging
  • Not platform-specific

Screenshots / video

Not included; DOM regression coverage verifies both camera-less and camera-present states.

Testing

  • Started with a failing camera-less selector regression test (picture-in-picture was displayed)
  • npx vitest --run src/components/ai-edition/RightPanes.layout.test.tsx src/components/ai-edition/RightPanes.i18n.test.tsx (7 passed)
  • npm run test (1,679 passed, 1 skipped across 141 files)
  • npx tsc --noEmit
  • npx tsc -p tsconfig.test.json --noEmit
  • npx biome check src/components/ai-edition/RightPanes.tsx src/components/ai-edition/RightPanes.layout.test.tsx
  • npm run docs:check
  • npm run i18n:check
  • npm run build-vite

Authored with Codex assistance and manually verified against the remaining #248 UI behavior.

Summary by CodeRabbit

  • Bug Fixes
    • Improved layout behavior when no webcam footage is available.
    • Webcam-dependent controls are now disabled and the interface displays a “no webcam” layout.
    • Saved webcam preferences are preserved and automatically restored when camera footage is available.
    • Camera-specific controls and reactive zoom now correctly reflect the available footage.

@coderabbitai

coderabbitaiBot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@arhxam, you've reached your PR review limit, so we couldn't start this review.

Next review available in:25 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b0812d0-c6e5-4a38-8716-cbcb61c3e4d9

📥 Commits

Reviewing files that changed from the base of the PR and between ff2f1c6 and 7fad1f1.

📒 Files selected for processing (1)
  • src/components/ai-edition/RightPanes.layout.test.tsx
📝 Walkthrough

Walkthrough

LayoutPane now uses a no-webcam effective layout when no camera clips exist. Tests cover camera-present and camera-absent projects while confirming that the saved preset remains unchanged.

Changes

Camera-aware layout handling

Layer / File(s)Summary
Effective layout and test coverage
src/components/ai-edition/RightPanes.tsx, src/components/ai-edition/RightPanes.layout.test.tsx
LayoutPane derives no-webcam when no camera track exists, updates related control visibility, preserves the saved preset, and adds tests for both camera states.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers:etiennelescot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly describes the primary change: showing the No Webcam layout for projects without camera tracks.
Description check✅ PassedThe description includes the required summary, issue reference, change type, release impact, platform impact, screenshots note, and detailed testing.
Linked Issues check✅ PassedThe changes satisfy issue #248 by showing No Webcam for camera-less timelines and preventing the incorrect Picture in Picture state.
Out of Scope Changes check✅ PassedThe implementation and regression tests directly support issue #248 and the stated layout-pane objectives.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/ai-edition/RightPanes.layout.test.tsx`:
- Around line 67-88: The “LayoutPane camera availability” tests need to cover
all camera-dependent UI behavior when no camera is available. Extend the
no-camera case to assert reactive zoom and webcam size are hidden, and verify
the remaining camera-dependent controls are disabled; keep the existing
saved-preset assertions unchanged and add coverage in this test file for each
new branch.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f87047f2-ff91-4d9d-9804-be27ca140d0b

📥 Commits

Reviewing files that changed from the base of the PR and between 4e7a85b and ff2f1c6.

📒 Files selected for processing (2)
  • src/components/ai-edition/RightPanes.layout.test.tsx
  • src/components/ai-edition/RightPanes.tsx

Comment threadsrc/components/ai-edition/RightPanes.layout.test.tsx
Sign up for freeto 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.

[Bug]: If no webcam is set, picture-in picture mode is locked by default

1 participant

@arhxam