-
Notifications
You must be signed in to change notification settings - Fork 36k
chat - track and apply defaultVisibilityMarker
#276252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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', |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
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.
| type: 'string', | |
| 'type': 'string', |
| 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; |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
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.
| 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; | |
| } |
| if ( | ||
| key.scope === StorageScope.WORKSPACE && | ||
| key.name === LayoutStateKeys.AUXILIARYBAR_HIDDEN.name && | ||
| typeof this.configurationService.getValue('workbench.secondarySideBar.defaultVisibilityMarker') === 'string' && |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
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.
https://github.com/microsoft/vscode-internalbacklog/issues/6168