Agents: Add experimental tabbed workspace picker#312773
Conversation
…e actions Co-authored-by: Copilot <copilot@github.com>
…ection descriptions
… and auto-tab behavior
…l services and reset user tab selection on workspace change
… active tab during session
There was a problem hiding this comment.
Pull request overview
Introduces an experimental tabbed workspace picker for the Sessions window’s “new session” flow, enabling users to choose workspaces via separate Local/GitHub/Remote tabs and related UI enhancements behind a new configuration setting.
Changes:
- Add
sessions.experimental.tabbedWorkspacePickersetting and wire it into the Sessions window new chat view. - Implement
TabbedWorkspacePickerwith tab UI, category-based filtering, and inline browse actions. - Extend the action widget/action list to support an optional header element and a max-width cap used by the picker.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/contrib/copilotChatSessions/browser/copilotChatSessionsProvider.ts | Assign browse action grouping/icon updates to support tab categorization (e.g. repositories). |
| src/vs/sessions/contrib/configuration/browser/configuration.contribution.ts | Register the new experimental setting for enabling the tabbed picker. |
| src/vs/sessions/contrib/chat/browser/tabbedWorkspacePicker.ts | New tabbed picker implementation (tabs + workspace/browse-action categorization). |
| src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts | Add extensibility hooks (header/min/max width) and filtering logic used by the tabbed picker. |
| src/vs/sessions/contrib/chat/browser/newChatViewPane.ts | Select the appropriate picker implementation based on platform and the new setting. |
| src/vs/sessions/contrib/chat/browser/media/chatWidget.css | Styles for the tab bar and inline browse-action rows. |
| src/vs/sessions/common/configuration.ts | Define the new setting ID constant. |
| src/vs/platform/actionWidget/browser/actionWidget.ts | Allow callers to pass an optional header element rendered above the action list/filter. |
| src/vs/platform/actionWidget/browser/actionList.ts | Add maxWidth option and clamp computed list width accordingly. |
Comments suppressed due to low confidence (1)
src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts:564
- Ungrouped browse actions are now rendered without
description: action.description, soISessionWorkspaceBrowseAction.descriptionis effectively ignored in this path despite being intended for display in the workspace picker. Consider restoring the description here (or only suppressing it in the specific tabbed/inline UI variant).
items.push({
kind: ActionListItemKind.Action,
label: localize('workspacePicker.browseSelectAction', "Select {0}...", action.label),
group: { title: '', icon: action.icon },
disabled: isUnavailable,
item: { browseActionIndex: index },
});
|
Base:
|
|
A few architecture concerns: 1. Avoid extending The tab bar UI is specific to the session workspace picker — 2. No need for a new setting If grouped workspace picker is the right UX direction, it should just be the behavior — no need for 3. Groups should be provider-contributable, not hardcoded The Local / GitHub / Remote grouping is currently hardcoded in Instead, the groups should come from the providers themselves. One approach: extend |
…workspace picker action
…ization - Updated IActionWidgetService to include an onPopupRendered callback for improved rendering control. - Modified ActionWidgetService to handle the new onPopupRendered parameter in show method. - Added category property to IAgentHostSessionWorkspaceOptions for workspace categorization. - Updated buildAgentHostSessionWorkspace to utilize the new category property. - Enhanced LocalAgentHostSessionsProvider to categorize workspaces as 'local'. - Updated CopilotChatSessionsProvider to categorize workspaces as 'local' or 'cloud' based on their source. - Enhanced RemoteAgentHostSessionsProvider to categorize workspaces as 'remote'. - Introduced SessionWorkspaceCategory type to standardize workspace categorization across providers. - Removed the experimental tabbed workspace picker as it is no longer needed. - Updated WorkspacePicker to support tabbed navigation based on workspace categories (local, cloud, remote). Co-authored-by: Copilot <copilot@github.com>
|
@sandy081 I've made some updates - please review |
|
After thinking more about the architecture, I think we can avoid extending Tab bar as inline DOM, not inside the action widget overlay The tab bar (Local / GitHub / Remote) should be a normal inline element rendered below the workspace trigger button — owned entirely by the workspace picker, not by the action widget. When a tab is clicked, just re-invoke Flow:
This keeps For positioning: force the dropdown to always appear below the tab bar (use |
…dering in workspace picker
|
Thanks for the feedback. I gave the inline tab bar approach a try and want to walk through what I hit before settling on the current implementation. What I tried:
Where it broke down:
Where I landed: Kept the tab bar inside the popup, but exposed it through a generic
I think this addresses the ownership concern even if it doesn't fully eliminate the API surface change. Happy to try the inline approach again if you have a trick for the visual/dismissal issues |
|
Thanks for trying the inline approach and explaining what broke — those are real issues. I think the right path is a new standalone widget rather than extending
This solves all three issues you hit:
On tab switch: dispose the old No changes needed to On grouping: I don't think we need a |
- Updated ISessionWorkspace and ISessionWorkspaceBrowseAction interfaces to use a generic 'group' property instead of 'category' for workspace categorization. - Introduced well-known group labels: SESSION_WORKSPACE_GROUP_LOCAL, SESSION_WORKSPACE_GROUP_CLOUD, and SESSION_WORKSPACE_GROUP_REMOTE for consistent workspace grouping across the application. - Refactored various session providers (LocalAgentHost, RemoteAgentHost, CopilotChat) to utilize the new group labels in their browse actions and workspace definitions. - Adjusted CSS and picker logic to accommodate the new grouping mechanism, ensuring a seamless user experience when selecting workspaces.
|
Thanks for pushing on this. Where it landed: No Picker owns its own popup for the tabbed case. Calls Group-based tab discovery (no closed enum). Dropped // Union of `group` values across providers' browse actions and recent workspaces.
// Well-known labels (Local/Cloud/Remote) first; custom labels appended.
private _getAvailableTabs(): string[]Three convenience constants ( Simplifications that fell out:
19/19 tests pass, including 6 new tests for tab discovery (order, dedup, custom labels, ungrouped actions, recents seeding). |
|
Minor: |
|
Consider extracting the tabbed popup logic into a standalone, reusable widget (e.g., |
… in workspace picker
…egrate submenu for manage actions Co-authored-by: Copilot <copilot@github.com>
…styling Co-authored-by: Copilot <copilot@github.com>



This pull request introduces a new experimental "Tabbed Workspace Picker" feature for the chat session workspace picker, along with several extensibility and usability improvements to the action widget infrastructure. The main changes include support for rendering a custom header (such as a tab bar) above the action list, new options for constraining the action widget's width, and extensibility hooks in the workspace picker to support filtering and custom layouts. There are also related styling updates and configuration wiring for the new tabbed picker.
Screen.Recording.2026-04-27.at.14.41.36.mov
Tabbed Workspace Picker and Extensibility:
sessions.experimental.tabbedWorkspacePickerand implemented theTabbedWorkspacePickerclass, enabling a tabbed interface for selecting workspaces in chat sessions. The picker is conditionally enabled based on the configuration setting. [1] [2] [3]WorkspacePickerto support subclassing, including extensibility hooks for filtering workspaces and browse actions, customizing the header, and controlling minimum/maximum width. [1] [2] [3] [4] [5]Action Widget Infrastructure Improvements:
maxWidthtoIActionListOptions, and updated the action list widget to clamp its width betweenminWidthandmaxWidth, ensuring long items are truncated rather than expanding the popup. [1] [2] [3] [4] [5]Styling Updates:
These changes collectively enable a more flexible and user-friendly workspace picker experience, laying the groundwork for further UI enhancements and customization.