Skip to content

fix: use human-readable byte sizes in upgrade verbose output#866

Merged
BYK merged 2 commits intomainfrom
fix/upgrade-verbose-messages
Apr 28, 2026
Merged

fix: use human-readable byte sizes in upgrade verbose output#866
BYK merged 2 commits intomainfrom
fix/upgrade-verbose-messages

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Apr 28, 2026

Summary

  • Replace raw byte counts (e.g. 3435689 bytes) with formatted values (e.g. 3.4MB) using existing formatCompactWithUnit utility
  • Change "Downloaded binary verified" to "Binary verified" since the message applies to both delta-patched and downloaded binaries
  • Replace manual KB formatting with formatCompactWithUnit for consistency

Before

⚙ Resolved nightly chain: 3 patch(es), 3435689 bytes total
⚙ Downloaded binary verified (106989888 bytes)
ℹ Applied delta patch (3355.2 KB downloaded)

After

⚙ Resolved nightly chain: 3 patch(es), 3.4MB total
⚙ Binary verified (107MB)
ℹ Applied delta patch (3.4MB downloaded)

- Replace raw byte counts (e.g. '3435689 bytes') with formatted values
  (e.g. '3.4MB') using existing formatCompactWithUnit utility
- Change 'Downloaded binary verified' to 'Binary verified' since the
  message applies to both delta-patched and downloaded binaries
- Replace manual KB formatting with formatCompactWithUnit for consistency
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 28, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-866/

Built to branch gh-pages at 2026-04-28 22:05 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 28, 2026

Codecov Results 📊

6213 passed | Total: 6213 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

❌ Patch coverage is 39.13%. Project has 13578 uncovered lines.
❌ Project coverage is 75.1%. Comparing base (base) to head (head).

Files with missing lines (3)
File Patch % Lines
src/lib/formatters/numbers.ts 36.36% ⚠️ 7 Missing
src/commands/cli/upgrade.ts 14.29% ⚠️ 6 Missing
src/lib/delta-upgrade.ts 66.67% ⚠️ 1 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    75.92%    75.10%    -0.82%
==========================================
  Files          293       293         —
  Lines        53930     54528      +598
  Branches         0         0         —
==========================================
+ Hits         40941     40950        +9
- Misses       12989     13578      +589
- Partials         0         0         —

Generated by Codecov Action

Comment thread src/lib/upgrade.ts Outdated
…otation

Sentry bot correctly identified that formatCompactWithUnit(n, 'byte')
produces '1.1BB' for gigabyte values because Intl.NumberFormat compact
uses 'B' for billions and appendUnitSuffix adds another 'B' for bytes.

Add a dedicated formatBytes() that uses proper 1024-based binary units
(B, KB, MB, GB) instead of piggybacking on count formatting.
@BYK BYK merged commit c63d738 into main Apr 28, 2026
26 checks passed
@BYK BYK deleted the fix/upgrade-verbose-messages branch April 28, 2026 22:10
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