Show determinate download progress without changing WinGet execution - #5402
Merged
Gabriel Dufresne (GabrielDuf) merged 6 commits intoSep 21, 2026
Merged
Gabriel Dufresne (GabrielDuf) merged 6 commits into
Gabriel Dufresne (GabrielDuf) merged 6 commits into
Conversation
Introduce OperationProgress (stage, nullable percentage, byte counters, measured throughput) and side-car ReportProgress/ResetProgress plumbing on AbstractOperation with a single injected clock. Reporting never logs and never touches execution, retries, or history.
Surface real byte counters from the existing HTTP download path as determinate card progress (percent, downloaded/total, measured MB/s) and report role stage markers otherwise. WinGet CLI execution, retries, elevation, proxy, return codes, and history behavior are unchanged; piped winget.exe emits no progress frames, so those cards stay indeterminate.
…egression Model and single-clock throughput rules, card mapping, loopback-server measured-speed test, and real captured winget download output proving history preservation with no invented progress.
… card The ProgressIndicator gate used card indeterminacy, which is also false while queued or before any report arrives. That hid status/queue lines and left verbose OperationInformation text stuck on the card. Gate only while a determinate report is active; clear ownership when leaving Running.
Gabriel Dufresne (GabrielDuf)
requested changes
Sep 18, 2026
Gabriel Dufresne (GabrielDuf)
left a comment
Contributor
There was a problem hiding this comment.
Hi, I left nine comments on the pr. if you could take a look at them, it would be appreciated.
- Throttle DownloadOperation progress to integer-percent gate (bounded UI events, 0/100 preserved) - Remove dead FromInstall/FromUpdate/FromUninstall/FromStagePercent and ResetProgress - Delete WingetCliOutputProgressRegressionTests (fixture-only) - Fix OperationViewModel constructor determinate init via OperationCardController - Add direct controller state-machine tests (construct, failure order, retry, stage) - Switch throughput to monotonic Stopwatch timestamps (injectable) - Add stale-speed expiry (2s, timer only while fresh, disposed cleanly) - Isolate ProgressChanged subscribers (observational, per-subscriber try/catch) - Localize full progress templates, drop duplicate ellipsis keys and TB branch - Shrink suite to focused coverage (37 tests, both TFMs)
Contributor
Author
|
Hi Gabriel Dufresne (@GabrielDuf), I’ve addressed all nine review comments in ac9284f. I also replied to each thread with the corresponding change and verification. The PR is ready for another review when you have time. Thanks for the detailed feedback. |
Gabriel Dufresne (GabrielDuf)
previously approved these changes
Sep 21, 2026
Contributor
Author
|
Updated the branch to the latest \main\ (\1f832f05) and resolved the translation conflict while preserving the reviewed progress changes. I reran the focused progress tests, build, formatting, and translation validation on the merged tree.
|
Gabriel Dufresne (GabrielDuf)
approved these changes
Sep 21, 2026
Gabriel Dufresne (GabrielDuf)
left a comment
Contributor
There was a problem hiding this comment.
lgtm
Gabriel Dufresne (GabrielDuf)
merged commit Sep 21, 2026
8220a4b
into
Devolutions:main
6 checks passed
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.
This is a clean reimplementation following the feedback on #5390. It keeps the existing WinGet CLI execution path intact and limits the change to observational progress reporting.
winget.exeremains the execution path; no WinGet COM install/update/uninstall execution was added.What it does
Operations with real byte counters (the existing HTTP installer-download path, which already reads
Content-Lengthand cumulative bytes) now surface determinate cards, e.g.Downloading · 21% · 10.0 MB / 46.7 MB · 1.2 MB/s, with speed measured generically as Δbytes/Δtime on one injectable monotonic clock (Stopwatch.GetTimestamp/GetElapsedTime). Reports are gated by the existing integer-percent change (max ~101 determinate reports per download, 0→100 preserved), so UI events no longer track socket reads 1:1. Role stages (Installing,Updating,Uninstallingvia translatable{0}...template) render indeterminate while running.Raw capture (winget v1.29.290,
winget downloadwith stdout redirected) showed zero progress frames: six plain CR LF lines over an ~8.5 s download, empty stderr, no ANSI, no counters. Pipedwinget.exetherefore stays indeterminate by design — there is nothing reliable to parse, and no parser was added.Regression evidence
All rows: existing path structurally unchanged (
git difftouches none of these files)._runOperationloop unchangedPrepareProcessStartInfo,ApplyElevationRequirementsunchangedWinGetPkgOperationHelper._getOperationResultunchanged--versionconstruction unchangedWinGet_DropArchAndScopepath unchangedWinGet.GetProxyArgumentunchanged0x8A150109branch unchanged0x8A150011branch unchangedLastReturnCodepath unchangedLine/GetOutput/history store unchanged (no invented progress; piped-WinGet observation kept as prose only)Checks
dotnet build src/UniGetUI.Windows.slnx /p:Platform=x64: 0 errorsnet10.0andnet10.0-windows10.0.26100.0)PackageEngine.Tests: only pre-existing environment failures, each reproduced on cleanorigin/main(OperationHistory tail-marker, WinGet explainers, PowerShell launcher, Scoop/PS call-args wiring)dotnet format whitespace/style --verify-no-changes: cleanVerify-Translations.ps1: clean (no placeholder issues); English sources use positional templates ({0} · {1}% · {2} / {3}[ · {4}],{0}...) so translators control ordering/separators; stage keys reduced toDownloading/Installing/Updating/Uninstalling(no punctuation-duplicate...keys)DownloadOperationcoverage plus real-clock manual verification of 0→100 determinate flow; history record intact