Skip to content

Make the Environment Browser view-only - #66

Merged
laotoutou merged 1 commit into
mainfrom
agent/readonly-environment-browser
Aug 2, 2026
Merged

Make the Environment Browser view-only#66
laotoutou merged 1 commit into
mainfrom
agent/readonly-environment-browser

Conversation

@laotoutou

Copy link
Copy Markdown
Contributor

What

  • reduce the agent-owned Environment Browser to a full-size, adaptive, read-only screencast
  • hide the Playwright Dashboard sidebar, tabs, browser chrome, toolbar, capture, recording, and unlock surfaces
  • reject Dashboard navigation, tab mutation, pointer, keyboard, capture, annotation, and recording requests in the server WebSocket proxy
  • keep Take control as the only manual interaction path and return to the same persistent profile afterward
  • remove the duplicate Browser tab/viewport state, chat-driven loopback navigation, and /browser/open API
  • update OpenAPI, architecture docs, the public guide, unit coverage, and Browser UI e2e coverage

Why

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 default session. 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/open and the saved desktop/responsive/mobile Browser viewport preference.

Verification

  • npm run lint
  • npm run typecheck
  • npm test — 757/757 passed
  • npm run build
  • npm run openapi:check — 128 operations
  • focused Playwright UI e2e — 2/2 passed, including Take control/Return to agent and inert loopback links
  • real @playwright/cli@0.1.17 Dashboard + Chromium integration at 1200x760 and 820x900: full-size screen, zero visible Dashboard controls, and direct newTab/navigate messages rejected while the original tab, URL, and content stayed unchanged

Local 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.

@laotoutou
laotoutou marked this pull request as ready for review August 2, 2026 15:56
@laotoutou
laotoutou merged commit 0442281 into main Aug 2, 2026
2 checks passed
@laotoutou
laotoutou deleted the agent/readonly-environment-browser branch August 2, 2026 15:56
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.

2 participants