Skip to content

fix(progress): always show at least one filled char when progress > 0#98

Merged
fullstackjam merged 1 commit into
mainfrom
fix/progress-bar-min-fill
May 19, 2026
Merged

fix(progress): always show at least one filled char when progress > 0#98
fullstackjam merged 1 commit into
mainfrom
fix/progress-bar-min-fill

Conversation

@fullstackjam
Copy link
Copy Markdown
Collaborator

Summary

  • During formula installs with many large casks queued, the byte-proportional bar stays near 1% — int(0.01 * 40 chars) == 0 so zero green characters render and the bar looks absent
  • Fix: if pct > 0 and filled rounds to 0, clamp it to 1 so the green indicator is always visible once any work has started
  • Applied to both formatLines() (scroll-region path) and renderInline() (fallback path)

Test plan

  • Existing TestStickyProgress* suite passes (go test ./internal/ui/...)
  • Manual: run openboot install with a config that has many large casks; green bar is visible even at 1% during formula phase

When the install has many large casks, the byte-proportional bar stays
near 1% during formula installs. At that percentage int(0.01 * 40) == 0,
so no green characters render — the bar looks missing. Force filled=1
whenever pct>0 so the green indicator is always visible once work starts.
@github-actions github-actions Bot added the ui Terminal UI label May 19, 2026
@fullstackjam fullstackjam merged commit e781f5d into main May 19, 2026
11 checks passed
@fullstackjam fullstackjam deleted the fix/progress-bar-min-fill branch May 19, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui Terminal UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant