Skip to content

sessions: Add standalone Remotes management - #343167

Merged
Christof Marti (chrmarti) merged 10 commits into
mainfrom
chrmarti/remotes-customizations
Oct 23, 2026
Merged

Christof Marti (chrmarti) merged 10 commits into
mainfrom
chrmarti/remotes-customizations

Conversation

@chrmarti

@chrmarti Christof Marti (chrmarti) commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds a standalone desktop Agents-window Remotes modal, opened through Environment → Manage..., to discover, connect to, and manage remote agent environments.

  • Uses the Language Models editor's grouped table pattern: compact rows, resizable Name/Address/Connection columns, inline actions, collapsible sections, and horizontal scrolling at narrow widths. Visible groups are WSL (Windows only), SSH, and Tunnels.
  • Provides Connect/Disconnect, Rename, and Remove actions rather than a separate Show in Picker column or visibility control. Registration and removal continue through the existing services.
  • Shares the Environment picker's Connected/Connecting/Disconnected labels and the per-host Manage picker's rename prompt and client-local naming behavior.
  • The Environment picker gains the Manage entry point, gated by sessions.chat.experimental.environmentPickerManageRemotes (default false, experiment: { mode: 'auto' }). Remotes is no longer part of the Customizations dialog or its sidebar.
  • Shows empty-state setup guidance and documentation links, with distinct loading, search-empty, and refresh-failure states.
  • Adds an inline SSH gear action that opens the user's SSH configuration in a modal editor, creating the config file if necessary. The Tunnels gear opens the same chat.remoteAgentHosts settings filter as the per-host Manage picker.
  • Uses the standard refresh toolbar icon. Discovery failures show warning icons on the affected group, with simplified tooltips pointing to the Window log.
  • Includes keyboard navigation, accessibility help, an accessible view, refresh cancellation, regression tests, and themed fixtures.

No linked issue; this draft is a prototype requested directly during development.

Behavior and limitations

  • Connect registers a missing location and establishes its connection. Existing automatic-connection settings still apply.
  • Disconnect follows existing provider behavior and may also unregister the location.
  • Rename changes the display name in this client without changing the remote address; an empty name restores the default.
  • Remove is enabled only for registered, removable remotes. It forgets the registration rather than deleting the SSH configuration, WSL distribution, tunnel, or container. Discovery can find the location again on Refresh.
  • Connection labels match the Environment picker exactly: Connected, Connecting, or Disconnected. Reconnecting/incompatible states use the picker's Disconnected label; detailed status remains available in the tooltip. In-flight user operations show Connecting/Disconnecting and disable conflicting actions.
  • SSH discovery lists configured aliases, not a scan of reachable SSH servers. WSL discovery lists WSL 2 distributions.
  • Signed-out or failed tunnel discovery remains a warning rather than claiming that no tunnels exist.
  • Dev Containers is temporarily hidden and Docker discovery is skipped by the Remotes page. The underlying discovery, registration, IPC, and provider support remains in the branch; existing Dev Container sessions and other pickers are unchanged.
  • The retained local Dev Container discovery uses desktop IPC, not a new Agent Host Protocol requirement.

Documentation targets:

How to test

  1. Open the desktop Agents window with chat.remoteAgentHostsEnabled enabled and the Environment picker available. For the experimental picker, enable sessions.chat.unifiedWorkspacePicker.enabled, sessions.chat.experimental.newSessionComposerLayout, and sessions.chat.experimental.environmentPicker.
  2. Enable sessions.chat.experimental.environmentPickerManageRemotes and open Environment → Manage.... Confirm Remotes opens as a standalone modal without changing the selected environment, and there is no Remotes entry in Customizations. Disable the setting and reopen Environment to confirm Manage and its accessibility-help hint are absent. ExP can override the default through config.sessions.chat.experimental.environmentPickerManageRemotes; locally, experiments.override.config.sessions.chat.experimental.environmentPickerManageRemotes simulates that treatment.
  3. Confirm WSL appears only on Windows and Dev Containers is absent.
  4. Use Connect/Disconnect and verify the connection column and Environment picker update. Rename a remote, then clear its name to restore the default. Remove a registered remote; verify Remove is disabled for discovery-only rows.
  5. Use the SSH gear to open the user SSH config in a modal editor and the Tunnels gear to open remote-host settings. After configuring a host, return to Remotes and refresh.
  6. With no configured/discovered locations, inspect each group's setup guidance and documentation link. Search for a nonexistent location and confirm it shows a search-empty state rather than setup guidance.
  7. Simulate a discovery failure, inspect the group's warning tooltip, and retry using the refresh icon. Known locations should remain available.
  8. Test table row navigation and group collapse/expand. Tab into row actions, use Left/Right Arrow within the toolbar, and activate with Enter/Space. Test the gear/refresh/documentation links, accessibility help, and accessible view.
  9. Resize columns and narrow the modal. Confirm horizontal scrolling keeps all columns and actions reachable and that no Show in Picker controls remain.

Validation

The default-off Manage setting follow-up passed 97 tests, covering schema/experiment metadata, default/false/true visibility, remote-host gating, settings changes on reopen, accessibility help, and experiment triggers in both arms:

./scripts/test.sh \
  --run src/vs/sessions/contrib/chat/test/browser/sessionEnvironmentPicker.test.ts \
  --run src/vs/sessions/contrib/chat/test/browser/sessionsChatAccessibilityHelp.test.ts \
  --run src/vs/sessions/contrib/chat/test/browser/newSessionComposerLayout.test.ts \
  --reporter dot

npm run build-fast -- --client-only, npm run typecheck-client, targeted ESLint for the seven changed TypeScript files, and git diff --check all passed for this follow-up. The experiment uses the existing experimentTrigger helper when the eligible menu or accessibility help is opened, before checking the setting; unavailable remote hosts do not trigger it. No experiment assignment has been deployed.

Focused regression selection: 89 passed. After the final disabled-Remove tooltip refinement, the widget selection was rerun separately: 29 passed.

./scripts/test.sh \
  --run src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remotesModel.test.ts \
  --run src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remotesWidget.test.ts \
  --run src/vs/sessions/contrib/providers/remoteAgentHost/test/electron-browser/remotesEditor.test.ts \
  --run src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteHostOptions.test.ts \
  --run src/vs/sessions/contrib/chat/test/browser/sessionEnvironmentPicker.test.ts \
  --reporter dot
./scripts/test.sh --run src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remotesWidget.test.ts --reporter dot
  • npm run build-fast -- --client-only — passed for the final source changes.
  • npm run -s precommit — passed through the commit hook, including TypeScript formatting/lint and CSS hygiene.
  • git diff --check — passed.
  • npm run typecheck-client — passed during implementation.
  • npm run valid-layers-check — passed.
  • npm run stylelint -- src/vs/sessions/contrib/providers/remoteAgentHost/browser/media/remotesWidget.css — passed.

The final table was inspected in dark/light, narrow, and empty Windows fixtures. Browser checks verified column resizing, horizontal keyboard reveal, absence of visibility controls, status-label parity, disabled Remove descriptions, and keyboard navigation through Connect/Disconnect, Rename, and Remove. Tests cover rename cancellation/default restoration, client-local naming, discovery-only rename without connection, removal capabilities, and focus after a renamed row moves in sort order.

Earlier live macOS Code OSS 1.144.0 validation used the existing default profile for Environment → Manage routing, unchanged environment selection, standalone modal presentation, hidden Dev Containers, and SSH configuration opening. The documentation redirects were verified. The final table actions were exercised with fixture services, not by altering real remote connections.

Native Windows/WSL and Linux flows, full smoke/integration suites, and live Docker discovery were not run for this follow-up. Earlier branch validation covered the retained registration/provider/IPC changes and the standalone editor migration; the commands above focus on Remotes and its shared picker behavior.

Add grouped remote discovery and show/hide switches using existing location registration, with shared enabled counts, refresh warnings, and accessibility support.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 21, 2026 08:20
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 53b7b197 Current: eb9bfe56

Added (9)

sessions/remotes/remotesWidget/Table/Light

current

sessions/remotes/remotesWidget/Wide/Light

current

sessions/remotes/remotesWidget/Windows/Light

current

sessions/remotes/remotesWidget/Narrow/Light

current

sessions/remotes/remotesWidget/Empty/Light

current

sessions/remotes/remotesWidget/EmptyWindows/Light

current

sessions/remotes/remotesWidget/EmptyNarrow/Light

current

sessions/remotes/remotesWidget/RefreshWarnings/Light

current

sessions/remotes/remotesWidget/EmptyRefreshWarnings/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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

3 open issues
What changed in this PR

Adds a new Remotes management surface to Customizations in the desktop Agents window, letting users control which known remote locations appear in the New Session picker (with shared, live navigation badge counts).

Changes:

  • Introduces a Remotes contributed section (widget + model) with grouped inventory, enable/disable toggles, refresh warnings, keyboard/a11y support, and fixtures/tests.
  • Adds observable count support for contributed sections and wires it into navigation/sidebar badges without instantiating widgets.
  • Adds registration-only APIs for WSL and Dev Container workspaces plus Dev Container desktop IPC discovery plumbing and tests.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​aiCustomization/​aiCustomizationManagementEditor.test.ts Updates editor tests to cover contributed navigation counts without widget creation.
src/​vs/​workbench/​contrib/​chat/​common/​aiCustomizationWorkspaceService.ts Adds Remotes to the management section enum.
src/​vs/​workbench/​contrib/​chat/​browser/​aiCustomization/​media/​aiCustomizationManagement.css Extends shared layout styles to the new customization list container.
src/​vs/​workbench/​contrib/​chat/​browser/​aiCustomization/​aiCustomizationManagementSectionRegistry.ts Adds optional observable count to contributed sections.
src/​vs/​workbench/​contrib/​chat/​browser/​aiCustomization/​aiCustomizationManagementEditor.ts Plumbs contributed counts into sections + registers count observers.
src/​vs/​workbench/​contrib/​accessibility/​browser/​accessibilityConfiguration.ts Adds verbosity setting for Remotes accessibility help.
src/​vs/​sessions/​sessions.desktop.main.ts Registers the desktop Remotes customization contribution.
src/​vs/​sessions/​contrib/​sessions/​test/​browser/​customizationsToolbar.test.ts Adds tests for Remotes badge behavior and menu contribution gating.
src/​vs/​sessions/​contrib/​sessions/​browser/​customizationsToolbar.contribution.ts Adds Remotes item + supports observable counts in toolbar totals/badges.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​test/​browser/​remotesWidget.test.ts New tests for RemotesWidget UI behavior, a11y, warnings, focus, search.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​test/​browser/​remotesWidget.fixture.ts New themed fixtures for Remotes widget snapshots.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​test/​browser/​remotesModel.test.ts New tests for RemotesModel discovery/merge/remove/count behavior.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​test/​browser/​entryDrivenProviderContribution.test.ts Adds regression test for offline SSH/WSL reconciliation.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​test/​browser/​devContainerAgentHostService.test.ts Adds test for offline Dev Container workspace registration/removal persistence.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​electron-browser/​remotesCustomization.contribution.ts New desktop contribution registering Remotes section + accessible view providers.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​wslAgentHost.contribution.ts Schedules WSL reconcile to avoid lazy-service construction reentrancy.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​sshAgentHost.contribution.ts Triggers reconcile on configured-entry changes (offline registration).
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​remotesWidget.ts New RemotesWidget implementation (tree, toggles, refresh, a11y, warnings).
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​remotesModel.ts New RemotesModel implementation (discovery, merge, enable/disable, counts).
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​media/​remotesWidget.css New styling for Remotes widget list rows and warning icon.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​devContainerAgentHostService.ts Adds workspace registration/removal/list APIs for offline locations.
src/​vs/​sessions/​contrib/​chat/​browser/​aiCustomizationWorkspaceService.ts Includes Remotes in Sessions management sections list.
src/​vs/​sessions/​common/​devContainerAgentHostService.ts Extends devcontainer agent host service interface with workspace APIs.
src/​vs/​sessions/​AI_CUSTOMIZATIONS.md Documents Remotes contributed section and count behavior.
src/​vs/​platform/​agentHost/​test/​node/​devContainerAgentHostService.test.ts Adds tests for docker discovery list behavior and error surfacing.
src/​vs/​platform/​agentHost/​test/​electron-browser/​wslRemoteAgentHostService.test.ts Adds test for persistent offline WSL distro registration.
src/​vs/​platform/​agentHost/​test/​common/​devContainerAgentHostIpc.test.ts New tests for discovery cancellation forwarding + unbuffered events.
src/​vs/​platform/​agentHost/​node/​devContainerAgentHostService.ts Adds listDevContainers docker enumeration for desktop/local discovery.
src/​vs/​platform/​agentHost/​electron-browser/​wslRemoteAgentHostServiceImpl.ts Adds cacheDistro API for offline WSL registration.
src/​vs/​platform/​agentHost/​common/​wslRemoteAgentHost.ts Extends WSL service interface with cacheDistro.
src/​vs/​platform/​agentHost/​common/​devContainerAgentHostIpc.ts Adds helper channel wrapper to route cancellation without serializing tokens.
src/​vs/​platform/​agentHost/​common/​devContainerAgentHost.ts Adds IDiscoveredDevContainer + optional listDevContainers API.
src/​vs/​platform/​agentHost/​browser/​nullWslRemoteAgentHostService.ts Implements cacheDistro for null service (throws on unsupported platform).
src/​vs/​platform/​accessibility/​browser/​accessibleView.ts Adds AccessibleViewProviderId.Remotes.
src/​vs/​code/​electron-utility/​sharedProcess/​sharedProcessMain.ts Switches Dev Container channel registration to the new IPC helper.

Review effort: Lite

Open Remotes from the picker without changing the selected environment, and document the action in accessibility help.

Co-authored-by: Copilot <[email protected]>
Open Remotes only from the Environment picker, remove its Customizations entries and badge plumbing, and preserve discovery lifetime and accessibility behavior.

Co-authored-by: Copilot <[email protected]>
Add empty-state guidance and agent-session documentation links, open SSH configuration in a modal editor, and use the standard refresh action. Temporarily hide Dev Containers while retaining the implementation.

Co-authored-by: Copilot <[email protected]>
@chrmarti Christof Marti (chrmarti) changed the title sessions: Add Remotes management to Customizations sessions: Add standalone Remotes management Oct 22, 2026
Show live connection state and inline connect/disconnect actions while preserving existing remote registration behavior. Keep pending operations accessible and prevent duplicate connection changes.

Co-authored-by: Copilot <[email protected]>
Align Remotes with the Language Models editor, replace visibility switches with connection actions, and add Rename, Remove, and tunnel settings actions. Share status labels and rename behavior with the Environment picker.

Co-authored-by: Copilot <[email protected]>
Preserve the Remotes Manage entry and shared status labels alongside the updated Environment picker toolbar, local isolation options, and accessibility help.

Co-authored-by: Copilot <[email protected]>
Hide the Environment picker's Manage entry by default and allow automatic experiment overrides. Keep accessibility help in sync and cover both experiment arms and live setting changes.

Co-authored-by: Copilot <[email protected]>
Replace each successful discovery snapshot while retaining registrations and failed or canceled source results. Add regression coverage for pruning and the existing Dev Container removal notification.

Co-authored-by: Copilot <[email protected]>
@chrmarti
Christof Marti (chrmarti) marked this pull request as ready for review October 23, 2026 07:32
@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

@chrmarti
Christof Marti (chrmarti) merged commit 486af7e into main Oct 23, 2026
59 checks passed
@chrmarti
Christof Marti (chrmarti) deleted the chrmarti/remotes-customizations branch October 23, 2026 09:18
@vs-code-engineering vs-code-engineering Bot added this to the 1.144.0 milestone Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants