feat(auth): separate browser preview control permissions - #9789
feat(auth): separate browser preview control permissions#9789juliusmarminge wants to merge 6 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
0986fc3 to
4d49a52
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
Changes authorization for preview RPCs and standard client grants; existing paired clients lack the new scope until they re-pair, and misconfigured grants could block preview while leaving orchestration working.
Overview
Introduces
preview:operateso browser preview mutations and automation hosting are no longer tied toorchestration:operate. Preview read paths (previewList, preview event subscriptions, discovered local servers) stay onorchestration:read.Server RPC scope mapping and a WebSocket integration test enforce the split: tokens with only orchestration scopes can list previews but get
EnvironmentAuthorizationErroron refresh and automation connect; addingpreview:operateallows those calls.The scope is registered in contracts, included in
AuthStandardClientScopesfor newly issued grants, and exposed in Connections pairing UI. The desktop/web client gates preview surfaces (Electron webviews, automation hosts, markdown/file links, sidebar port shortcuts, keyboard shortcuts, right panel) viauseEnvironmentScope/readEnvironmentScopeso read-only orchestration clients do not mount or invoke preview control.Reviewed by Cursor Bugbot for commit 4d49a52. Bugbot is set up for automated code reviews on this repo. Configure here.