Skip to content

Revert "Add APPLICATION_SHARED storage scope for cross-app state sharing (#311317)"#314034

Open
doraeric wants to merge 1 commit intomicrosoft:mainfrom
doraeric:revert-pr-311317
Open

Revert "Add APPLICATION_SHARED storage scope for cross-app state sharing (#311317)"#314034
doraeric wants to merge 1 commit intomicrosoft:mainfrom
doraeric:revert-pr-311317

Conversation

@doraeric
Copy link
Copy Markdown

@doraeric doraeric commented May 4, 2026

Revert "Add APPLICATION_SHARED storage scope for cross-app state sharing (#311317)"

This reverts commit 717e853.

Since the issues caused by the original PR remain unresolved and there has been no response to community feedback from @sandy081, I am opening this PR to revert the commit.

If Microsoft is willing to look into this issue, address the community's concerns, or provide a fix for the current problems, please feel free to do so and close this PR.

Copilot AI review requested due to automatic review settings May 4, 2026 05:43
@vs-code-engineering
Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@deepak1556

Matched files:

  • src/vs/code/node/cli.ts

@doraeric
Copy link
Copy Markdown
Author

doraeric commented May 4, 2026

@microsoft-github-policy-service agree

Copy link
Copy Markdown
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 reverts the previously introduced cross-application storage scope (StorageScope.APPLICATION_SHARED) and its supporting plumbing (shared SQLite DB, IPC change notifications, CLI/config surfaces, and sync wire-format adjustments), restoring the prior single-app storage behavior across workbench, storage, environment, and sync layers.

Changes:

  • Removes StorageScope.APPLICATION_SHARED from the storage service API and implementation layers (browser/electron, main/renderer IPC, and logging/flush paths).
  • Reverts user data sync and profile storage handling that previously round-tripped a scope field for shared storage keys.
  • Reverts workspace trust and other consumers back to StorageScope.APPLICATION, and removes --shared-data-dir and related product/environment properties.

Reviewed changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/vs/workbench/test/browser/componentFixtures/fixtureUtils.ts Removes APPLICATION_SHARED storage event typing from test fixture storage service.
src/vs/workbench/services/workspaces/test/common/workspaceTrust.test.ts Reverts test storage writes from APPLICATION_SHARED back to APPLICATION.
src/vs/workbench/services/workspaces/common/workspaceTrust.ts Reverts workspace trust persistence/listeners from APPLICATION_SHARED to APPLICATION.
src/vs/workbench/services/storage/electron-browser/storageService.ts Removes application-shared storage creation/migration logic from native workbench storage service.
src/vs/workbench/services/storage/browser/storageService.ts Removes IndexedDB “global-shared” storage and related wiring.
src/vs/workbench/services/environment/browser/environmentService.ts Removes browser appSharedDataHome property.
src/vs/workbench/contrib/notebook/test/browser/notebookKernelHistory.test.ts Removes APPLICATION_SHARED event typing from notebook kernel history tests.
src/vs/workbench/common/memento.ts Removes application-shared memento cache and related save/reload/clear paths.
src/vs/workbench/browser/layout.ts Removes layout “isNew” tracking for application-shared storage.
src/vs/platform/userDataSync/test/common/globalStateSync.test.ts Updates test expectations to remove persisted scope field in sync payload.
src/vs/platform/userDataSync/common/userDataSync.ts Removes scope?: StorageScope from sync storage value type.
src/vs/platform/userDataSync/common/globalStateSync.ts Reverts global state sync read/write paths to no longer route by storage scope.
src/vs/platform/userDataProfile/test/common/userDataProfileStorageService.test.ts Updates profile storage test expectations to remove scope in returned values.
src/vs/platform/userDataProfile/common/userDataProfileStorageService.ts Reverts profile storage read/write APIs to no longer support APPLICATION_SHARED scope.
src/vs/platform/storage/test/electron-main/storageMainService.test.ts Removes application-shared storage main-process tests and IPC test scaffolding.
src/vs/platform/storage/electron-main/storageMainService.ts Removes application-shared storage main-process service lifecycle and routing.
src/vs/platform/storage/electron-main/storageMain.ts Removes application-shared storage main implementation, host fallback storage, and cross-app IPC wrapper DB.
src/vs/platform/storage/electron-main/storageIpc.ts Removes IPC routing/events for application-shared storage.
src/vs/platform/storage/common/storageService.ts Removes renderer-side application-shared storage client and lifecycle hooks.
src/vs/platform/storage/common/storageIpc.ts Removes IPC request flag and clients for application-shared and fallback application storage items.
src/vs/platform/storage/common/storage.ts Removes StorageScope.APPLICATION_SHARED and associated API surface and log/flush integration.
src/vs/platform/environment/node/argv.ts Removes --shared-data-dir from supported CLI option descriptions.
src/vs/platform/environment/common/environmentService.ts Removes native environment appSharedDataHome resolution logic.
src/vs/platform/environment/common/environment.ts Removes appSharedDataHome from IEnvironmentService.
src/vs/platform/environment/common/argv.ts Removes 'shared-data-dir' from NativeParsedArgs typing.
src/vs/editor/standalone/browser/standaloneServices.ts Removes standalone environment appSharedDataHome property.
src/vs/code/node/cli.ts Removes transient --shared-data-dir generation and relaunch message content.
src/vs/base/parts/storage/node/storage.ts Removes SQLite WAL/busy-timeout options and related PRAGMA configuration.
src/vs/base/parts/storage/common/storage.ts Removes MigratingStorage implementation and related helpers.
src/vs/base/common/product.ts Removes sharedDataFolderName from product configuration interface.
product.json Removes sharedDataFolderName product setting.

Comment on lines 347 to 351
) {
super();

this.whenReady = Promise.all([
this.storageMainService.applicationStorage.whenInit,
this.storageMainService.applicationSharedStorage.whenInit
]).then(() => undefined);
this.whenReady = this.storageMainService.applicationStorage.whenInit;
}
Comment on lines +120 to 121
const testStorageService = disposables.add(new TestStorageMainService(new NullLogService(), environmentService, disposables.add(new UserDataProfilesMainService(disposables.add(new StateService(SaveStrategy.DELAYED, environmentService, new NullLogService(), fileService)), disposables.add(uriIdentityService), environmentService, fileService, new NullLogService())), lifecycleMainService, fileService, uriIdentityService));

Comment on lines 119 to 123
'extensions-dir': { type: 'string', deprecates: ['extensionHomePath'], cat: 'e', args: 'dir', description: localize('extensionHomePath', "Set the root path for extensions.") },
'extensions-download-dir': { type: 'string' },
'builtin-extensions-dir': { type: 'string' },
'shared-data-dir': { type: 'string' },
'list-extensions': { type: 'boolean', cat: 'e', description: localize('listExtensions', "List the installed extensions.") },
'agent-plugins-dir': { type: 'string' },
Comment on lines 223 to 227
export const enum StorageScope {

/**
* The stored data will be scoped to all workspaces across all profiles
* and shared across VS Code and Sessions app.
*/
APPLICATION_SHARED = -2,

/**
* The stored data will be scoped to all workspaces across all profiles.
*/
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.

3 participants