Skip to content

Browser: Tighten remote canvas networking - #345201

Merged
Kyle Cutler (kycutler) merged 3 commits into
mainfrom
kycutler/remote-canvas-followups
Oct 30, 2026
Merged

Kyle Cutler (kycutler) merged 3 commits into
mainfrom
kycutler/remote-canvas-followups

Conversation

@kycutler

Copy link
Copy Markdown
Collaborator

Follow-up to #345102 and #345149:

  • Offer canvases on remote agent hosts only while browser remote proxying is enabled and the host can forward TCP; an unknown host, such as a disconnected one, keeps its canvases.
  • Require an embedded view's owner network whenever an owner is given, instead of a separate flag.
  • Remove the WebSocket upgrade handler from the tunnel proxy: Chromium always tunnels WebSockets, including ws://, through CONNECT.
  • Replace the extension test commands with unit coverage for failing closed, gating, and large and WebSocket traffic over agent host streams.

Follow-up to #345102 and #345149:
- Offer canvases on remote agent hosts only while browser remote proxying is enabled and the host can forward TCP; an unknown host, such as a disconnected one, keeps its canvases.
- Require an embedded view's owner network whenever an owner is given, instead of a separate flag.
- Remove the WebSocket upgrade handler from the tunnel proxy: Chromium always tunnels WebSockets, including ws://, through CONNECT.
- Replace the extension test commands with unit coverage for failing closed, gating, and large and WebSocket traffic over agent host streams.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 30, 2026 15:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Remote Editor-window canvases remain available when proxying is disabled, and the replacement tests do not cover real WebSocket proxying or UDP containment.

2 open issues
What changed in this PR

This follow-up tightens remote canvas availability and embedded BrowserView networking, while simplifying the tunnel proxy and replacing native integration coverage with focused unit tests.

Changes:

  • Gate Agents-window remote canvases on proxy configuration and TCP support, retaining canvases while host support is unknown.
  • Make owner-resolved networking mandatory for embedded views without a separate opt-in flag.
  • Remove WebSocket Upgrade forwarding and extension-test commands; add availability, fail-closed, and stream tests.
File Description
src/​vs/​workbench/​contrib/​chat/​browser/​actions/​chatAccessibilityHelp.ts Describe remote canvas availability and proxy requirements.
src/​vs/​workbench/​contrib/​canvases/​electron-browser/​canvasService.ts Use the simplified embedded-view creation API.
src/​vs/​workbench/​contrib/​browserView/​test/​electron-browser/​browserViewWorkbenchService.test.ts Cover owner-network success and rejection cases.
src/​vs/​workbench/​contrib/​browserView/​electron-browser/​browserViewWorkbenchService.ts Require resolved remote networks for owner-bound embedded views.
src/​vs/​workbench/​contrib/​browserView/​electron-browser/​browserView.contribution.ts Remove extension-test-only browser commands.
src/​vs/​workbench/​contrib/​browserView/​common/​browserView.ts Update the embedded-view API and contract.
src/​vs/​sessions/​SESSIONS.md Document remote canvas availability rules.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​test/​browser/​remoteAgentHostSessionsProvider.test.ts Test reactive proxy, TCP-support, and disconnect gating.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​REMOTE_AGENT_HOST_SESSIONS_PROVIDER.md Clarify remote canvas retention during disconnection.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​remoteAgentHostSessionsProvider.ts Gate canvas presentation on proxy settings and host support.
src/​vs/​sessions/​contrib/​providers/​agentHost/​browser/​baseAgentHostSessionsProvider.ts Pass observable connection context into canvas capability checks.
src/​vs/​sessions/​contrib/​canvases/​electron-browser/​sessionCanvasService.ts Read open requests only while canvases are supported.
src/​vs/​platform/​tunnel/​test/​node/​tunnelProxy.test.ts Replace Upgrade tests with large-response and CONNECT stream coverage.
src/​vs/​platform/​tunnel/​node/​tunnelProxy.ts Remove the HTTP Upgrade handler.
src/​vs/​platform/​agentHost/​common/​agentHostStarter.config.contribution.ts Link the canvas setting description to remote proxy configuration.
extensions/​vscode-api-tests/​src/​singlefolder-tests/​browser.test.ts Remove the native remote-network integration test.

Review effort: Balanced

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes for the owner-resolution race noted inline. I also agree with the existing review threads about applying the proxy/TCP gate to ambient remote Editor sessions and retaining native Chromium/WebRTC containment coverage; I am not duplicating those inline comments.

Resolve an embedded view's owner network before any asynchronous work and reject unknown agent owners instead of falling back to the local network. Gate remote editor-window canvases reactively on remote browser proxying. Cover the browser proxy over real Agent Host TCP and Chromium's remote WebSocket, large-response and WebRTC UDP behavior in the remote API suite.

Co-authored-by: Copilot <[email protected]>
…s-followups

# Conflicts:
#	src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.ts
#	src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts
#	src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts
@kycutler
Kyle Cutler (kycutler) marked this pull request as ready for review October 30, 2026 18:51
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Joaquín Ruales (@jruales)

Matched files:

  • extensions/vscode-api-tests/src/singlefolder-tests/browser.test.ts
  • src/vs/sessions/contrib/browserView/browser/sessionBrowserNetwork.ts
  • src/vs/sessions/contrib/browserView/test/browser/sessionBrowserNetwork.test.ts
  • src/vs/workbench/contrib/browserView/common/browserView.ts
  • src/vs/workbench/contrib/browserView/electron-browser/browserView.contribution.ts
  • src/vs/workbench/contrib/browserView/electron-browser/browserViewWorkbenchService.ts
  • src/vs/workbench/contrib/browserView/test/electron-browser/browserViewWorkbenchService.test.ts

@kycutler
Kyle Cutler (kycutler) merged commit 03ac83a into main Oct 30, 2026
55 checks passed
@kycutler
Kyle Cutler (kycutler) deleted the kycutler/remote-canvas-followups branch October 30, 2026 21:40
@vs-code-engineering vs-code-engineering Bot added this to the 1.145.0 milestone Oct 30, 2026
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.

3 participants