Repository navigation
feat(cli): show bundle counts, resumed bytes and unreadable records on the dashboard - #2752
Merged
Merged
Conversation
…n the dashboard A `decdn get` record keeps the bytes its run resumed from an earlier `.partial` (`resumed_bytes`): a blob run's lowest reported position, so a stream to stdout (which reports 0 first) and a refetch from 0 resume nothing; a bundle run's tally with its counts. A bundle record's counts gain `reused`, and a run with nothing to fetch records its excluded entries instead of ending with no counts. The finished-pulls table shows the bytes downloaded apart from those resumed or reused, and a bundle run's non-zero counts under its row, failed and not-run in the critical tone. `/_status` names each record file that does not parse, with why, and the page lists them. Closes #2638 Closes #2639 Closes #2666 Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Dashboard byte totals misreport interrupted transfers and entry-to-file reuse, omitting retained downloaded and resumed bytes or counting locally reused data as network downloads.
2 open issues
What changed in this PR
This PR improves the local dashboard’s pull history with bundle counts, separate byte totals, and actionable unreadable-record details, addressing #2638, #2639, and #2666.
Changes:
- Show finished bundle counts, including reused and excluded entries, with failed and not-run counts highlighted.
- Record resumed bytes and distinguish downloaded, resumed, and reused bytes in the dashboard.
- Carry unreadable record paths and errors through
/_status, displaying the first five.
| File | Description |
|---|---|
crates/e2e/tests/cli_fetch_two_data_dirs.rs |
Assert fresh fetches record zero resumed bytes. |
crates/cli/src/commands/fetch/tests.rs |
Check initial and final streaming progress. |
crates/cli/src/commands/fetch.rs |
Report zero before streaming begins. |
crates/cli/src/commands/dashboard/status/tests.rs |
Extend status fixtures with counts, resumes, and read errors. |
crates/cli/src/commands/dashboard/status.rs |
Include unreadable paths and errors in status. |
crates/cli/src/commands/dashboard/sources/tests.rs |
Verify unreadable details reach dashboard status. |
crates/cli/src/commands/bundle_pull/tests.rs |
Cover empty selections and recorded bundle totals. |
crates/cli/src/commands/bundle_pull.rs |
Centralize empty-run reporting and pass resumed totals. |
crates/cli/src/commands/activity/tests.rs |
Test resume tracking and unreadable-record reporting. |
crates/cli/src/commands/activity.rs |
Persist resumed bytes, reuse counts, and read diagnostics. |
crates/cli/dashboard/src/view.ts |
Derive byte splits, count labels, and unreadable summaries. |
crates/cli/dashboard/src/view.test.ts |
Test the new dashboard view calculations. |
crates/cli/dashboard/src/fixtures/dashboard-full.json |
Add representative counts, resumes, and unreadable details. |
crates/cli/dashboard/src/fixtures/dashboard-failing.json |
Update unreadable records to an array. |
crates/cli/dashboard/src/fixtures/dashboard-alone.json |
Update resume and unreadable fields. |
crates/cli/dashboard/src/contract.test.ts |
Check revised status fields and derived views. |
crates/cli/dashboard/src/components/UnreadableRecords.tsx |
Display unreadable paths, errors, and overflow count. |
crates/cli/dashboard/src/components/UnreadableRecords.test.ts |
Test diagnostics rendering and list truncation. |
crates/cli/dashboard/src/components/RecentPulls.tsx |
Render byte splits and bundle counts. |
crates/cli/dashboard/src/components/RecentPulls.test.ts |
Test counts, byte labels, and failure styling. |
crates/cli/dashboard/src/components/LivePulls.tsx |
Display resumed bytes on live pulls. |
crates/cli/dashboard/src/App.tsx |
Integrate the unreadable-record component. |
crates/cli/dashboard/src/api.ts |
Align dashboard types with revised records. |
CHANGELOG.md |
Describe the dashboard reporting additions. |
adr/appendix-binaries.md |
Document recorded totals and unreadable-file display. |
Review effort: Balanced
Code coverage overviewLanguages: Rust Rust / code-coverage/cargo-llvm-cov
View coverage of the 5 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
A bundle run's report tallies only the blobs that landed, so a record that took its downloaded and resumed bytes from it showed 0 B for an interrupted fresh bundle, and an entry written to a file, which keeps no counts, showed its spliced bytes as downloaded. The record now keeps `downloaded_bytes`, `resumed_bytes` and `reused_bytes` for every kind, from each blob's bytes: a landed blob counts what its pull says it fetched, spliced and resumed; a blob that did not land counts its lowest position as resumed and the rest as downloaded. Whole-file reuse comes from the run's report. A blob run is one such blob. `BundleCounts` keeps the entry counts only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Three
decdn dashboardfollow-ups to #2637/#2651, which share the pull record,/_statusand the page:dashboard: show a bundle run's skipped, excluded and failed counts in the finished-pulls table #2638: a finished bundle run shows its non-zero entry counts under its row (
11 skipped, 9 excluded). Failed and not-run counts show in the critical tone.BundleCountsgainsreused, so a run whose every file was reused from disk does not read "nothing to fetch". A run that ends with nothing to fetch (the filter keeps nothing, or--selectdeselects all) records its excluded entries instead of endingdonewithcounts: null.Planned::Nothing { reason, excluded }andPullObserver::nothing_to_fetchend that run in one place.dashboard: show downloaded and resumed bytes apart, and record a blob run's resume base #2639: the record keeps
downloaded_bytes,resumed_bytesandreused_bytesfor every kind.ActivityRecordercounts them per blob, keyed by hash; a bundle run plans path → hash from its manifest.EntryLandedsays it paid for, resumed and spliced..partialbase first.copy_verifiedreports0before its first read, so a stream to stdout resumes nothing. A refetch from0after a hash mismatch clears the base.BundleCountskeeps the entry counts only.So an interrupted bundle counts its unfinished blobs, and an entry written to a file counts its splice as reused (both from the Copilot review). The ended-pulls column is "Downloaded", with
+ X resumed · Y reusedunder it. A live row names its resumed bytes, and its progress bar stays on the whole position.dashboard: name the files that did not read as a pull record #2666:
/_statuscarries each*.jsonin the records directory that does not parse, with its path and the error. The page lists the first five, then "…and N more".Closes #2638
Closes #2639
Closes #2666
Reviewer notes
missing field \resumed_bytes`), up to the 200 the directory keeps, and the new banner lists them. The dashboard is in no tag yet (latest is v0.2.0), so no released host sees this. The CHANGELOGAdded` entries for the dashboard and the record are updated in place.activity.rs(BlobBytes,RunBytes,Landed,read_records), thenbundle_pull.rs(Planned,nothing_to_fetch).copy_verified's new(0, total)report also reaches the stdout progress bar. The first-byte timing mark is gated onreceived > 0, so it does not move.App.tsxintocomponents/UnreadableRecords.tsx, so a render test can reach it.Verification
pre-commit runon every changed file: passed (cargo denywarns on the existingcrypto-bigintRUSTSEC-2026-0387 only)cargo clippy --workspace --all-targets --all-features -- -D warnings: cleancargo nextest run -p decdn-cli: 1230 passedcargo nextest run -p decdn-e2e --features anvil-e2e -E 'binary(cli_fetch_two_data_dirs)': passed, with a newresumed_bytes == 0check for a fresh fetchUPDATE_STATUS_FIXTURES=1regenerateddashboard-*.json. Incrates/cli/dashboard:pnpm test(80 passed),pnpm lint,prettier --check,pnpm buildCARGO_BUILD_WARNINGS=deny cargo doc -p decdn-cli --no-deps --document-private-items: cleanmake -C adr check-refs: cleandecdn dashboardagainst a real~/.decdn/activity/pullslists the six records written before this change, each with "missing fieldresumed_bytes"🤖 Generated with Claude Code