Skip to content

Observe hidden native control-window identity for capture exclusion - #955

Draft
simonvanlaak wants to merge 4 commits into
mainfrom
t3/platform-native-control-surface
Draft

simonvanlaak wants to merge 4 commits into
mainfrom
t3/platform-native-control-surface

Conversation

@simonvanlaak

@simonvanlaak simonvanlaak commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Engine needs an actual control-window identity before it can verify required capture exclusions. This adds a trusted-main observer for a hidden BrowserWindow and a public NativeControlSurfaceIdentity DTO through the existing contracts/native export. It binds the native XID or CGWindowID to host epoch, window instance/generation, PID and native process incarnation; it rejects visible, destroyed, malformed or changed identities. Mac creation time retains Electron’s fractional Unix-millisecond value.

The packaged Linux test independently joins the XID to its OS owner PID, boot/start ticks and unmapped state, then checks visible/destroyed refusal and a distinct replacement identity. A test-only Mac observer queries the supplied window through CoreGraphics and the process through sysctl, compares the exact creation-time projection, and checks wrong-owner/closed/replacement cases. It performs no capture or permission action and is not a runtime service.

Validation: independent source review approved the identity mechanism at fc49789. Strict types, 53 App Shell tests and six packaged Linux Electron tests passed; the normal push hook passed. The Mac observer followup passed Linux types and the packaged Linux regression; its focused independent source review approved commit 12c14f9. Actual Mac compile/runtime remains an open gate.

Draft holds: required PR checks and actual Mac native identity evidence, current-base acceptance and exact-main delivery. This is identity observation only. Engine verification/filter effects and the hidden-before-exclusion-ACK visibility lifecycle remain separate missing prerequisites; Linux whole-video exclusion is unavailable. No installed-route activation, Onboarding work, SDK045 adoption, native capture, clipboard operation or release publication is included.

This branch has not been deployed

No deployments
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.

1 participant