Restore download statistics and completion listener notifications - #537
Conversation
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
A critical compatibility issue causes the statistics version information to be lost.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Restores download progress, statistics, and completion notifications across client and OSS strategies.
Changes:
- Wires progress bridges into download orchestrators.
- Dispatches legacy statistics events.
- Adds regression coverage for notification behavior and download sizes.
| File | Summary |
|---|---|
tests/CoreTest/Strategy/DownloadEventTests.cs |
Tests strategy notification wiring. |
tests/CoreTest/Download/DownloadProgressReporterTests.cs |
Tests statistics and completion behavior. |
src/GeneralUpdate.Core/Strategy/OssStrategy.cs |
Wires OSS download progress events. |
src/GeneralUpdate.Core/Strategy/ClientStrategy.cs |
Wires client download progress events. |
src/GeneralUpdate.Core/Download/Progress/DownloadProgressReporter.cs |
Dispatches legacy statistics notifications. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| new MultiDownloadStatisticsEventArgs(value.AssetName ?? "unknown", | ||
| TimeSpan.Zero, string.Empty, value.TotalBytes ?? 0, | ||
| value.BytesDownloaded, value.Percentage)); |
There was a problem hiding this comment.
Fixed in 6eb5c48. The download progress pipeline now preserves and forwards the original version object via VersionContext, and MultiDownloadStatisticsEventArgs.Version uses that object when available instead of the asset filename.
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
|
@copilot 事件不触发的问题都解决了吗 |
是的,这次“事件不触发”的主链路已经修复:Client/Oss 两个策略都已接入 |

Automatic updates could succeed without invoking
AddListenerMultiDownloadStatisticsorAddListenerMultiDownloadCompleted. Client and OSS strategies omitted the progress bridge, which also lacked statistics event dispatch.