You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 84dd1b5
Browse filesBrowse the repository at this point in the historyBrowse files
feat(ui): live progress + speed for library/component downloads (#128)
Library / component dependency downloads now show the same live progress
bar, byte counts and transfer speed that toolchain downloads already show.
Three paths fed download events; only toolchain and builtin-index installs
rendered progress. Project / custom-index dependency installs went through
the silenced direct xlings CLI and ran dark — "Downloading <pkg>" then a
long, feedback-free hang.
- Route project/custom-index installs through the xlings NDJSON
`interface install_packages` capability (the capability and the `install`
CLI share `cmd_install`; install destination is chosen by package scope,
so packages still land in the project-local data root). This restores the
live bar on that path.
- Add an indeterminate ("connecting…") render for the pre-sizing window
where the downloader reports totalBytes==0 (DNS/TLS/redirect, or a body
streamed with no Content-Length), so the line never freezes.
- Centralize the download-progress state machine + render policy in
`mcpp.ui` (DownloadProgress); toolchain, builtin-index and custom-index
installs now share one UI.
- Pin bundled xlings to 0.4.51.
Bumps version to 0.0.53. Updates e2e 52/58/60 to expect the interface
transport while keeping their project-local-install and hook-ordering
invariants. Design: .agents/docs/2026-06-09-library-download-progress-design.md
> Scope: make library / component downloads show the same live progress + speed
6
+
> that toolchain downloads already show, across Linux / macOS / Windows.
7
+
8
+
## 1. Problem
9
+
10
+
`mcpp toolchain install` shows a live progress bar with percent, bytes and
11
+
transfer speed. Installing **library / component dependencies** (during
12
+
`mcpp build`, dependency resolution, or `mcpp new --template`) prints a single
13
+
`Downloading <pkg> v<ver>` line and then **appears to hang** for a long time with
14
+
no percent, no speed and no sign of life — especially for large packages on slow
15
+
mirrors.
16
+
17
+
## 2. Root cause (evidence-based)
18
+
19
+
There are **three** download code paths. They were not equally instrumented.
20
+
21
+
| Path | Trigger | Transport | Symptom |
22
+
|------|---------|-----------|---------|
23
+
| ① Toolchain |`mcpp toolchain install`| NDJSON `interface install_packages` + `CliInstallProgress`| progress OK |
24
+
| ② Builtin-index deps | dep resolves via builtin index (`useProjectEnv = false`) | same as ① | progress OK *once bytes flow*|
25
+
| ③ Custom/project-index deps | dep resolves via a project-added index (`useProjectEnv = true`) |**`install_direct(projEnv, target, quiet=true)`**|**fully silent**|
26
+
27
+
Two independent defects fall out of this:
28
+
29
+
### Defect A — path ③ is silenced
30
+
31
+
`src/cli.cppm` routes project/custom-index dependency installs through
0 commit comments