Skip to content

Use stable group key for workspace picker SubmenuAction id#312251

Merged
sandy081 merged 1 commit intomainfrom
sandy081/workspace-picker-stable-ids
Apr 23, 2026
Merged

Use stable group key for workspace picker SubmenuAction id#312251
sandy081 merged 1 commit intomainfrom
sandy081/workspace-picker-stable-ids

Conversation

@sandy081
Copy link
Copy Markdown
Member

Follow-up to #312245.

  • SubmenuAction id: Use the non-localized group key from browseByGroup map instead of the localized label string to ensure stable action ids across locales
  • JSDoc: Update ISessionWorkspaceBrowseAction.group comment to clarify it is a non-localized key for grouping, not a display label (the first action's label is used for display)

- SubmenuAction id uses the non-localized group key from browseByGroup map
  instead of the localized label to ensure stable ids across locales
- Update ISessionWorkspaceBrowseAction.group JSDoc to clarify it is a
  non-localized key, not a display label

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 23, 2026 22:55
@sandy081 sandy081 enabled auto-merge (squash) April 23, 2026 22:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR is a small follow-up in the Agents (sessions) workspace picker to ensure submenu action IDs remain stable across locales by basing them on non-localized group keys rather than localized labels, and it clarifies the contract for ISessionWorkspaceBrowseAction.group.

Changes:

  • Use the browseByGroup map key (groupKey) instead of the localized label when constructing the SubmenuAction id for grouped browse actions.
  • Update JSDoc for ISessionWorkspaceBrowseAction.group to document it as a non-localized grouping key and clarify display-label behavior.
Show a summary per file
File Description
src/vs/sessions/services/sessions/common/session.ts Clarifies group as a non-localized key and explains how display text is chosen for merged entries.
src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts Switches grouped submenu action IDs from localized label-based to stable group-key-based IDs.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@sandy081 sandy081 merged commit 2b9d7f7 into main Apr 23, 2026
30 checks passed
@sandy081 sandy081 deleted the sandy081/workspace-picker-stable-ids branch April 23, 2026 23:17
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 23, 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