Repository navigation
Description
What Anders saw (2.0.1, 12 Nov)
- The System update download has no progress bar or percentage.
- Its size jumps between KB and MB.
Anders: "would be good to have these downloads UI/UX standardized."
Facts (source at develop 3ad5f71)
-
The size is per file, not progress. System shows one line of text,
controller.message(capsules/system/browser/system.js:3881-3889), refreshed every 5 s.update::download_message(size)(elastos-server/src/update.rs:843-848) writes "Downloading the update (N)" once for each file fetched:- the binary (
update.rs:1391); components.json(:1434);- each support asset or app (
setup.rs:4175).
N is that file's signed size, so each refresh shows tens of MB for the binary, then KB for small files.
- the binary (
-
No progress exists to show.
UpdateStatus(update_controller.rs:355-365,deny_unknown_fields) and the API (api/gateway_home_update.rs:384-390) carry no byte counts. The fetch returns whole files. -
A progress hook exists but is unused here.
carrier::with_reply_progress(carrier.rs:8832) is used byelastos setup's bar (setup/progress.rs), not by the update controller. -
Seven different byte formatters in capsules (1000- vs 1024-based, different decimals and units), plus
update::format_bytes(1024). In one app (System), models print 1000-based and the update prints 1024-based. -
Other progress displays all differ:
- models: a bar plus "X of Y", no %;
- the Assistant model: "(N%)", no bar;
- Library upload: a bar, no numbers;
- Browser Engine: only seconds elapsed.
Rule
- One way to write sizes, 1000-based like macOS Finder, in
capsules/_shared/(vendored, with the drift check) and matched in Rust. "X of Y" uses the unit of Y, so the unit never changes while it counts. - One progress pattern: a bar, "X of Y", and a percentage. When the total is unknown, an indeterminate bar with no fake percentage.
- The System update reports bytes received against one total for the whole update (the sum of the signed sizes of every file it will fetch), through
with_reply_progress. The update survives the restart across old and new Home versions (deny_unknown_fields).
Done means
- System update shows a bar, "X of Y" and a %, rising steadily with one unit, on a real update (the update-hop journey) and in a screenshot of the real capsule.
- Models, the Assistant model and Library upload use the same pattern; every capsule uses the one formatter; the old copies are deleted.
- An update from the previous release to this one still works (CI update hop).
Acceptance record (phase 1, #595, merged 14 Nov; checked 15 Nov)
- First box, half proven. The real System capsule shows the bar, "X of Y" and the percentage in a Chromium test of the real capsules (
scripts/download-progress-browser.test.mjs, light and dark). That test is part of the behaviour suite (scripts/test-behaviour.shrunsscripts/*.test.mjs), which CI and the local pre-push gate run; it passed in the develop run of 15 Nov. Not proven: a real update. The update from 2.0.1 runs on 2.0.1's controller and shows no bar, so the first update that can show it is one between two builds that both contain System update shows download progress and release notes; one size formatter (#577) #595. Open: run that update on an installed Home and record the rising counts. - Second box. On develop the size units exist only in
capsules/_shared/byte-format.jsand its seven vendored copies, kept identical byscripts/vendor-ui-tokens.sh --checkinjust verify. System and Marketplace model downloads, the Assistant model and Library upload import the sharedtransfer-progress.js; the Chromium test above covers the System, model, Assistant and Library states. - Third box. Develop run on the merge commit:
update-hop-linuxandsource-home-macospassed, including "require the update from the published release, no new provider warnings and Undo".
Phase 2: the same bar for every remaining download (Anders, 12 Nov: "the same downloader progress bar across the board")
Phase 1 covers System update, model downloads (System and Marketplace), the Assistant model and Library upload, all through the shared capsules/_shared/transfer-progress.js. Phase 2 (its own PR) moves these to it, each with Runtime byte counts through carrier::with_reply_progress:
- Browser Engine first preparation: today "Starting Browser… Ns" (
capsules/browser/browser/browser.js:2409); image fetch atsetup.rs:1303. - An app's first open, which downloads it (
setup.rs:4093): today no visible progress. - Opening a shared file from another Home: today "Getting…" (
capsules/home/browser/home-external-link.js:274). - Library's download of a shared file: today text only.
- Each shows the bar, "X of Y" and a percentage (or an honest indeterminate bar when the size is unknown), checked in real-capsule screenshots.
- A source-gate guard fails when any capsule brings its own byte formatter or
<progress>outside the shared modules (allowlist plus a planted-failure test), so the standard holds without anyone having to remember it. - One installed update between two builds that both contain System update shows download progress and release notes; one size formatter (#577) #595 shows the bar rising.
- The Browser Engine screen change lands after Browser internet permission: five robustness gaps shipped in 2.0.1 (fix in 2.0.2) #566 (both touch
browser.js); its Runtime byte counts come first.
Activity
fix(models): keep the download announcement in the Marketplace dialog (…
test(marketplace): check the model download announcement and its host (…
fix(models): open the download live region before its first text (#577)
test(marketplace): open the model detail live region empty before its…
fix(chat): ask to post in Community with one line (#577)
build(chat): rebuild the post panel assets from their source (#577)
Merge pull request #595 from elastos/feat/577-download-progress
andersalm commentedon Nov 15, 2026
Correction: Root’s literal-name search missed
scripts/*.test.mjsin the existing behaviour suite. The progress UI test already has CI and local pre-push callers; the proposed extraproduct-ui-browserinvocation is withdrawn.Root read the completed behaviour job: the named light/dark transfer-state test passed, with 2,306 tests passed and zero failures or skips on
adb92d55f.Main’s remaining installed proof is rising counts during an update between two builds containing #595, with candidate/artifact identity and real-capsule evidence. Phase 2 and Browser screen ordering after #566 remain as accepted.