Repository navigation
fix(desktop): macOS SnapShot skips the screen-sharing indicator window - #36320
juliusmarminge wants to merge 2 commits into
Conversation
While another app captures a window, macOS 26 adds a titled 66x20 or 31x20 indicator window in front of it in the app's window list. SnapShot took it as the active window and returned a capture of that size. Windows under 100pt wide and under 28pt tall are now left out of the selection wherever they sit, unless the app shows nothing else. Fixes #33947 Co-authored-by: Igor Makowski <56691628+Mnigos@users.noreply.github.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… sharing indicator Size alone dropped any window under 100x28pt, so a small titled palette in front of a document lost to the document. The indicator is now recognised by its size together with its "Window" title. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The macOS SnapShot lookup now skips tiny sharing-indicator windows while retaining a fallback when no other window exists. The change is limited to foreground-app window selection and does not broaden capture permissions or scope. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Handoff from the issue-watch investigation. On shiv, macOS 27.0.1 / 26A434, arm64, a background native AppKit fixture captured by a separate ScreenCaptureKit process reproduced the OS indicator twice. The main window was An offline replay of the observed CG list selected the indicator on both baseline Our separate experimental branch ends at Unproven: integrated T3 shortcut and attachment dimensions on Mac or Linux, reporter macOS 26, the final production JXA trust/timeout calls and T3 subprocess permission inheritance. No T3 before/after images were obtained, and no checks were run against #36320. The fixture stayed in the background, so it does not prove the foreground-app path. The experimental fix was not declared ready. Evidence below renders the saved native output, historical replay, and final check transcript as images. These are diagnostic transcripts, not desktop screenshots. No further work or pushes from this thread. |
|
The automated pipeline stopped on this pull request and will not merge it: the fix is written and reviewed, but proving it needs something no worker has:
It stays open for a person to finish or close. |
Item 1 is right and is fixed. The previous head dropped every window under 100pt wide and under 28pt tall whenever a larger one existed, so a small titled palette (e.g. 'Mini timer' 80x24) in front of a document lost to the document, which main does not do. The filter in apps/desktop/src/snapShot/ActiveWindow.ts now drops a window only when it is under both size limits AND its title is exactly "Window", the title issue #33947 reports for the macOS 26 sharing indicator (66x20 or 31x20). It stays position-independent, so the earlier round's exact-top-edge objection does not return, and the fallback to the unfiltered list when nothing else is visible is kept. Tests in the existing foreground-palette table: replaced the 80x60 and 400x24 rows, which could not catch this, with an 80x24 'Mini timer' row (fails on the previous head: expected 1, got 2; passes now) and a 400x300 window titled 'Window' that must stay selected; the lone-window test now uses the title 'Window' so it exercises the fallback. The two indicator rows from the first round still pass. Limits: the title match rests on the single window list in the issue; I assumed, without confirming on a Mac, that 'Window' is AppKit's unlocalized default title. If macOS localizes it, the indicator would be captured again on non-English systems. Not verified on a real macOS 26 machine; none is available here. No open pull request exists for the branch, so nothing was watched.
Supersedes #34015. The change is @Mnigos's; their commits are kept.
Reproduction on main
On macOS 26, enable SnapShots in T3 Code Desktop and grant Screen Recording and Accessibility permissions. Have another app capture the T3 window through ScreenCaptureKit, such as a video-call window share or ChatGPT computer use. Bring T3 Code frontmost and press double-Shift: main captures the tiny indicator. This PR should capture the full window when the indicator is horizontally contained within it and shares its exact top coordinate; an indicator offset vertically still passes through the filter. Stop sharing and repeat to confirm a full-window capture without the indicator. These steps were read from the issue and code, not executed.
Evidence
Being captured: before and after in the real app. This section is filled in before the pull request can merge.
Tests
From apps/desktop:
vp test run src/snapShot/ActiveWindow.test.tswith the new tests against the previous head's source: 1 failed (indicator-sized titled palette, expected 1 got 2), 20 passed. Same command with the change: 21 passed.vp run check:changed: format, lint, knip 1/2 and 2/2, typecheck (2 packages) and test (1 file) all pass.Not in this change
Who did the work
Run by the t3code factory in T3 Code.