Use stable group key for workspace picker SubmenuAction id#312251
Merged
Use stable group key for workspace picker SubmenuAction id#312251
Conversation
- 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>
Contributor
There was a problem hiding this comment.
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
browseByGroupmap key (groupKey) instead of the localizedlabelwhen constructing theSubmenuActionid for grouped browse actions. - Update JSDoc for
ISessionWorkspaceBrowseAction.groupto 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
mjbvz
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #312245.
browseByGroupmap instead of the localizedlabelstring to ensure stable action ids across localesISessionWorkspaceBrowseAction.groupcomment to clarify it is a non-localized key for grouping, not a display label (the first action'slabelis used for display)