From 803326c2a342878fcf4a2f29fcd0ee041122d65c Mon Sep 17 00:00:00 2001 From: Lee Murray Date: Tue, 31 Mar 2026 13:52:46 +0100 Subject: [PATCH] Update src/vs/sessions/contrib/changes/browser/changesView.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../sessions/contrib/changes/browser/changesView.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/vs/sessions/contrib/changes/browser/changesView.ts b/src/vs/sessions/contrib/changes/browser/changesView.ts index 3bcc22afd7a..aad81dcabb6 100644 --- a/src/vs/sessions/contrib/changes/browser/changesView.ts +++ b/src/vs/sessions/contrib/changes/browser/changesView.ts @@ -1037,8 +1037,17 @@ export class ChangesViewPane extends ViewPane { return { showIcon: true, showLabel: true, isSecondary: false }; } - // Unknown actions (e.g. extension-contributed): icon-only secondary - return { showIcon: true, showLabel: false, isSecondary: true }; + // Unknown actions (e.g. extension-contributed): only hide the label when an icon is present. + if (action instanceof MenuItemAction) { + const icon = action.item.icon; + if (icon) { + // Icon-only button (no forced secondary state so primary/secondary can be inferred). + return { showIcon: true, showLabel: false }; + } + } + + // Fall back to default button behavior for actions without an icon. + return undefined; } } ));