From 8c7298d8555e412905b44c69f0ac8bffc9264eba Mon Sep 17 00:00:00 2001 From: fullstackjam Date: Wed, 20 May 2026 00:50:36 +0800 Subject: [PATCH] fix(progress): always show at least one filled char when progress > 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- internal/ui/progress.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/ui/progress.go b/internal/ui/progress.go index 7744325..b9b900f 100644 --- a/internal/ui/progress.go +++ b/internal/ui/progress.go @@ -168,6 +168,9 @@ func (sp *StickyProgress) renderInline() { pct = float64(sp.completed) / float64(sp.total) } filled := int(pct * float64(sp.barWidth)) + if pct > 0 && filled == 0 { + filled = 1 + } empty := sp.barWidth - filled bar := progressBarStyle.Render(strings.Repeat("█", filled)) + @@ -217,6 +220,9 @@ func (sp *StickyProgress) formatLines() []string { pct := sp.pctForBar() filled := int(pct * float64(barWidth)) + if pct > 0 && filled == 0 { + filled = 1 + } empty := barWidth - filled bar := progressBarStyle.Render(strings.Repeat("█", filled)) + progressBgStyle.Render(strings.Repeat("░", empty))