Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,8 @@ export class DisableGloballyAction extends ExtensionAction {
if (this.extension && this.extension.local && !this.extension.isWorkspaceScoped && this.extensionService.extensions.some(e => areSameExtensions({ id: e.identifier.value, uuid: e.uuid }, this.extension!.identifier))) {
this.enabled = this.extension.state === ExtensionState.Installed
&& (this.extension.enablementState === EnablementState.EnabledGlobally || this.extension.enablementState === EnablementState.EnabledWorkspace)
&& this.extensionEnablementService.canChangeEnablement(this.extension.local);
&& this.extensionEnablementService.canChangeEnablement(this.extension.local)
&& !this.extensionEnablementService.isDisabledGlobally(this.extension.local);
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a test case to verify that DisableGloballyAction is disabled when an extension is disabled globally but enabled for the workspace. This would cover the specific scenario fixed by this PR. The test file at src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts has tests for other scenarios but not this one.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the requested unit test case to verify the fix.

}
}

Expand Down
Loading