Skip to content

feat: add PromptExtensionInstallFailureAction to handle extension ins…#319150

Open
vishalranaut wants to merge 2 commits into
microsoft:mainfrom
vishalranaut:fix/extension-disable-dropdown-duplicate-244138
Open

feat: add PromptExtensionInstallFailureAction to handle extension ins…#319150
vishalranaut wants to merge 2 commits into
microsoft:mainfrom
vishalranaut:fix/extension-disable-dropdown-duplicate-244138

Conversation

@vishalranaut
Copy link
Copy Markdown

@vishalranaut vishalranaut commented May 30, 2026

fix: remove duplicate disable options in extension button dropdown

Fixes #244138


Problem

When a VS Code extension is disabled both globally and for the workspace, the "Disable" button dropdown incorrectly shows both options at the same time:

  • "Disable"
  • "Disable (Workspace)"

This is confusing because one or both states are already applied — showing them again implies the user can disable something that is already disabled.

Root cause

The dropdown action list was being built without checking the extension's current disabled state. Both actions were always added regardless of whether the extension was already globally disabled, workspace-disabled, or enabled.

Fix

Added conditional checks before pushing each action into the dropdown list:

  • If already disabled globally → do not show "Disable"
  • If already disabled for workspace → do not show "Disable (Workspace)"
  • If enabled → show both options as normal (existing behaviour)

File changed: src/vs/workbench/contrib/extensions/browser/extensionsActions.ts


Before

Dropdown always showed both "Disable" and "Disable (Workspace)" regardless of state.

After

Dropdown only shows the disable options that are actually applicable to the current extension state.


Checklist

  • I have read the Contributing Guide
  • Code follows the existing TypeScript patterns in the file
  • No unrelated code was reformatted
  • No string labels or translations were changed
  • Tested manually by disabling an extension globally, per-workspace, and in both states to verify correct dropdown options appear

Copilot AI review requested due to automatic review settings May 30, 2026 15:58
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

Note

Copilot was unable to run its full agentic suite in this review.

Filters hidden actions from the Manage Extension dropdown menu and removes any resulting empty groups.

Changes:

  • Apply hidden-action filtering to each group in getActionGroups
  • Drop groups that become empty after filtering

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.

Disabled and enabled (workspace) extension Disable button dropdown contains both "Disable" and "Disable (Workspace)" items

3 participants