Skip to content

Fix Disable button dropdown showing redundant "Disable" for workspace-enabled extensions#320291

Open
anuragyadav0311 wants to merge 1 commit into
microsoft:mainfrom
anuragyadav0311:main
Open

Fix Disable button dropdown showing redundant "Disable" for workspace-enabled extensions#320291
anuragyadav0311 wants to merge 1 commit into
microsoft:mainfrom
anuragyadav0311:main

Conversation

@anuragyadav0311
Copy link
Copy Markdown

…ed extensions

When an extension is disabled globally but enabled for a workspace (EnabledWorkspace state), the Disable button dropdown incorrectly showed both 'Disable' and 'Disable (Workspace)' items.

The 'Disable' (global) action should not appear because the extension is already disabled globally. Only 'Disable (Workspace)' is meaningful in this state.

Fix by restricting DisableGloballyAction to only be enabled when the extension's enablement state is EnabledGlobally.

Fixes #244138

…ed extensions

When an extension is disabled globally but enabled for a workspace
(EnabledWorkspace state), the Disable button dropdown incorrectly
showed both 'Disable' and 'Disable (Workspace)' items.

The 'Disable' (global) action should not appear because the extension
is already disabled globally. Only 'Disable (Workspace)' is meaningful
in this state.

Fix by restricting DisableGloballyAction to only be enabled when the
extension's enablement state is EnabledGlobally.

Fixes microsoft#244138
Copilot AI review requested due to automatic review settings June 7, 2026 15:05
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.

Adjusts when the “Disable Globally” extension action is enabled so it only applies to extensions currently enabled globally.

Changes:

  • Tightens DisableGloballyAction enablement condition to only allow the action when enablementState === EnabledGlobally.

Comment on lines 1782 to 1784
this.enabled = this.extension.state === ExtensionState.Installed
&& (this.extension.enablementState === EnablementState.EnabledGlobally || this.extension.enablementState === EnablementState.EnabledWorkspace)
&& this.extension.enablementState === EnablementState.EnabledGlobally
&& this.extensionEnablementService.canChangeEnablement(this.extension.local);
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