{{ message }}
Repository navigation
sessions: Add Remotes management to Customizations - #343167
Draft
Christof Marti (chrmarti) wants to merge 3 commits into
Draft
Christof Marti (chrmarti) wants to merge 3 commits into
Christof Marti (chrmarti) wants to merge 3 commits into
Conversation
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 <223556219+Copilot@users.noreply.github.com>
Contributor
Contributor
There was a problem hiding this comment.
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
countsupport 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
Comment on lines
+107
to
+116
| const discover = async (kind: RemoteKind, task: () => Promise<readonly RemoteTarget[]>): Promise<RemoteKind | undefined> => { | ||
| try { | ||
| const targets = await task(); | ||
| if (!token.isCancellationRequested && !this._store.isDisposed && this.enabled) { | ||
| for (const target of targets) { | ||
| this.targets.set(this.getId(target), target); | ||
| } | ||
| this.update(); | ||
| } | ||
| } catch (error) { |
| await this.disconnect(workspaceUri); | ||
| const key = getComparisonKey(workspaceUri); | ||
| this._removeStoredConnection(key); | ||
| this._removeProvider(key); |
Comment on lines
+98
to
+104
Open Remotes from the picker without changing the selected environment, and document the action in accessibility help. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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 <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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.



Summary
Adds a desktop Agents-window Remotes page to Customizations so users can manage which known remote locations appear in the New Session picker without going through separate connection pickers.
No linked issue; this draft is a prototype requested directly during development.
Behavior and limitations
How to test
chat.remoteAgentHostsEnabledenabled, select Remotes below the Sessions list.chat.remoteAgentHostsAutoConnecttofalseto test offline registration.Validation
Rebased without conflicts onto
origin/mainatf82f4adff5e;git range-diffconfirmed the feature commit was unchanged by the rebase.npm run compile-client-- passed, including client type checking. The first attempt detected the upstream SDK version mismatch;npm run install-fastrestored the declared dependencies, and the subsequent compile passed.git diff --name-only --diff-filter=ACM -z origin/main...HEAD -- '*.ts' | xargs -0 npm run eslint ---- passed, 32 changed TypeScript files.npm run valid-layers-check-- passed.npm run stylelint -- src/vs/sessions/contrib/providers/remoteAgentHost/browser/media/remotesWidget.css src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css-- passed, with 96 pre-existing design-token suggestions in the shared stylesheet.git diff --check-- passed. Commit hygiene hooks also passed.Exact focused test command
Before rebase, live macOS Dev 1.144.0 scenarios passed for sidebar/dialog entry points, Plugins inset parity, warning tooltips, keyboard navigation, accessibility help/focus restoration, actual picker addition/removal, and synchronized badges across filtering and reload. Dark/light, narrow, empty, and Windows-grouping fixtures were inspected. These UI scenarios were not rerun after rebase. Full smoke/integration suites and Windows/Linux live validation were not run.