Skip to content

Agents - set the title/aria label for the button when the custom label changes#315210

Merged
lszomoru merged 1 commit into
mainfrom
lszomoru/visual-mule
May 8, 2026
Merged

Agents - set the title/aria label for the button when the custom label changes#315210
lszomoru merged 1 commit into
mainfrom
lszomoru/visual-mule

Conversation

@lszomoru
Copy link
Copy Markdown
Member

@lszomoru lszomoru commented May 8, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 8, 2026 08:43
@lszomoru lszomoru enabled auto-merge (squash) May 8, 2026 08:43
@lszomoru lszomoru self-assigned this May 8, 2026
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 updates the workbench button bar so that when a button’s custom/observable label changes (used by Agents UI), the button’s tooltip/title and aria-label are refreshed to match the new label (including keybinding text).

Changes:

  • Add setTitle(...) and setAriaLabel(...) to the IButton interface and forward them through composite button implementations.
  • Update WorkbenchButtonBar to recompute a plaintext label (stripping codicons) and apply it as the button title and aria label when the custom label changes.
  • Introduce helper imports (renderAsPlaintext, stripIcons) to generate accessible label text.
Show a summary per file
File Description
src/vs/platform/actions/browser/buttonbar.ts Updates label-change handling to also update tooltip/title and aria-label based on the current label text.
src/vs/base/browser/ui/button/button.ts Extends the IButton API with setTitle/setAriaLabel and implements/forwards them in button classes.

Copilot's findings

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

Comment thread src/vs/platform/actions/browser/buttonbar.ts
Comment thread src/vs/platform/actions/browser/buttonbar.ts
Comment thread src/vs/base/browser/ui/button/button.ts
@lszomoru lszomoru merged commit d59635a into main May 8, 2026
30 checks passed
@lszomoru lszomoru deleted the lszomoru/visual-mule branch May 8, 2026 09:11
@vs-code-engineering vs-code-engineering Bot added this to the 1.120.0 milestone May 8, 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