Skip to content

sessions: Remove unused Dev Container listing and workspace registration - #346551

Merged
Christof Marti (chrmarti) merged 1 commit into
mainfrom
chrmarti/devcontainer-unused-code
Nov 10, 2026
Merged

Christof Marti (chrmarti) merged 1 commit into
mainfrom
chrmarti/devcontainer-unused-code

Conversation

@chrmarti

Copy link
Copy Markdown
Collaborator

Remotes management no longer lists Dev Containers (#346506), which left the code that supported that list without callers. This removes it:

  • IDevContainerAgentHostMainService.listDevContainers, IDiscoveredDevContainer, and the shared-process implementation that listed containers with docker ps.
  • The listing's cancellation-token forwarding in createDevContainerAgentHostChannel. The helper still creates the channel with unbuffered sandbox support events, which its remaining test covers.
  • IDevContainerAgentHostService.addWorkspace, removeWorkspace and getWorkspaces, which registered, forgot and listed Dev Container locations for that list.

The tests that only covered these APIs are removed. Persisted Dev Container connections keep their stored format, so older builds can still read them.

No behavior change.

How to test

Start, reload and reconnect a Dev Container session in the Agents window; it should behave as before. Manage Remote Environments shows no Dev Containers group, as before.

Validation

  • pnpm run typecheck-client: passed
  • pnpm run eslint <changed files>: passed
  • ./scripts/test.sh --run src/vs/platform/agentHost/test/common/devContainerAgentHostIpc.test.ts --run src/vs/platform/agentHost/test/node/devContainerAgentHostService.test.ts --run src/vs/workbench/contrib/sessions/providers/remoteAgentHost/test/browser/devContainerAgentHostService.test.ts: 111 passing

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

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 block the cleanup of unused Dev Container discovery and workspace registration code.

No open issues 🎉

What changed in this PR

Removes unused Dev Container discovery and workspace registration code left behind by #346506. This cleanup preserves the stored connection format and existing session connection behavior.

Changes:

  • Removes container listing APIs, discovery types, and the docker ps implementation.
  • Simplifies the IPC channel while retaining unbuffered sandbox support events.
  • Removes workspace registration APIs and tests specific to the deleted functionality.
File Description
src/​vs/​workbench/​contrib/​sessions/​providers/​remoteAgentHost/​test/​browser/​devContainerAgentHostService.test.ts Removes the offline workspace registration test.
src/​vs/​workbench/​contrib/​sessions/​providers/​remoteAgentHost/​browser/​devContainerAgentHostService.ts Removes workspace registration, removal, and listing methods.
src/​vs/​workbench/​contrib/​sessions/​common/​devContainerAgentHostService.ts Removes workspace management methods from the service interface.
src/​vs/​platform/​agentHost/​test/​node/​devContainerAgentHostService.test.ts Removes Docker discovery tests.
src/​vs/​platform/​agentHost/​test/​common/​devContainerAgentHostIpc.test.ts Removes discovery cancellation coverage; retains sandbox event coverage.
src/​vs/​platform/​agentHost/​node/​devContainerAgentHostService.ts Removes the Docker-backed container listing implementation.
src/​vs/​platform/​agentHost/​common/​devContainerAgentHostIpc.ts Removes discovery-specific cancellation forwarding.
src/​vs/​platform/​agentHost/​common/​devContainerAgentHost.ts Removes the discovery type and listing API.

Review effort: Balanced

@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Sandeep Somavarapu (@sandy081)

Matched files:

  • src/vs/workbench/contrib/sessions/common/devContainerAgentHostService.ts

Ladislau Szomoru (@lszomoru)

Matched files:

  • src/vs/workbench/contrib/sessions/common/devContainerAgentHostService.ts

@chrmarti
Christof Marti (chrmarti) merged commit 9471f23 into main Nov 10, 2026
52 checks passed
@chrmarti
Christof Marti (chrmarti) deleted the chrmarti/devcontainer-unused-code branch November 10, 2026 08:20
@vs-code-engineering vs-code-engineering Bot added this to the 1.147.0 milestone Nov 10, 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