Repository navigation
Browser: Tighten remote canvas networking - #345201
Conversation
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]>
There was a problem hiding this comment.
🟡 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
Ulugbek Abdullaev (ulugbekna)
left a comment
There was a problem hiding this comment.
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
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Joaquín Ruales (@jruales)Matched files:
|

Follow-up to #345102 and #345149: