Repository navigation
sessions: Keep Dev Container providers out of the Environment picker - #346506
Merged
Merged
Conversation
Dev Containers are an execution option of a folder with a devcontainer.json, offered on its source environment, not independent connections. Every persisted Dev Container provider was still listed as its own Environment picker entry. Exclude container-backed providers from the picker, and remove the unreachable Dev Container kind from Remotes management, whose discovery never ran and whose rows were never rendered. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the Dev Container environment-picker and Remotes management changes.
No open issues 🎉
What changed in this PR
This PR keeps Dev Containers as execution options of their source workspace rather than separate Environment picker entries, while preserving access to existing container sessions.
Changes:
- Excludes container-backed providers from session-creation environments without changing shared provider visibility.
- Removes unused Dev Container inventory, discovery wiring, and strings from Remotes management.
- Updates regression coverage, fixtures, and provider documentation.
| File | Description |
|---|---|
src/vs/workbench/contrib/sessions/test/browser/chat/sessionEnvironmentPicker.test.ts |
Covers exclusion of container-backed providers. |
src/vs/workbench/contrib/sessions/providers/remoteAgentHost/test/browser/remotesWidget.test.ts |
Removes obsolete container rows and warning cases. |
src/vs/workbench/contrib/sessions/providers/remoteAgentHost/test/browser/remotesWidget.fixture.ts |
Removes container entries from widget fixtures. |
src/vs/workbench/contrib/sessions/providers/remoteAgentHost/test/browser/remotesModel.test.ts |
Simplifies setup and adapts tests to supported remote kinds. |
src/vs/workbench/contrib/sessions/providers/remoteAgentHost/REMOTE_AGENT_HOST_SESSIONS_PROVIDER.md |
Documents containers as source-workspace execution options. |
src/vs/workbench/contrib/sessions/providers/remoteAgentHost/electron-browser/remotesEditor.ts |
Removes Dev Container discovery IPC wiring. |
src/vs/workbench/contrib/sessions/providers/remoteAgentHost/browser/remotesWidget.ts |
Removes container-specific setup and warning strings. |
src/vs/workbench/contrib/sessions/providers/remoteAgentHost/browser/remotesModel.ts |
Removes the Dev Container remote kind and management logic. |
src/vs/workbench/contrib/sessions/browser/chat/sessionEnvironmentPicker.ts |
Filters container-backed providers from picker environments. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/electron-browser/remotesEditor.test.ts |
Removes the unused shared-process service stub. |
Review effort: Balanced
…actions test The move of the Sessions code to vs/workbench/contrib/sessions (#346421) left the menu item registration in vs/sessions, so the test's side-effect import of the workbench module no longer registered the GitHub Environments connect action. Co-authored-by: Copilot <[email protected]>
Christof Marti (chrmarti)
marked this pull request as ready for review
November 6, 2026 11:25
Christof Marti (chrmarti)
enabled auto-merge (squash)
November 6, 2026 11:25
Federico Brancasi (federicobrancasi)
approved these changes
Nov 6, 2026
Christof Marti (chrmarti)
deleted the
chrmarti/devcontainer-env-picker
branch
November 6, 2026 11:27
This was referenced Nov 9, 2026
Christof Marti (chrmarti)
added a commit
that referenced
this pull request
Nov 10, 2026
…ion (#346551) Remotes management no longer lists Dev Containers (#346506), which left the shared-process Docker listing (listDevContainers) and the Dev Container service's addWorkspace, removeWorkspace and getWorkspaces without callers. Remove them; the channel helper keeps delivering sandbox support events unbuffered. Co-authored-by: Copilot <[email protected]>
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.
Dev Containers are an execution option of a folder that has a
devcontainer.json: the Environment picker offers "Dev Container" on the folder's source environment (This Computer, or an SSH, Tunnel or WSL host). However, every Dev Container provider that ever published a session is persisted and restored on startup, and each of them was also listed as a separate Environment picker entry. These entries accumulated and could not be removed from the UI.Changes
getSessionCreationEnvironmentsexcludes container-backed providers (those with adevContainerSourceWorkspace). The filter applies only to the picker list, not toisVisibleInEnvironmentPicker, so the sessions list host filter and Automations keep showing existing Dev Container sessions, and drafts and restored sessions that target a container still resolve it.devContainerremote kind was never included ingetVisibleRemoteKinds, so its Docker discovery never ran and its rows were never rendered. This removes the kind, itslistDevContainersshared-process call from the Remotes editor, and its widget strings.REMOTE_AGENT_HOST_SESSIONS_PROVIDER.mdnow describes Dev Containers as an option of the source workspace rather than as entries in the Remotes modal or the picker.The platform
listDevContainersIPC no longer has callers in the workbench; removing it is left for a follow-up.The second commit fixes
remoteAgentHostActions.test.ts, which fails onmainsince #346421: that change moved the GitHub Environments menu registration tovs/sessions/.../missionControlAgentHost.contribution.ts, while the test kept importing thevs/workbenchmodule for its side effects.How to test
chat.agentHost.devContainer.enabledand start a session in a folder with adevcontainer.jsonusing the Dev Container option.Validation
pnpm run typecheck-client: passedpnpm run eslint <changed files>: passed./scripts/test.sh --run src/vs/workbench/contrib/sessions/test/browser/chat/sessionEnvironmentPicker.test.ts --run src/vs/workbench/contrib/sessions/providers/remoteAgentHost/test/browser/remotesModel.test.ts --run src/vs/workbench/contrib/sessions/providers/remoteAgentHost/test/browser/remotesWidget.test.ts --run src/vs/sessions/contrib/providers/remoteAgentHost/test/electron-browser/remotesEditor.test.ts: 196 passing./scripts/test.sh --run src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteAgentHostActions.test.ts --run src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/missionControlAgentHostContribution.test.ts: 52 passing (2 failing onmain)node test/unit/browser/index.js --run src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteAgentHostActions.test.ts --browser chromium: 13 passing