feat(auth): separate browser preview control permissions - #9789
feat(auth): separate browser preview control permissions#9789juliusmarminge wants to merge 7 commits into
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
d160889 to
42df7cc
Compare
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR changes the authorization boundary for browser preview control and automation across server RPCs, default pairing grants, and many production UI entry points. Newly issued standard credentials gain a new permission while existing clients may lose control until re-pairing, making human review appropriate. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
42df7cc to
a0f863c
Compare
c9eadea to
de4245a
Compare
dd9548a to
ccf9440
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix is ON, but a cloud agent failed to start.
Reviewed by Cursor Bugbot for commit ccf9440. Configure here.
b92e97b to
0986fc3
Compare
4d49a52 to
6fed38f
Compare
6fed38f to
9dffc86
Compare
9dffc86 to
40ee856
Compare
4f4d4b8 to
afe8634
Compare
a7ccb0a to
1486119
Compare
1486119 to
80eaa36
Compare
80eaa36 to
3010281
Compare

Browser preview control and desktop automation hosting currently share
orchestration:operate, so clients cannot receive orchestration access without those permissions.Add
preview:operatefor preview mutations and automation hosting, with matching pairing controls and desktop UI guards. Preview lists, events, and discovered-server reads retainorchestration:read. The new scope is included in newly issued standard grants; existing clients must pair again to receive it. Provider MCP preview permissions remain independent.Tests added cover the RPC scope mapping and real WebSocket requests: the old orchestration grant cannot refresh a preview or connect an automation stream, the rejected refresh never reaches its handler, and the explicit preview grant allows both operations.
Pairing controls, captured from this layer’s base and head with the same viewport and default selection:
The existing Markdown and workspace-image suites pass with explicit scope fixtures.
Model: GPT-6. Harness: Codex.
Note
Medium Risk
Authorization and pairing changes affect a broad set of preview RPCs and UI entry points; misconfiguration or stale grants could block preview control for existing clients until re-pairing.
Overview
Introduces
preview:operateso browser preview control and automation no longer ride onorchestration:operate. Preview mutations and automation RPCs (previewOpen, refresh/close, automation connect/respond, etc.) now require the new scope; listing previews, preview event subscriptions, and discovered local servers stay onorchestration:read. The scope is part ofAuthStandardClientScopesfor newly issued grants and appears as a “Control previews” pairing option in connections settings.Server and client behavior enforce the split: integration tests assert tokens with only legacy orchestration scopes cannot refresh previews or open automation streams (handlers are not invoked), while tokens that include
preview:operatesucceed. The web/desktop UI gates preview webviews, automation hosts, panel toggles, markdown/file “open in browser”, terminal link handling, sidebar localhost shortcuts, and global preview keybindings onuseEnvironmentScope/readEnvironmentScope, with clearer copy when preview control is missing.Breaking change for existing pairings: clients that were granted orchestration operate but not re-paired will lose preview control until they receive
preview:operate(they can still observe preview state where reads remain allowed).Reviewed by Cursor Bugbot for commit 3010281. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Separate browser preview control into dedicated
preview:operatescopepreview:operateas a new authentication scope in auth.ts and adds it toAuthStandardClientScopesorchestration:operatetopreview:operatein RpcAuthorization.ts; preview listing and subscriptions remain onorchestration:readpreview:operatelose access to preview controls, automation, and in-app preview opening; they can still list previews and close an already open preview panelMacroscope summarized 3010281.