Skip to content

feat(ui): live progress + speed for library/component downloads (0.0.53)#128

Merged
Sunrisepeak merged 1 commit into
mainfrom
feat/library-download-progress
Jun 8, 2026
Merged

feat(ui): live progress + speed for library/component downloads (0.0.53)#128
Sunrisepeak merged 1 commit into
mainfrom
feat/library-download-progress

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Summary

Library / component dependency downloads now show the same live progress bar, byte progress and transfer speed that toolchain downloads already show — closing the gap where Downloading <pkg> printed and then the process appeared to hang with no feedback.

Root cause

Three code paths feed download events; only two were instrumented:

Path Transport Before
Toolchain (toolchain install) NDJSON interface install_packages progress OK
Builtin-index deps same progress OK once bytes flow
Project / custom-index deps direct xlings install (silenced) fully silent

Plus: even on the NDJSON paths, the connect / pre-sizing window emits download_progress with totalBytes == 0, and the bar only rendered once total > 0 — so the line froze during the (sometimes long) connection phase.

Changes

  • Custom/project-index installs use the NDJSON interface install_packages capability. Verified against xlings source: the capability and the install CLI share cmd_install, and the install destination is chosen by package scope (project vs global), not by transport — so packages still install into the project-local data root and install-hook ordering is preserved. This restores the live Downloading … [bar] X / Y Z/s UI on that path.
  • Indeterminate render for the totalBytes == 0 window: shows connecting… + elapsed (and a running byte count for length-less streams), so the line stays alive until the size is known.
  • Centralized the download-progress state machine + render policy in mcpp.ui (DownloadProgress); the three install paths now share one UI.
  • Pin bundled xlings to 0.4.51.
  • Bumps version to 0.0.53.

Testing

  • mcpp test — 18/18 unit tests pass.
  • e2e 52 / 58 / 60 updated to assert the interface transport while keeping their project-local-install and mcpp.deps-before-hook ordering invariants — all pass.
  • Real integration check (project-local custom index + a real package): the dependency installs into the project-local data root and renders the live progress bar (including the new connecting… animation).

Design doc: .agents/docs/2026-06-09-library-download-progress-design.md

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
@Sunrisepeak Sunrisepeak merged commit 84dd1b5 into main Jun 8, 2026
3 checks passed
@Sunrisepeak Sunrisepeak deleted the feat/library-download-progress branch June 8, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant