Skip to content

Conversation

@bpasero
Copy link
Member

@bpasero bpasero commented Nov 8, 2025

Copilot AI review requested due to automatic review settings November 8, 2025 08:26
@bpasero bpasero self-assigned this Nov 8, 2025
@vs-code-engineering vs-code-engineering bot added this to the November 2025 milestone Nov 8, 2025
@bpasero bpasero added the candidate Issue identified as probable candidate for fixing in the next release label Nov 8, 2025
@bpasero bpasero modified the milestones: November 2025, October 2025 Nov 8, 2025
Copy link
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

This PR adds a new experimental configuration setting workbench.secondarySideBar.defaultVisibilityMarker to help migrate "pre-AI" workspaces. The marker is used to determine whether the default secondary sidebar setting has been applied to a workspace, allowing the code to reset the auxiliary bar visibility state for workspaces that haven't migrated yet.

  • Adds a new experimental configuration setting for tracking migration state
  • Implements migration logic to reset auxiliary bar state for unmigrated workspaces

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/vs/workbench/browser/workbench.contribution.ts Adds the new workbench.secondarySideBar.defaultVisibilityMarker experimental configuration setting
src/vs/workbench/browser/layout.ts Implements migration logic in loadKeyFromStorage to reset auxiliary bar visibility for unmigrated workspaces

]
},
'workbench.secondarySideBar.defaultVisibilityMarker': {
type: 'string',
Copy link

Copilot AI Nov 8, 2025

Choose a reason for hiding this comment

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

The type property should be consistently quoted with single quotes to match the surrounding code style. All other properties in this file use single quotes around property names.

Suggested change
type: 'string',
'type': 'string',

Copilot uses AI. Check for mistakes.
Comment on lines +3059 to +3063
key.name === LayoutStateKeys.AUXILIARYBAR_HIDDEN.name &&
typeof this.configurationService.getValue('workbench.secondarySideBar.defaultVisibilityMarker') === 'string' &&
this.storageService.get(this.configurationService.getValue('workbench.secondarySideBar.defaultVisibilityMarker'), StorageScope.WORKSPACE) === undefined
) {
value = undefined;
Copy link

Copilot AI Nov 8, 2025

Choose a reason for hiding this comment

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

The configuration value workbench.secondarySideBar.defaultVisibilityMarker is retrieved twice using configurationService.getValue(). Consider storing it in a local variable to avoid redundant lookups.

Suggested change
key.name === LayoutStateKeys.AUXILIARYBAR_HIDDEN.name &&
typeof this.configurationService.getValue('workbench.secondarySideBar.defaultVisibilityMarker') === 'string' &&
this.storageService.get(this.configurationService.getValue('workbench.secondarySideBar.defaultVisibilityMarker'), StorageScope.WORKSPACE) === undefined
) {
value = undefined;
key.name === LayoutStateKeys.AUXILIARYBAR_HIDDEN.name
) {
const defaultVisibilityMarker = this.configurationService.getValue('workbench.secondarySideBar.defaultVisibilityMarker');
if (
typeof defaultVisibilityMarker === 'string' &&
this.storageService.get(defaultVisibilityMarker, StorageScope.WORKSPACE) === undefined
) {
value = undefined;
}

Copilot uses AI. Check for mistakes.
if (
key.scope === StorageScope.WORKSPACE &&
key.name === LayoutStateKeys.AUXILIARYBAR_HIDDEN.name &&
typeof this.configurationService.getValue('workbench.secondarySideBar.defaultVisibilityMarker') === 'string' &&
Copy link

Copilot AI Nov 8, 2025

Choose a reason for hiding this comment

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

The magic string 'workbench.secondarySideBar.defaultVisibilityMarker' should be extracted as a constant. Consider adding it to the WorkbenchLayoutSettings enum (lines 2755-2762) for consistency with other configuration keys used in this class.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

candidate Issue identified as probable candidate for fixing in the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants