Skip to content

remote tunnels: unify agent window access - #333886

Merged
Connor Peet (connor4312) merged 3 commits into
mainfrom
connor4312/unify-remote-tunnel-access
Sep 2, 2026
Merged

remote tunnels: unify agent window access#333886
Connor Peet (connor4312) merged 3 commits into
mainfrom
connor4312/unify-remote-tunnel-access

Conversation

@connor4312

Copy link
Copy Markdown
Member

remote tunnels: unify agent window access

Use one Remote Tunnel Access state for the editor and Agents window.

  • Route the Agents window toggle through the Remote Tunnel commands.
  • Use GitHub authentication without extra pickers or service installation.
  • Keep tunnel rename UI and synchronize tunnel status across both surfaces.
  • Remove separate Agent Host tunnel hosting services and process modes.
  • Preserve web discovery with a browser-safe Remote Tunnel service.

(Commit message generated by Copilot)

Use one Remote Tunnel Access state for the editor and Agents window.

- Route the Agents window toggle through the Remote Tunnel commands.
- Use GitHub authentication without extra pickers or service installation.
- Keep tunnel rename UI and synchronize tunnel status across both surfaces.
- Remove separate Agent Host tunnel hosting services and process modes.
- Preserve web discovery with a browser-safe Remote Tunnel service.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 1, 2026 22:37
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

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

Robo (@deepak1556)

Matched files:

  • src/vs/code/electron-utility/sharedProcess/sharedProcessMain.ts

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.

Copilot review overview

🟡 Changes recommended

The Agents action has a command-registration timing gap, and initial connected state produces a spurious success toast.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 Medium severity · 1 Low severity

New issues introduced by this change (2)
Severity Finding
Medium severity src/​vs/​sessions/​contrib/​tunnelHost/​electron-browser/​tunnelHost.contribution.ts — This title-bar action becomes interactive at LifecyclePhase.Ready, but it delegates to…
Low severity src/​vs/​workbench/​contrib/​chat/​electron-browser/​toggleRemoteConnectionsActionViewItem.ts — When this view item is created while a tunnel is already connected, the initial snapshot is treated…
What changed in this PR

Unifies Agents window remote access with the existing Remote Tunnel infrastructure.

Changes:

  • Routes Agents controls through shared Remote Tunnel commands and GitHub authentication.
  • Synchronizes tunnel status, identity, rename UI, and discovery filtering.
  • Removes the separate Agent Host tunnel-hosting stack and adds a browser-safe service.
File Description
src/​vs/​workbench/​contrib/​remoteTunnel/​test/​electron-browser/​remoteTunnel.contribution.test.ts Tests direct GitHub authentication.
src/​vs/​workbench/​contrib/​remoteTunnel/​electron-browser/​remoteTunnel.contribution.ts Adds shared options, commands, and rename flow.
src/​vs/​workbench/​contrib/​chat/​test/​electron-browser/​tunnelHostService.test.ts Removes obsolete service tests.
src/​vs/​workbench/​contrib/​chat/​test/​electron-browser/​toggleRemoteConnectionsActionViewItem.test.ts Tests unified controls and state.
src/​vs/​workbench/​contrib/​chat/​electron-browser/​tunnelHostService.ts Removes the separate hosting service.
src/​vs/​workbench/​contrib/​chat/​electron-browser/​tunnelHost.contribution.ts Delegates toggling to Remote Tunnel commands.
src/​vs/​workbench/​contrib/​chat/​electron-browser/​toggleRemoteConnectionsActionViewItem.ts Reads unified tunnel state in the UI.
src/​vs/​workbench/​contrib/​chat/​common/​tunnelHost.ts Removes the obsolete service contract.
src/​vs/​sessions/​sessions.web.main.ts Registers the browser-safe service.
src/​vs/​sessions/​contrib/​tunnelHost/​test/​electron-browser/​tunnelHost.contribution.test.ts Tests Agents-specific command options.
src/​vs/​sessions/​contrib/​tunnelHost/​test/​browser/​webTunnelHostService.test.ts Removes inert-service tests.
src/​vs/​sessions/​contrib/​tunnelHost/​electron-browser/​tunnelHost.contribution.ts Adds the Agents title-bar action.
src/​vs/​sessions/​contrib/​tunnelHost/​browser/​webTunnelHostService.ts Removes the old web stub.
src/​vs/​sessions/​contrib/​tunnelHost/​browser/​webTunnelHostService.contribution.ts Removes its registration.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​test/​browser/​tunnelAgentHost.contribution.test.ts Updates hosted-tunnel tests.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​tunnelAgentHost.contribution.ts Uses Remote Tunnel status for suppression.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​remoteAgentHostActions.ts Filters the locally hosted tunnel dynamically.
src/​vs/​platform/​remoteTunnel/​test/​node/​tunnelProcessCoordinator.test.ts Updates tests for one process intent.
src/​vs/​platform/​remoteTunnel/​test/​node/​remoteTunnelService.test.ts Tests status events and tunnel IDs.
src/​vs/​platform/​remoteTunnel/​test/​browser/​remoteTunnelService.test.ts Tests browser-safe registration.
src/​vs/​platform/​remoteTunnel/​node/​tunnelProcessCoordinator.ts Removes agent-host-only process mode.
src/​vs/​platform/​remoteTunnel/​node/​remoteTunnelService.ts Propagates stable tunnel IDs.
src/​vs/​platform/​remoteTunnel/​common/​remoteTunnel.ts Extends connection information with tunnel IDs.
src/​vs/​platform/​remoteTunnel/​browser/​remoteTunnelService.ts Adds an inert browser implementation.
src/​vs/​platform/​agentHost/​test/​node/​tunnelHostMainService.test.ts Removes obsolete host-service tests.
src/​vs/​platform/​agentHost/​node/​tunnelHostMainService.ts Removes the shared-process hosting service.
src/​vs/​platform/​agentHost/​common/​tunnelAgentHost.ts Removes hosting IPC contracts.
src/​vs/​code/​electron-utility/​sharedProcess/​sharedProcessMain.ts Removes hosting service/channel registration.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/vs/sessions/contrib/tunnelHost/electron-browser/tunnelHost.contribution.ts Outdated
Prevent early command execution and false connection notifications in the Agents window.

- Register the titlebar action after Remote Tunnel commands are available.
- Seed the initial sharing state before enabling transition notifications.
- Add tests for initial snapshots and status events during initialization.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@connor4312
Connor Peet (connor4312) merged commit aa56e4e into main Sep 2, 2026
60 of 61 checks passed
@connor4312
Connor Peet (connor4312) deleted the connor4312/unify-remote-tunnel-access branch September 2, 2026 02:01
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Sep 2, 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.

4 participants