Repository navigation
extensions: add delayed auto-update mode to extensions.autoUpdate - #318974
Merged
Sandeep Somavarapu (sandy081) merged 4 commits intoMay 29, 2026
Merged
Conversation
Folds a 6-hour delayed auto-update mode into the existing
`extensions.autoUpdate` setting, which is now a string enum
('on' | 'delayed' | 'off') and policy-controllable via the
ExtensionsAutoUpdate policy.
When set to 'delayed', an extension whose newer version was published
less than 6 hours ago is treated as outdated-but-delayed: it is excluded
from auto-update and the activity badge, and surfaces an info status
explaining when it will be auto updated. Manual updates still work.
Includes startup migration from legacy values (true/'all'/
'onlyEnabledExtensions' -> 'on'; false/'none'/'onlySelectedExtensions'
-> 'off') plus defensive read-time normalization, and unit tests for the
new logic.
Co-authored-by: Copilot <[email protected]>
Ladislau Szomoru (lszomoru)
previously approved these changes
May 29, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands extensions.autoUpdate into a policy-controllable string enum to support a new 6-hour delayed auto-update mode, and wires that behavior through the extensions UI and related plugin auto-update logic.
Changes:
- Replaces
extensions.autoUpdatelegacy boolean/enum values with'on' | 'delayed' | 'off', including migration + read-time normalization. - Implements delayed auto-update behavior (delay window computation, re-check scheduling, UI badge/status behavior).
- Updates plugin auto-update/marketplace code and tests to use the new normalized auto-update value.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/extensions/test/electron-browser/extensionsWorkbenchService.test.ts | Adds unit tests for auto-update normalization and delayed-mode boundary behavior. |
| src/vs/workbench/contrib/extensions/common/extensions.ts | Updates the auto-update type and extends the workbench service API to expose delayed-mode helpers. |
| src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts | Implements normalization, delayed window calculation, and delayed re-check scheduling during auto-update. |
| src/vs/workbench/contrib/extensions/browser/extensionsWidgets.ts | Recomputes extension status on hover to keep time-relative delayed messaging current. |
| src/vs/workbench/contrib/extensions/browser/extensionsViewlet.ts | Excludes delayed-outdated extensions from contributing to the activity badge count. |
| src/vs/workbench/contrib/extensions/browser/extensionsActions.ts | Adapts actions/status computation to new auto-update values and adds delayed status messaging. |
| src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts | Updates configuration schema, adds policy wiring, updates menu visibility conditions, and adds migration. |
| src/vs/workbench/contrib/chat/test/common/plugins/pluginMarketplaceService.test.ts | Stubs IExtensionsWorkbenchService in tests due to new dependency usage. |
| src/vs/workbench/contrib/chat/test/browser/plugins/pluginAutoUpdate.test.ts | Updates plugin auto-update tests for new 'on'/'off'/'delayed' values. |
| src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.ts | Switches auto-update enablement checks to rely on normalized value via IExtensionsWorkbenchService. |
| src/vs/workbench/contrib/chat/browser/pluginAutoUpdate.ts | Uses normalized auto-update value via IExtensionsWorkbenchService instead of direct config reads. |
Copilot's findings
Comments suppressed due to low confidence (1)
src/vs/workbench/contrib/extensions/common/extensions.ts:201
IExtensionsConfiguration.autoUpdateis still typed asboolean, butextensions.autoUpdateis now a string enum ('on' | 'delayed' | 'off'). Keeping this asbooleanmakes the exported configuration shape incorrect and can lead to wrong typings where this interface is used.
export interface IExtensionsConfiguration {
autoUpdate: boolean;
autoCheckUpdates: boolean;
ignoreRecommendations: boolean;
closeExtensionDetailsOnViewChange: boolean;
}
- Files reviewed: 11/11 changed files
- Comments generated: 4
Sandeep Somavarapu (sandy081)
requested review from
Alexandru Dima (alexdima),
João Moreno (joaomoreno),
joshspicer,
Paul (pwang347) and
Peng Lyu (rebornix)
as code owners
May 29, 2026 14:18
- Type IExtensionsConfiguration.autoUpdate as AutoUpdateConfigurationValue - Keep ExtensionStatusAction.update() returning void; add recomputeStatus() for callers that need to await the computed status - Preserve the higher-priority warning CSS class when the delayed info status is also applied to an outdated extension - Hover awaits recomputeStatus() instead of update() - Update pluginAutoUpdate doc comment to the on/delayed/off enum values Co-authored-by: Copilot <[email protected]>
Benjamin Christopher Simmonds (benibenj)
approved these changes
May 29, 2026
joshspicer
approved these changes
May 29, 2026
Sandeep Somavarapu (sandy081)
deleted the
sandy081/extensions-delayed-auto-update
branch
May 29, 2026 16:37
2 tasks
This was referenced Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Folds a 6-hour delayed auto-update mode into the existing
extensions.autoUpdatesetting. The setting is now a string enum and is policy-controllable.extensions.autoUpdate:'on' | 'delayed' | 'off'(was a boolean /onlyEnabledExtensionsenum)ExtensionsAutoUpdatepolicy.Behavior in
delayedmodeMigration
Startup migration of legacy values plus defensive read-time normalization in
getAutoUpdateValue():true/'all'/'onlyEnabledExtensions'->'on'false/'none'/'onlySelectedExtensions'->'off''delayed'->'delayed'Tests
Added unit tests in
extensionsWorkbenchService.test.tscoveringgetAutoUpdateValue()normalization,isAutoUpdateDelayed()boundaries, andgetAutoUpdateDelayRemaining(); updated plugin auto-update/marketplace tests for the new enum values.Notes for reviewers
build/lib/policies/policyData.jsoncstill needs to be regenerated vianpm run export-policy-data(theExtensionsAutoUpdatepolicy enum/enumDescriptions changed) — blocked locally by a corrupted Electron install, so it needs a regen by a codeowner/CI.compile-check-ts-native,valid-layers-check, and hygiene. Unit tests could not be executed locally (corrupted Electron) but compile clean.Fixes - https://github.com/microsoft/vscode-internalbacklog/issues/7834, https://github.com/microsoft/vscode-internalbacklog/issues/7769