Show extension installation progress in the Extensions view - #328563
Draft
cj (erhsh) wants to merge 1 commit into
Draft
Show extension installation progress in the Extensions view#328563cj (erhsh) wants to merge 1 commit into
cj (erhsh) wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree |
Contributor
There was a problem hiding this comment.
🟡 Not ready to approve
Remote/profile progress handling, accessibility, shared-download concurrency, header validation, and test doubles need correction.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Adds staged extension-install progress to the Extensions view, including remote IPC propagation.
Changes:
- Tracks and throttles VSIX download progress.
- Propagates installation stages through extension-management services.
- Displays localized progress labels with targeted action tests.
File summaries
| File | Description |
|---|---|
src/vs/workbench/test/browser/workbenchTestServices.ts |
Adds the progress event to a test service. |
src/vs/workbench/services/extensionManagement/common/extensionManagementService.ts |
Multiplexes server progress events. |
src/vs/workbench/contrib/extensions/test/electron-browser/extensionsActions.test.ts |
Tests staged labels. |
src/vs/workbench/contrib/extensions/common/extensions.ts |
Exposes progress on workbench extensions. |
src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts |
Tracks per-extension progress. |
src/vs/workbench/contrib/extensions/browser/extensionsActions.ts |
Renders localized stage labels. |
src/vs/platform/extensionManagement/node/extensionManagementService.ts |
Reports extraction and installation stages. |
src/vs/platform/extensionManagement/node/extensionDownloader.ts |
Reports download and verification stages. |
src/vs/platform/extensionManagement/common/extensionManagementIpc.ts |
Transports progress over IPC. |
src/vs/platform/extensionManagement/common/extensionManagement.ts |
Defines progress contracts. |
src/vs/platform/extensionManagement/common/extensionGalleryService.ts |
Counts streamed download bytes. |
src/vs/platform/extensionManagement/common/abstractExtensionManagementService.ts |
Emits task progress events. |
Review details
Suppressed comments (1)
src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts:655
- The remote local-download path cannot reach this match. When
remote.downloadExtensionsLocallyis enabled, or remote download falls back locally,NativeRemoteExtensionManagementServicedownloads via the local service and then callssuper.install(location); that emits a URI-sourced install, whichonInstallExtensionat lines 815-823 does not add tothis.installing. Consequently its extraction/install progress is discarded here, while the preceding local download also has no install-progress callback, so the card remains at generic “Installing” for the entire fallback. Associate that gallery install with the tracked extension and forward its local download progress.
private onInstallExtensionProgress(event: InstallExtensionProgressEvent): void {
const extension = this.installing.find(extension => areSameExtensions(extension.identifier, event.identifier));
- Files reviewed: 12/12 changed files
- Comments generated: 5
- Review effort level: Balanced
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
| ) { | ||
| super(); | ||
| this._register(server.extensionManagementService.onInstallExtension(e => this.onInstallExtension(e))); | ||
| this._register(server.extensionManagementService.onInstallExtensionProgress(e => this.onInstallExtensionProgress(e))); |
Comment on lines
+657
to
+658
| extension.installProgress = event; | ||
| this._onChange.fire({ extension }); |
| ) { | ||
| super(productService, allowedExtensionsService); | ||
| this._register(this.channel.listen<InstallExtensionEvent>('onInstallExtension')(e => this.onInstallExtensionEvent({ ...e, source: this.isUriComponents(e.source) ? URI.revive(e.source) : e.source, profileLocation: URI.revive(e.profileLocation) }))); | ||
| this._register(this.channel.listen<InstallExtensionProgressEvent>('onInstallExtensionProgress')(e => this._onInstallExtensionProgress.fire({ ...e, profileLocation: URI.revive(e.profileLocation) }))); |
Comment on lines
289
to
294
| let promise = this.extractingGalleryExtensions.get(extensionKey.toString()); | ||
| if (!promise) { | ||
| this.extractingGalleryExtensions.set(extensionKey.toString(), promise = this.downloadAndExtractGalleryExtension(extensionKey, extension, operation, options, token)); | ||
| this.extractingGalleryExtensions.set(extensionKey.toString(), promise = this.downloadAndExtractGalleryExtension(extensionKey, extension, operation, options, token, progress)); | ||
| promise.finally(() => this.extractingGalleryExtensions.delete(extensionKey.toString())); | ||
| } | ||
| return promise; |
Comment on lines
+1707
to
+1708
| const parsedTotalBytes = Number(context.res.headers['content-length']); | ||
| const totalBytes = Number.isFinite(parsedTotalBytes) && parsedTotalBytes >= 0 ? parsedTotalBytes : undefined; |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Extension installation can appear to be stuck when downloading a large VSIX or when later installation steps take time. This change surfaces internal installation progress in the Extensions view so users can tell what VS Code is doing.
Fixes #328551
The extension card now reports the following stages:
Downloading N%when the Marketplace response provides a valid content lengthDownloadingwhen the total size is unknownVerifyingExtractingInstallingImplementation
User impact
Users get immediate feedback during slow extension installs and can distinguish network download time from signature verification, extraction, and final profile installation.
Verification
npm run typecheck-client -- --pretty falsenpm run gulp compile-clientInstallingLabelActionThe targeted Electron UI test could not be executed in this environment because downloading the Electron test runtime from GitHub timed out. Type checking, linting, and core client compilation completed successfully.
How to test
Content-LengthshowDownloadingwithout a fabricated percentage.