Skip to content

Agents: add This Computer sharing to Remote Environments - #345782

Merged
Christof Marti (chrmarti) merged 9 commits into
mainfrom
chrmarti/remotes-this-computer
Nov 4, 2026
Merged

Christof Marti (chrmarti) merged 9 commits into
mainfrom
chrmarti/remotes-this-computer

Conversation

@chrmarti

@chrmarti Christof Marti (chrmarti) commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Antenna menu:
    • the sharing name (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;
    • Off now has an icon and a description, like the other options;
    • GitHub Environments is listed before Dev Tunnels;
    • a Manage Remote Environments... entry opens the editor. It is shown only when the editor is available.
  • Action list: a new headerAction option in IActionListOptions. It mirrors footerAction: 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.
  • This Computer card at the top of the Remote Environments editor, behind the new experimental setting sessions.chat.experimental.remoteEnvironmentsThisComputer (default off, experiment: { mode: 'auto' }, so ExP can turn it on through the config.sessions.chat.experimental.remoteEnvironmentsThisComputer treatment). The experimentTrigger event is logged in every arm when the Remote Environments editor shows its content or its accessibility help opens, for a triggered scorecard. It shows:
    • the sharing name, with a rename button;
    • a Remote Connections segmented control: Off / GitHub Environments (Preview) / Dev Tunnels;
    • a status sentence and a description with an inline Learn More link to the GitHub Environments documentation (aka.ms/vscode-agent-environments).
    • when organization policy disables GitHub Environments, the reason with a View Setting link to the managed setting, shown below the options so keyboard and screen-reader users can reach it.
  • Shared sharing logic: the antenna menu's sharing state, name loading, method selection and rename moved into remoteConnectionsSharing.ts, which both surfaces now use.
  • Recognizing this computer:
    • the editor recognizes this computer's own GitHub environment (a remembered environment ID, per account) and its own dev tunnel (a remembered tunnel ID);
    • both are left out of the Remote Environments table and the environment pickers, and neither is auto-connected, also after sharing stops, since this window already runs sessions on this computer.
  • Table: when Dev Tunnels are already listed, the tunnel sign-in row asks to sign in to refresh them and leaves out the setup guide link meant for an empty group.
  • Accessibility: the help text is updated, and the This Computer help appears only when the card is enabled. Each connection method option's accessible name starts with its visible label, followed by its description.

Not included from #345253: the environment-picker and description changes.

How to test

  1. Open the Agents window and open the antenna (Remote Connections) menu in the title bar.
    • The sharing name is at the top. Shift+Tab from the options focuses it, and activating it renames.
    • Off shows an icon and a description, and GitHub Environments comes before Dev Tunnels.
  2. Choose Manage Remote Environments.... Without the experimental setting, the editor shows only the table.
  3. Enable sessions.chat.experimental.remoteEnvironmentsThisComputer. The This Computer card appears without reopening the editor.
    • Switch between Off / GitHub Environments / Dev Tunnels (including quickly switching again while a change is still being applied), rename the sharing name, and open Learn More. The antenna menu should reflect each change.
    • Disabling the setting removes the card again.
  4. With Dev Tunnels or GitHub Environments sharing on, this computer's own tunnel or environment does not appear in the table or as a separate entry in the environment pickers.
  5. With tunnel sign-in required and tunnels already listed, the Dev Tunnels group asks to sign in to refresh them, without the setup guide link.

Validation

  • pnpm run typecheck-client: passed
  • pnpm run eslint <changed TypeScript files>: passed
  • pnpm run stylelint: passed, with no findings in the changed CSS
  • pnpm run valid-layers-check: passed
  • .\scripts\test.bat --reporter dot with --run for 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.
  • Component Explorer: the thisComputerSection fixtures (Off, Dev Tunnels, GitHub Environments, starting, narrow, policy disabled, high contrast) and the remotesWidget fixtures were checked visually; the narrow fixture is stable.
  • Manual, in a Code OSS Agents window:
    • the antenna menu shows the name header, Off with an icon and a one-line description, the new order, and the management entry;
    • Shift+Tab reaches the rename link, and Tab returns to the list;
    • the editor shows the card with the setting enabled and removes it live when the setting is disabled.

The screenshot baselines for the TunnelSignInNarrow remotes fixture (shorter sign-in row) will change, and the new thisComputerSection fixtures add baselines.

Copilot AI balanced review requested due to automatic review settings November 3, 2026 10:35
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: f92b8f3a Current: 164412d1

Changed (1)

sessions/remotes/remotesWidget/TunnelSignInNarrow/Light
Before After
before after

Added (6)

sessions/remotes/thisComputerSection/Off/Light

current

sessions/remotes/thisComputerSection/DevTunnels/Light

current

sessions/remotes/thisComputerSection/GitHubEnvironments/Light

current

sessions/remotes/thisComputerSection/GitHubEnvironmentsStarting/Light

current

sessions/remotes/thisComputerSection/Narrow/Light

current

sessions/remotes/thisComputerSection/PolicyDisabled/Light

current

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

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

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>
@chrmarti
Christof Marti (chrmarti) force-pushed the chrmarti/remotes-this-computer branch from 167fc0d to 81fcb5d Compare November 4, 2026 09:13
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>
@chrmarti
Christof Marti (chrmarti) force-pushed the chrmarti/remotes-this-computer branch from a618efb to 3b4d2a1 Compare November 4, 2026 10:48
@chrmarti
Christof Marti (chrmarti) marked this pull request as ready for review November 4, 2026 16:30
@chrmarti
Christof Marti (chrmarti) merged commit c25c7c2 into main Nov 4, 2026
59 checks passed
@chrmarti
Christof Marti (chrmarti) deleted the chrmarti/remotes-this-computer branch November 4, 2026 16:36
@vs-code-engineering vs-code-engineering Bot added this to the 1.146.0 milestone Nov 4, 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