Skip to content

fix(cli): let the Linux portal select recording sources - #1080

Merged
EtienneLescot merged 2 commits into
getopenscreen:mainfrom
mcmah309:fix/cli-portal-source-selection
Oct 10, 2026
Merged

EtienneLescot merged 2 commits into
getopenscreen:mainfrom
mcmah309:fix/cli-portal-source-selection

Conversation

@mcmah309

@mcmah309 mcmah309 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

openscreen record on Linux with the native PipeWire helper no longer enumerates Chromium sources first. That enumeration raised a redundant portal picker before the helper's own, and could return no screens (Display index 0 not found). The portal now chooses the source, as it already does in the HUD; the CLI logs that --display and --window do not apply there.

Other capture paths are unchanged: Windows, macOS and Linux without the helper still pick and validate a source through pickSource + selectSource.

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

Testing

  • src/cli/CliRecordRunner.test.tsx: native Linux skips enumeration and selection; Linux without the helper still selects, and reports a missing display.
  • Physical portal capture not tested.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • On Linux, recording now uses native capture’s source selection when available, skipping Chromium source enumeration and selection. The CLI reports that --display and --window don’t apply in this mode.
    • When native capture is unavailable, source selection continues through Chromium, with an error reported if the requested display isn’t available.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3b422757-95b0-4f35-af51-044aeb6e9f5a

📥 Commits

Reviewing files that changed from the base of the PR and between c5b2a95 and c187ecb.


You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b6c658a8-f09f-480a-a7e9-4f812a20ce1d


📥 Commits

Reviewing files that changed from the base of the PR and between 870196c and c5b2a95.



📒 Files selected for processing (2)
  • src/cli/CliRecordRunner.test.tsx
  • src/cli/CliRecordRunner.tsx


Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.




📝 Walkthrough
📝 Walkthrough

Walkthrough

The CLI now skips Chromium source enumeration and selection when the Linux portal owns source selection. Otherwise, it retains Chromium selection and its unavailable-source error handling. Tests cover both paths.

Changes

Linux source selection

Layer / File(s) Summary
Source selection branch and validation
src/cli/CliRecordRunner.tsx, src/cli/CliRecordRunner.test.tsx
When the portal owns source selection, the runner skips Chromium enumeration and selection, and logs that --display and --window do not apply. Tests cover this path and the fallback to Chromium selection, including a missing display index.

Priority: ➖ Normal

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

Change: Bug fix



Merge Risk: ⚪ Minimal · up to c5b2a

On Linux with the native PipeWire helper, recording no longer enumerates Chromium sources before the portal picker opens. Other platforms keep their existing source selection. No merge-blocking risk was found.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly identifies the main change: allowing the Linux portal to select recording sources.
Description check Passed The description clearly explains the bug fix, affected platforms, release impact, testing, and the untested physical portal capture. The template's Related issue section is omitted, but the descriptio…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.



✨ Finishing Touches
🧪 Generate unit tests (beta)
  • 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.

❤️ Share

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

@EtienneLescot

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@EtienneLescot
EtienneLescot marked this pull request as ready for review October 10, 2026 09:08
@EtienneLescot
EtienneLescot self-requested a review as a code owner October 10, 2026 09:08
@EtienneLescot

Copy link
Copy Markdown
Collaborator

Marked ready: CI green; follow-up logs that the portal picks the source, and drops the results-log row that recorded no manual check.

@EtienneLescot

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@EtienneLescot

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@EtienneLescot EtienneLescot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed: the Linux portal owns source selection on the native path, other capture paths unchanged. Thanks @mcmah309!

@EtienneLescot
EtienneLescot force-pushed the fix/cli-portal-source-selection branch from c5b2a95 to c187ecb Compare October 10, 2026 10:00
@EtienneLescot
EtienneLescot merged commit d77c92b into getopenscreen:main Oct 10, 2026
18 checks passed
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.

2 participants