Skip to content

fix: cap the bar sparkline one grade short of full height - #176

Merged
outofcoffee merged 1 commit into
mainfrom
fix/bar-glyph-gap
Sep 6, 2026
Merged

fix: cap the bar sparkline one grade short of full height#176
outofcoffee merged 1 commit into
mainfrom
fix/bar-glyph-gap

Conversation

@outofcoffee

Copy link
Copy Markdown
Collaborator

Cap the bar-format sparkline one grade short of full height so maxed rows stay visually separated.

Summary

  • The sparkline now maps values to the seven sub-full block glyphs (), so a value at 100% renders as and never the full block .
  • Adjacent rows at their maximum no longer merge into one solid block; the trailing percentage still carries the exact value.
  • Applies to the shared sparkline drawn by remote metrics --format=bar, fleet metrics --format=bar, and the dashboard tiles. The gauge format is unchanged.
  • Adds the "Sparkline never draws a full block" spec requirement (synced to the main spec) and tests covering the cap and the adjacent-maxed-rows case.

Implementation details

Reducing barGlyphs to the seven sub-full blocks makes the cap structural — the set simply contains no , rather than clamping the index. This re-buckets the mid range to even ~14% bands; the shift is invisible because the trailing percentage is the precise reading.

@outofcoffee outofcoffee added the bug Something isn't working label Sep 6, 2026
@outofcoffee
outofcoffee merged commit 78ebd45 into main Sep 6, 2026
2 checks passed
@outofcoffee
outofcoffee deleted the fix/bar-glyph-gap branch September 6, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant