You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mac): ignore stale picks from Apple's system picker - #1370
What was wrong. With Apple's system picker (macOS 15.2+), after Hide desktop icons dropped the chosen source, the next Start recorded a window picked in an earlier picker session. The TS side is correct: the stale window arrives from the Swift helper as a new picker-selected. The helper set SCContentSharingPicker.shared.isActive = true once and never reset it, and reported every didUpdateWith as an answer, including ones no presentation asked for.
Fix (PickerSession.swift only):
Each present() deactivates the shared picker before reconfiguring and reactivating it (skipped while a take is running, so its stream is untouched).
A selection or cancel that arrives while no presentation is waiting is ignored: it no longer replaces the retained pick and is logged as a picker-unrequested-pick warning.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
PickerSession now tracks pending picker presentations. It resets the shared picker when no recorder is running and handles cancellations and selections only when a pick is pending.
Changes: Picker session handling
Layer / File(s)
Summary
Track and handle pending picker selections electron/native/screencapturekit/Sources/OpenScreenScreenCaptureKitHelper/PickerSession.swift
PickerSession tracks pending presentations, clears that state on cancellation or picker-start failure, and ignores selections received without a pending presentation.
The change makes the helper ignore stale picks from Apple's system picker and ignore cancellations that arrive with no pick pending. No concrete defect was established. The manual check on a Mac with Apple's picker, which the PR author describes, should still be done before merging.
Pre-merge checks: 3 · 2
Failed checks: 2 warnings
Check name
Status
Explanation
Resolution
Description check
The description explains the bug, fix, issue reference, and manual test steps, but it does not follow the required template. It omits the required section headings, change-type selection, release-impa…
Rewrite the description using the repository template. Add the Summary, Related issue, Type of change, Release impact, Desktop impact, Screenshots / video, and Testing sections. Select the applicable checkboxes and place the manual validati…
Docstring Coverage
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 5 functions across 1 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: preventing stale selections from Apple's macOS system picker.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description explains the bug, fix, issue reference, and manual test steps, but it does not follow the required template. It omits the required section headings, change-type selection, release-impact selection, desktop-impact selection, and explicit testing section.
Resolution
Rewrite the description using the repository template. Add the Summary, Related issue, Type of change, Release impact, Desktop impact, Screenshots / video, and Testing sections. Select the applicable checkboxes and place the manual validation steps under Testing.
✨ 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.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong. With Apple's system picker (macOS 15.2+), after Hide desktop icons dropped the chosen source, the next Start recorded a window picked in an earlier picker session. The TS side is correct: the stale window arrives from the Swift helper as a new
picker-selected. The helper setSCContentSharingPicker.shared.isActive = trueonce and never reset it, and reported everydidUpdateWithas an answer, including ones no presentation asked for.Fix (
PickerSession.swiftonly):present()deactivates the shared picker before reconfiguring and reactivating it (skipped while a take is running, so its stream is untouched).picker-unrequested-pickwarning.Refs #1013
Needs a manual check on a Mac with Apple's picker before merge (CI only builds and tests the helper):
🤖 Generated with Claude Code
Summary by CodeRabbit