sessions: redesign unified workspace picker - #334591
Conversation
Unify local and remote workspace selection behind the consolidated picker setting, add explicit local clone and cloud repository actions, and keep remote targets in a dedicated flyout. Align picker wording, icons, recents, and worktree handling with the repository-first design.\n\nRefs microsoft#334563\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Sandeep Somavarapu (@sandy081)Matched files:
Ladislau Szomoru (@lszomoru)Matched files:
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Repository attachment and Remote flyout actions contain functional regressions, and provider actions become stale after configuration changes.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (3)
| Severity | Finding |
|---|---|
src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts — The generated Attach Repository row is bound to the first non-context GitHub action. In unified… |
|
src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts — Converting a remote recent into a submenu action drops both its unavailable state and its remove… |
|
src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts — This snapshots the experimental setting only when the long-lived provider is constructed, while… |
What changed in this PR
Redesigns the Agents Window workspace picker into a unified, searchable experience while preserving the legacy mode.
Changes:
- Adds unified local, GitHub, cloud, and remote workspace actions.
- Groups remote hosts and recents into a Remote flyout.
- Collapses generated worktree recents onto parent repositories.
| File | Description |
|---|---|
sessionsRecentWorkspacesService.ts |
Collapses and removes worktree aliases. |
copilotChatSessionsProvider.ts |
Adds local clone and explicit cloud flows. |
copilotChatSessionsProvider.test.ts |
Tests repository acquisition actions. |
sessionWorkspacePicker.ts |
Implements unified picker and Remote flyout. |
sessionWorkspacePicker.test.ts |
Covers unified picker behavior. |
Suppressed comments (1)
src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts:1447
- Remote browse actions enter this branch before
isUnavailableis computed, andtoActiontherefore leaves them enabled by default. An incompatible or disconnected provider that was disabled in the tabbed picker can now be invoked from the Remote flyout. Compute provider availability first and carry it onto the submenu action.
const submenuAction = toAction({
id: `workspacePicker.remote.browse.${action.providerId}.${index}`,
label: actionLabel,
tooltip: action.description,
run: () => setRemotePickerItem({ browseAction: action }),
});
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
roblourens
left a comment
There was a problem hiding this comment.
[Experimental performance review bot]
Automated experimental performance review.
(Written by Copilot)
| const remoteProviders = allProviders.filter(isAgentHostProvider).filter(p => p.connectionStatus !== undefined); | ||
| const includeRemoteProviders = this._activeTab === SESSION_WORKSPACE_GROUP_REMOTE; | ||
| const includeRemoteProviders = remoteAgentHostsEnabled | ||
| && (activeGroup === undefined || activeGroup === SESSION_WORKSPACE_GROUP_REMOTE); |
There was a problem hiding this comment.
[Experimental performance review bot]
Severity: low
With tabs removed, activeGroup is normally undefined, and this added condition includes every remote provider while constructing the unified picker. The subsequent loop calls getRemoteHostStatusDescription, which calls provider.getSessions() and filters every session to compute active counts before the Remote submenu is opened.
Opening the workspace selector for any new session can pause longer as remote session history grows, even if the user selects Open Folder or a GitHub action and never opens Remote.
Suggested fix: Gate remote-provider status/count construction behind opening the Remote flyout (or otherwise compute those rows lazily), while keeping only the cheap top-level Remote action in the initial unified list.
(Written by Copilot)
|
Heads up — #334554 removed
The provider imports The two PRs touch disjoint files, so git merged them cleanly and only the type checker noticed. Timeline:
Nothing re-ran in the four hours between the last green check and the merge, which is why it went in green. Caught it because my unrelated PR #334655 picked it up in its merge commit. Happy to put up the swap to |


Summary
chat.agentSessions.consolidatedRemoteWorkspacesValidation
npm run transpile-client./scripts/test.sh --run src/vs/sessions/contrib/chat/test/browser/sessionWorkspacePicker.test.ts src/vs/sessions/contrib/providers/copilotChatSessions/test/browser/copilotChatSessionsProvider.test.ts(169 passing)git diff --checkCloses #334563