Skip to content

sessions: add Dev Container workspace menu option - #335303

Merged
Megan Rogge (meganrogge) merged 14 commits into
microsoft:mainfrom
meganrogge:agents/devcontainer-menu-integration
Sep 10, 2026
Merged

sessions: add Dev Container workspace menu option#335303
Megan Rogge (meganrogge) merged 14 commits into
microsoft:mainfrom
meganrogge:agents/devcontainer-menu-integration

Conversation

@meganrogge

@meganrogge Megan Rogge (meganrogge) commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator
Image

Summary

  • add a native side-chevron submenu to eligible local workspace-picker folders
  • route Use Dev Container through the existing Agent Host draft preference flow
  • label the selected workspace as <folder> - Dev Container, including its ARIA label
  • document the workflow in Agents accessibility help and cover availability gating/selection in unit tests

Fixes #335302

Validation

  • ./scripts/test.sh --run src/vs/sessions/contrib/chat/test/browser/sessionWorkspacePicker.test.ts --run src/vs/sessions/contrib/chat/test/browser/newChatWidget.test.ts (110 passing)
  • targeted npm run eslint -- ... for all changed TypeScript files
  • npm run hygiene
  • git diff --check

#317380

Copilot AI balanced review requested due to automatic review settings September 9, 2026 16:34
@vs-code-engineering

vs-code-engineering Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

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

Ulugbek Abdullaev (@ulugbekna)

Matched files:

  • src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts
  • src/vs/sessions/contrib/chat/test/browser/sessionWorkspacePicker.test.ts
  • src/vs/sessions/contrib/providers/agentHost/browser/localAgentHostSessionsProvider.ts

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.

Copilot review overview

🟡 Changes recommended

Availability caching and checkbox updates can leave the visible and ARIA workspace mode incorrect.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 2 Medium severity

New issues introduced by this change (2)
Severity Finding
Medium severity src/​vs/​sessions/​contrib/​chat/​browser/​newChatWidget.ts — This only snapshots Dev Container state when the widget seeds from an active session. The existing…
Medium severity src/​vs/​sessions/​contrib/​chat/​browser/​sessionWorkspacePicker.ts — This caches both positive and negative availability for the provider's lifetime, but availability…
What changed in this PR

Adds Dev Container execution to eligible local workspace rows in the Agents workspace picker.

Changes:

  • Adds an availability-gated Use Dev Container submenu.
  • Routes selection through the existing draft preference flow and updates visible/ARIA labels.
  • Adds accessibility guidance and picker tests.
File Description
agentHostSessionsProvider.ts Extends the provider contract with workspace availability.
localAgentHostSessionsProvider.ts Delegates availability checks to the Dev Container service.
sessionWorkspacePicker.ts Adds submenu selection, availability caching, and labels.
newChatWidget.ts Applies and restores the Dev Container preference.
sessionsChatAccessibilityHelp.ts Documents the workflow.
sessionWorkspacePicker.test.ts Tests submenu gating, selection, and labels.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/vs/sessions/contrib/chat/browser/newChatWidget.ts Outdated
Comment thread src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts
roblourens
roblourens previously approved these changes Sep 9, 2026
Expose eligible local folders as native workspace-picker submenus and carry the selected Dev Container mode into draft creation and accessible labeling.

Fixes microsoft#335302

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the workspace label synchronized with active draft configuration, recheck live Dev Container availability on each picker open, and align the accessibility regression with the documented wording.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@meganrogge
Megan Rogge (meganrogge) force-pushed the agents/devcontainer-menu-integration branch from 0341f2a to ecd8c03 Compare September 9, 2026 18:38
Present local and Dev Container execution as checked choices, avoid duplicate submenu descriptions, and document switching back to local execution.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the workspace picker as the single Dev Container mode control while preserving worktree compatibility gating.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Drive Dev Container selection through the workspace submenu after removing the checkbox, and normalize incompatible worktree isolation before session preparation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ActionList ignores direct clicks on submenu indicators, so hover the workspace row before selecting the Dev Container child action.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
roblourens
roblourens previously approved these changes Sep 9, 2026

@roblourens roblourens left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Experimental performance review bot]

Automated experimental performance review.

(Written by Copilot)

Comment thread src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts
Comment thread src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts
Cache and bound availability probes, refresh the picker in place after batched completion, and make smoke submenu hover deterministic.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Avoid relying on the delayed hover timer in Linux Electron smoke tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the action list's direct submenu activation instead of timing-sensitive pointer or focus behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ignore the synthetic Remote provider submenu while waiting for the local workspace availability action.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Invalidate cached workspace availability when the Dev Container connector registers or unregisters so early negative probes do not become stale.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Christof Marti (chrmarti) added a commit that referenced this pull request Sep 10, 2026
Align the new sandbox picker test with #335303, which removes the redundant Dev Container checkbox.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align the sandbox picker test with the removal of the redundant Dev Container checkbox.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Allow a workspace row with a historical non-Agent-Host provider to use a capable Agent Host provider for Dev Container availability checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@chrmarti

Copy link
Copy Markdown
Collaborator

Updated the branch with current main and the validated CI fix. The Linux smoke failure occurred because the recent workspace row retained default-copilot, so Dev Container availability was rejected before consulting the capable local-agent-host provider. The picker now resolves availability through a capable Agent Host provider for the same local folder while preserving the row's historical provider for workspace selection. Added a focused cross-provider regression test.

Validated on the clean update branch with client typecheck, full hygiene, 124 focused unit tests, and the green diagnostic matrix in #335414.

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.

Add Dev Container option to Agents workspace picker folder menu

8 participants