Repository navigation
fix: render download progress during min add - #1213
Conversation
min never created an ot operation tracker or started its stderr renderer, so the FetchPkg/ExtractPkg operations that rcache already reports while download_if_available fetches and extracts cached packages had nowhere to draw — min add appeared to hang on a static line. mip wires this in run_cli; min's build_config did not. Attach a process-global OpTracker to every Config the package commands build and spawn its renderer once per process, matching mip. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Included review availability: 4 reviews are currently available. Based on recent review activity, included reviews refill at 5 per hour. 📝 WalkthroughWalkthroughThe minimal crate now initializes one process-global operation tracker with stderr rendering. ChangesBuild progress reporting
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change enables download progress rendering for Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
This wires the ot to min add outside the session, which I dont think actually downloads or sets up the packages. You actually want to wire up progress output here:
minimal/crates/minimald/src/env.rs
Line 690 in c1e4607
`min add` inside a session builds and fetches its packages through `SessionChannel::install`, which drew nothing while packages downloaded and extracted. Attach a log sink to the install's `build_graph` and render its events over the command channel as `msg:` lines, through the same `BuildRenderer` that `min build` uses, so both read identically. A fully-cached add emits no events and stays quiet, matching today's behavior. Refs: #1213 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Wired the in-session path in e49054c: On the outside-the-session half: host-side |
Review feedback on #1213: the package work a session cares about happens daemon-side, where SessionChannel::install already streams progress (e49054c). The host CLI needs no process-global tracker; host-side trailing downloads stay quiet as before. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABLow0qA
min adddownloaded packages with no visible progress — the first-time fetch of a package showed only a static line while bytes downloaded and the archive extracted. The instrumentation already existed:rcache::materializereportsFetchPkg/ExtractPkgoperations through anot::OpTracker, andmiprenders that tree to stderr fromrun_cli.minnever created a tracker or started a renderer, soconfig.otwasNoneand those operations drew nowhere. This attaches the same process-global trackermipuses to the sharedbuild_config, spawning the stderr renderer once per process, somin addshows a live progress tree while packages download and materialize. The renderer stays hidden on non-TTY output. (informed by #591)Verification
cargo fmt --all --check — passed
cargo clippy --workspace --locked -- -D warnings — passed, 0 warnings
cargo build --workspace --locked — passed
cargo test --workspace --locked — passed, 84 suites ok, 0 failed
Note
Render download progress to stderr during
min addAttaches an
ot::OpTrackerto the config inbuild_configby callingwith_operation_tracker(operation_tracker()), whereoperation_tracker()lazily initializes a process-global tracker viaOnceLockand startsot::render_to_stderron first use. This causes progress output to appear in stderr when runningmin add.Macroscope summarized 40cbca9.
Summary by CodeRabbit