Repository navigation
Agents: add This Computer sharing to Remote Environments - #345782
Merged
Merged
Conversation
Contributor
Screenshot ChangesBase: Changed (1)Added (6) |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Overlapping sharing-method changes can enable sharing after Off is selected, while local-host exclusion and accessibility defects also remain unresolved.
4 open issues
What changed in this PR
Connects the Agents window’s Remote Connections menu with the Remote Environments editor, clarifying how this computer’s sharing identity relates to remote registrations.
Changes:
- Adds a This Computer card with sharing controls, rename, status, and documentation access, backed by shared sharing logic.
- Tracks local tunnel and GitHub environment identities, labels their registrations, and adds GitHub environment picker and auto-connect exclusions.
- Separates host availability from client connection status, with updated accessibility content, tests, and visual fixtures.
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/test/electron-browser/toggleRemoteConnectionsActionViewItem.test.ts |
Tests the menu’s management entry. |
src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/missionControlEnvironmentService.test.ts |
Tests local environment identity persistence. |
src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/missionControlEnvironmentActions.test.ts |
Adds local identity to picker mocks. |
src/vs/workbench/contrib/chat/electron-browser/tunnelHost.contribution.ts |
Uses the extracted sharing helper. |
src/vs/workbench/contrib/chat/electron-browser/toggleRemoteConnectionsActionViewItem.ts |
Reuses sharing logic and adds management navigation. |
src/vs/workbench/contrib/chat/electron-browser/remoteConnectionsSharing.ts |
Centralizes sharing state, method selection, and rename. |
src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentService.ts |
Remembers this computer’s environment per account. |
src/vs/workbench/contrib/chat/browser/remoteAgentHost/missionControlEnvironmentActions.ts |
Excludes the local environment from selection. |
src/vs/sessions/contrib/tunnelHost/test/electron-browser/tunnelHost.contribution.test.ts |
Updates title-bar contribution test dependencies. |
src/vs/sessions/contrib/tunnelHost/electron-browser/tunnelHost.contribution.ts |
Adds gated navigation to Remote Environments. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/electron-browser/thisComputerSection.fixture.ts |
Adds sharing-state and themed card fixtures. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/electron-browser/remotesEditor.test.ts |
Tests card controls, accessible content, and cleanup. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/tunnelAgentHost.contribution.test.ts |
Tests remembered local tunnel identity. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remotesWidget.test.ts |
Tests connection labels, availability, and local annotations. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remotesWidget.fixture.ts |
Adds availability and local-registration fixture data. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remotesModel.test.ts |
Tests identity and availability projection. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteAgentHost.contribution.test.ts |
Updates inventory mocks for local identity. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/missionControlAgentHostContribution.test.ts |
Tests local environment picker and auto-connect exclusions. |
src/vs/sessions/contrib/providers/remoteAgentHost/electron-browser/thisComputerSection.ts |
Implements the sharing card. |
src/vs/sessions/contrib/providers/remoteAgentHost/electron-browser/remotesEditor.ts |
Integrates and disposes the card above the table. |
src/vs/sessions/contrib/providers/remoteAgentHost/electron-browser/remotes.contribution.ts |
Updates accessibility help for sharing and availability. |
src/vs/sessions/contrib/providers/remoteAgentHost/electron-browser/media/thisComputerSection.css |
Styles the sharing card. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/tunnelAgentHost.contribution.ts |
Persists and exposes local tunnel identity. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remotesWidget.ts |
Updates columns, row heights, and accessible labels. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remotesTable.ts |
Renders local annotations and host availability. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remotesModel.ts |
Supplies local identity and host availability to rows. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostSessionsProvider.ts |
Exposes observable local-registration metadata. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/missionControlAgentHostContribution.ts |
Marks local environments and excludes automatic selection. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/media/remotesWidget.css |
Supports card/table layout and two-line connection cells. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/entryDrivenProviderContribution.ts |
Forwards local-registration metadata to providers. |
src/vs/sessions/common/sessionCommands.ts |
Exposes the existing sharing command ID centrally. |
src/vs/sessions/common/agentHostSessionsProvider.ts |
Defines the local-registration provider contract. |
src/vs/platform/agentHost/common/missionControlEnvironment.ts |
Adds observable local environment identity to the service. |
Review effort: Balanced
Christof Marti (chrmarti)
force-pushed
the
chrmarti/remotes-this-computer
branch
from
November 3, 2026 22:24
c1eeb2d to
65beb0e
Compare
Add a This Computer card to the Remote Environments editor with the sharing name, a Remote Connections segmented control (Off / Dev Tunnels / GitHub Environments), status, and a link to the sharing docs. Share the sharing state with the title bar Remote Connections menu, which gains a Manage Remote Environments... entry. Recognize this computer's own GitHub environment and dev tunnel, label them This Computer in the table, and keep them out of the environment pickers and auto-connect. Rename the table column to Connection and show whether the host is online. Refs #344387, ports parts of #345253. Co-authored-by: Cherry Wang <cherwan@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Show the sharing name in a header above the Remote Connections menu options, with a keyboard-reachable rename link (new action list headerAction option). Give Off an icon and description like the other options, and list GitHub Environments before Dev Tunnels in the menu and in the This Computer section. Put the This Computer section of the Remote Environments editor behind the experimental sessions.chat.experimental.remoteEnvironmentsThisComputer setting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Leave this computer's own Dev Tunnel and GitHub environment out of the Remote Environments table instead of labeling them This Computer, since this window already runs sessions here. Keep its own tunnel out of the environment pickers too, like its own GitHub environment. Shorten the description of Off in the Remote Connections menu to one line. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace Learn About Sharing with an inline Learn More link after the section description that opens the GitHub Environments documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Give the connection method options accessible names that lead with their visible labels instead of defaulting to the tooltip, apply choices made while another is still being applied in order, remove stray whitespace from the Remote Environments help, and test that this computer's GitHub environment is remembered once sharing turns on. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When Dev Tunnels are already listed, prompt to sign in to refresh them and leave out the setup guide link meant for an empty group. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Revert the Connection column rename, the Offline label change, and the host availability line for now. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Christof Marti (chrmarti)
force-pushed
the
chrmarti/remotes-this-computer
branch
from
November 4, 2026 09:13
167fc0d to
81fcb5d
Compare
Keep this computer's remembered tunnel from auto-connecting after sharing stops, and show the organization policy reason for a disabled GitHub Environments option outside the option, with a keyboard-reachable link to the managed setting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Log the experiment trigger for the This Computer setting when the Remote Environments editor shows its content and when its accessibility help opens, in every experiment arm, so a triggered scorecard can be limited to users who reached the Remote Environments editor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Christof Marti (chrmarti)
force-pushed
the
chrmarti/remotes-this-computer
branch
from
November 4, 2026 10:48
a618efb to
3b4d2a1
Compare
Christof Marti (chrmarti)
marked this pull request as ready for review
November 4, 2026 16:30
Christof Marti (chrmarti)
enabled auto-merge
November 4, 2026 16:30
Dirk Bäumer (dbaeumer)
approved these changes
Nov 4, 2026
2 tasks done
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.


Refs #344387. Builds on the design and parts of #345253 by Cherry Wang (@chryw) (ported onto current
main, since that branch conflicts).Connects the Remote Connections (antenna) menu and the Remote Environments editor, so this computer's sharing can be seen and controlled from both places.
Changes
Will be shared as: <name>) moves to a header at the top, with a computer icon. The name is a link that renames it, reachable with Shift+Tab from the list;headerActionoption inIActionListOptions. It mirrorsfooterAction: the label inside the header text becomes a focusable link, and the header describes the list for screen readers. The footer rendering moved into the same shared helper.sessions.chat.experimental.remoteEnvironmentsThisComputer(default off,experiment: { mode: 'auto' }, so ExP can turn it on through theconfig.sessions.chat.experimental.remoteEnvironmentsThisComputertreatment). TheexperimentTriggerevent is logged in every arm when the Remote Environments editor shows its content or its accessibility help opens, for a triggered scorecard. It shows:aka.ms/vscode-agent-environments).remoteConnectionsSharing.ts, which both surfaces now use.Not included from #345253: the environment-picker and description changes.
How to test
sessions.chat.experimental.remoteEnvironmentsThisComputer. The This Computer card appears without reopening the editor.Validation
pnpm run typecheck-client: passedpnpm run eslint <changed TypeScript files>: passedpnpm run stylelint: passed, with no findings in the changed CSSpnpm run valid-layers-check: passed.\scripts\test.bat --reporter dotwith--runfor each changed remote/antenna/editor test file: 401 passing.\scripts\test.bat --reporter dot --run src/vs/platform/actionWidget/test/browser/actionList.test.ts --run src/vs/platform/actionWidget/test/browser/actionWidgetDropdown.test.ts: 182 passing, including the new header test, and 20 failing. The same 20 hover/scroll timing tests also time out on the baseline without these changes on this machine (181 passing, 20 failing), so they are environmental.thisComputerSectionfixtures (Off, Dev Tunnels, GitHub Environments, starting, narrow, policy disabled, high contrast) and theremotesWidgetfixtures were checked visually; the narrow fixture is stable.The screenshot baselines for the
TunnelSignInNarrowremotes fixture (shorter sign-in row) will change, and the newthisComputerSectionfixtures add baselines.