Skip to content

sessions: Keep Dev Container providers out of the Environment picker - #346506

Merged
Christof Marti (chrmarti) merged 2 commits into
mainfrom
chrmarti/devcontainer-env-picker
Nov 6, 2026
Merged

Christof Marti (chrmarti) merged 2 commits into
mainfrom
chrmarti/devcontainer-env-picker

Conversation

@chrmarti

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

Copy link
Copy Markdown
Collaborator

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

  • getSessionCreationEnvironments excludes container-backed providers (those with a devContainerSourceWorkspace). The filter applies only to the picker list, not to isVisibleInEnvironmentPicker, 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.
  • Remotes management no longer models Dev Containers. The devContainer remote kind was never included in getVisibleRemoteKinds, so its Docker discovery never ran and its rows were never rendered. This removes the kind, its listDevContainers shared-process call from the Remotes editor, and its widget strings.
  • REMOTE_AGENT_HOST_SESSIONS_PROVIDER.md now describes Dev Containers as an option of the source workspace rather than as entries in the Remotes modal or the picker.

The platform listDevContainers IPC no longer has callers in the workbench; removing it is left for a follow-up.

The second commit fixes remoteAgentHostActions.test.ts, which fails on main since #346421: that change moved the GitHub Environments menu registration to vs/sessions/.../missionControlAgentHost.contribution.ts, while the test kept importing the vs/workbench module for its side effects.

How to test

  1. Enable chat.agentHost.devContainer.enabled and start a session in a folder with a devcontainer.json using the Dev Container option.
  2. Reload the window and open the Environment picker: there is no separate entry for the container. The folder's environment still offers "Dev Container" when that folder is selected.
  3. Open Manage Remote Environments: there is no Dev Containers group.

Validation

  • pnpm run typecheck-client: passed
  • pnpm 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 on main)
  • node test/unit/browser/index.js --run src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteAgentHostActions.test.ts --browser chromium: 13 passing

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]>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 10:45

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.

🟢 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]>
@chrmarti
Christof Marti (chrmarti) marked this pull request as ready for review November 6, 2026 11:25
@chrmarti
Christof Marti (chrmarti) merged commit 208dce6 into main Nov 6, 2026
51 checks passed
@chrmarti
Christof Marti (chrmarti) deleted the chrmarti/devcontainer-env-picker branch November 6, 2026 11:27
@vs-code-engineering vs-code-engineering Bot added this to the 1.146.0 milestone Nov 6, 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]>
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