Skip to content

fix: correct extension disable dropdown for workspace-only enabled state#311181

Open
tianhaocui wants to merge 1 commit intomicrosoft:mainfrom
tianhaocui:fix-extension-disable-dropdown
Open

fix: correct extension disable dropdown for workspace-only enabled state#311181
tianhaocui wants to merge 1 commit intomicrosoft:mainfrom
tianhaocui:fix-extension-disable-dropdown

Conversation

@tianhaocui
Copy link
Copy Markdown

Fixes #244138

Summary

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

Root cause

DisableGloballyAction.update() checks for both EnabledGlobally and EnabledWorkspace enablement states. When an extension is disabled globally but enabled for workspace (EnabledWorkspace), both DisableGloballyAction and DisableForWorkspaceAction become enabled, causing both to appear in the dropdown.

Fix

Changed DisableGloballyAction to only be enabled when the extension's enablement state is EnabledGlobally. When the extension is only enabled at the workspace level, the global disable action is no longer shown since the extension is already disabled globally.

Test plan

  1. Install an extension and disable it globally
  2. Enable the extension for the current workspace
  3. Verify the Disable button shows only "Disable (Workspace)" without a dropdown

…ally

When an extension is disabled globally but enabled for a workspace,
DisableGloballyAction should not be enabled since the extension is
already disabled at the global level. This prevents the dropdown
from showing both 'Disable' and 'Disable (Workspace)' options.

Fixes microsoft#244138
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

2 participants