diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index c517d4fbd29de..7d0fcca60ea05 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -3050,7 +3050,18 @@ class LayoutStateModel extends Disposable { } private loadKeyFromStorage(key: WorkbenchLayoutStateKey): T | undefined { - const value = this.storageService.get(`${LayoutStateModel.STORAGE_PREFIX}${key.name}`, key.scope); + let value = this.storageService.get(`${LayoutStateModel.STORAGE_PREFIX}${key.name}`, key.scope); + + // TODO@bpasero remove this code in 1y when "pre-AI" workspaces have migrated + // Refs: https://github.com/microsoft/vscode-internalbacklog/issues/6168 + if ( + key.scope === StorageScope.WORKSPACE && + key.name === LayoutStateKeys.AUXILIARYBAR_HIDDEN.name && + this.configurationService.getValue('workbench.secondarySideBar.enableDefaultVisibilityInOldWorkspace') === true && + this.storageService.get('workbench.panel.chat.numberOfVisibleViews', StorageScope.WORKSPACE) === undefined + ) { + value = undefined; + } if (value !== undefined) { this.isNew[key.scope] = false; // remember that we had previous state for this scope diff --git a/src/vs/workbench/browser/workbench.contribution.ts b/src/vs/workbench/browser/workbench.contribution.ts index a971e7e18c79f..d87011805bb13 100644 --- a/src/vs/workbench/browser/workbench.contribution.ts +++ b/src/vs/workbench/browser/workbench.contribution.ts @@ -568,6 +568,15 @@ const registry = Registry.as(ConfigurationExtensions.Con localize('workbench.secondarySideBar.defaultVisibility.maximized', "The secondary side bar is visible and maximized by default.") ] }, + 'workbench.secondarySideBar.enableDefaultVisibilityInOldWorkspace': { + 'type': 'boolean', + 'default': false, + 'description': localize('enableDefaultVisibilityInOldWorkspace', "Enables the default secondary sidebar visibility in older workspaces before we had default visibility support."), + 'tags': ['advanced'], + 'experiment': { + 'mode': 'auto' + } + }, 'workbench.secondarySideBar.showLabels': { 'type': 'boolean', 'default': true,