Skip to content

refactor(progress): replace byte-tracking bar with spinner + elapsed#99

Merged
fullstackjam merged 1 commit into
mainfrom
refactor/simplify-progress
May 20, 2026
Merged

refactor(progress): replace byte-tracking bar with spinner + elapsed#99
fullstackjam merged 1 commit into
mainfrom
refactor/simplify-progress

Conversation

@fullstackjam
Copy link
Copy Markdown
Collaborator

Summary

  • Remove CacheTracker, FetchFormulaSizes, FetchCaskSizes, byte/speed/EMA fields from StickyProgress, and the scroll-region bar renderer
  • Replace with spinner + `[N/M] pkgname` + per-package elapsed time — never freezes because it has nothing to measure
  • Cask installs already let brew's own download output scroll through; formula installs stay silent; both share the sticky spinner at the bottom
  • Deletes cache.go, cache_test.go, sizecheck.go, sizecheck_test.go, httputil/head.go, httputil/head_test.go
  • Net: -1146 lines

Motivation

The byte-proportional bar froze during brew's install phase (after download completes) because there was nothing left to poll. Attempts to fix it (show "installing...", indeterminate animation) added complexity without solving the root problem. Simpler answer: don't promise what we can't measure.

Test plan

  • make test-unit passes (L1 suite including archtest)
  • install_progress_behavior_test.go updated — size pre-fetch call removed, alias resolution still batched correctly
  • go vet ./... clean

Remove CacheTracker, FetchFormulaSizes/FetchCaskSizes, byte/speed/EMA
fields from StickyProgress, and the scroll-region bar render. Replace
with a simple spinner + [N/M] pkgname + per-package elapsed time.

Cask installs already let brew's own download output scroll through;
formula installs stay silent. Both show the sticky spinner line at the
bottom, which never freezes because it has nothing to measure.

Deletes: cache.go, cache_test.go, sizecheck.go, sizecheck_test.go,
httputil/head.go, httputil/head_test.go (-1146 lines net).
@github-actions github-actions Bot added brew Homebrew related tests Tests only ui Terminal UI labels May 20, 2026
@fullstackjam fullstackjam merged commit b1300e3 into main May 20, 2026
12 checks passed
@fullstackjam fullstackjam deleted the refactor/simplify-progress branch May 20, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

brew Homebrew related tests Tests only ui Terminal UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant