Skip to content

sessions: redesign unified workspace picker - #334591

Merged
Megan Rogge (meganrogge) merged 3 commits into
microsoft:mainfrom
meganrogge:agents/workspace-picker-redesign-ideas
Sep 4, 2026
Merged

sessions: redesign unified workspace picker#334591
Megan Rogge (meganrogge) merged 3 commits into
microsoft:mainfrom
meganrogge:agents/workspace-picker-redesign-ideas

Conversation

@meganrogge

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

Copy link
Copy Markdown
Collaborator
Image

Summary

  • replace the Local/Remote tabs with one searchable workspace picker behind chat.agentSessions.consolidatedRemoteWorkspaces
  • add explicit local Add GitHub Repository, Clone Repository, and Use Repository in Cloud flows while preserving the legacy repository action when the setting is disabled
  • move remote recents, hosts, SSH, tunnels, WSL, and related actions into a single icon-aware Remote flyout
  • align wording and icons with the GitHub app, including Start from Scratch, Open Folder, and the Search placeholder
  • collapse generated worktree recents onto known parent repositories without changing the actual execution checkout

Validation

  • npm run transpile-client
  • ESLint on all changed files
  • ./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 --check
  • manually verified the dedicated Agents window after provider hydration and exercised the picker presentation

Closes #334563

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>
Copilot AI balanced review requested due to automatic review settings September 4, 2026 19:14
@vs-code-engineering

vs-code-engineering Bot commented Sep 4, 2026

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/sessions/services/sessions/browser/sessionsRecentWorkspacesService.ts
  • src/vs/sessions/services/sessions/common/session.ts

Ladislau Szomoru (@lszomoru)

Matched files:

  • src/vs/sessions/services/sessions/browser/sessionsRecentWorkspacesService.ts
  • src/vs/sessions/services/sessions/common/session.ts

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

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

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 High severity · 2 Medium severity

New issues introduced by this change (3)
Severity Finding
High severity src/​vs/​sessions/​contrib/​chat/​browser/​sessionWorkspacePicker.ts — The generated Attach Repository row is bound to the first non-context GitHub action. In unified…
Medium severity src/​vs/​sessions/​contrib/​chat/​browser/​sessionWorkspacePicker.ts — Converting a remote recent into a submenu action drops both its unavailable state and its remove…
Medium severity 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 isUnavailable is computed, and toAction therefore 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.

Comment thread src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts
Comment thread src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@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)

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);

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]

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)

@meganrogge
Megan Rogge (meganrogge) merged commit 42b37b7 into microsoft:main Sep 4, 2026
30 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Sep 4, 2026
@TylerLeonhardt

Copy link
Copy Markdown
Member

Heads up — main is red at HEAD (42b37b7a649, this PR's merge commit), and it looks like a semantic conflict with #334554 rather than anything wrong with either PR on its own.

Property 'ConsolidatedRemoteWorkspaces' does not exist on type 'typeof ChatConfiguration'.

#334554 removed ConsolidatedRemoteWorkspaces from the ChatConfiguration enum and moved the setting to UNIFIED_WORKSPACE_PICKER_SETTING in sessions/contrib/chat/common/constants.ts. This PR adds three fresh references to the old member:

  • sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts:1545
  • sessions/contrib/providers/copilotChatSessions/test/browser/copilotChatSessionsProvider.test.ts:290
  • sessions/contrib/providers/copilotChatSessions/test/browser/copilotChatSessionsProvider.test.ts:529

The provider imports ChatConfiguration from workbench/contrib/chat/common/constants.js, which no longer declares it. The other two uses in that file, GlobalAutoApprove at 1720 and DefaultPermissionLevel at 1724, are fine, so the import itself stays.

The two PRs touch disjoint files, so git merged them cleanly and only the type checker noticed. Timeline:

Time (UTC)
19:39:38 Compile & Hygiene passes here
20:06:02 #334554 merges, removing the enum member
23:55:25 this PR merges

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 UNIFIED_WORKSPACE_PICKER_SETTING if that's useful, but it's your call on which read path you want at that site given the legacy-key migration in unifiedWorkspacePickerConfiguration.ts.

TylerLeonhardt added a commit that referenced this pull request Sep 5, 2026
Use the Sessions-owned unified workspace picker setting in the Copilot provider and its tests, resolving the compiler errors and legacy-action test failures introduced by concurrent main changes.

Refs #334554 and #334591.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Workspace picker redesign: prepare for multi-folder, local GitHub checkout, and PR review sessions

5 participants