Make the Environment Browser view-only - #66
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Take controlas the only manual interaction path and return to the same persistent profile afterward/browser/openAPIWhy
The Environment Browser exposed two competing control systems: Sandpi ownership and the Playwright Dashboard's own unlock/interaction model. Tabs, navigation, and chat loopback links could also mutate the Browser outside Sandpi's takeover flow, so ownership was unclear and new tabs did not share one enforceable boundary.
Impact
Agent ownership now renders only the pinned
defaultsession. The iframe is non-focusable and pointer-inert, while the server gate enforces the same boundary even if a client sends Dashboard protocol messages directly. Environment-local chat URLs remain inert until the user takes control.This intentionally removes
POST /api/v1/environments/{environmentId}/browser/openand the saved desktop/responsive/mobile Browser viewport preference.Verification
npm run lintnpm run typechecknpm test— 757/757 passednpm run buildnpm run openapi:check— 128 operations@playwright/cli@0.1.17Dashboard + Chromium integration at 1200x760 and 820x900: full-size screen, zero visible Dashboard controls, and directnewTab/navigatemessages rejected while the original tab, URL, and content stayed unchangedLocal runtime note
A fresh Sandbox0 Environment could not be provisioned because the current local deployment API key was denied the required create permission, and the two pre-existing local Sandbox references both return
sandbox0_not_found. The real Dashboard and Chromium protocol were exercised locally; the VNC ownership handoff was covered by service tests and the focused Sandpi UI e2e rather than a fresh Sandbox0 AppService.