feat(tui): overhaul latency sparkline scaling, color, and layout #64

Merged
lerko merged 2 commits from feat/sparkline-overhaul into main 2026-06-05 00:01:25 +00:00
Owner

Summary

  • Dual-channel sparkline: bar height = relative (stability/anomalies), color+brightness = absolute (fast vs slow)
  • Brightness gradient within color bands (dim→bright as latency approaches next threshold)
  • Row background passes through sparkline ANSI so zebra stripes and selection highlights render correctly
  • Cap sparkline width to 60 (maxHistoryLen) and column to 62 — no trailing dead space
  • Group sparkline: subtle dots for healthy, bold red for failures
  • Braille subpixel canvas ported from meridian for future multi-row graph use

Test plan

  • All TUI tests pass (go test ./internal/tui/)
  • Sparkline shows variation on fast sites (10-20ms range)
  • Color differs between fast (green) and slow (yellow/red) sites
  • Zebra background carries through sparkline on alternating rows
  • Selected row highlight carries through sparkline
  • No trailing whitespace in HISTORY column
  • Group rows show subtle dots (not bright green)
## Summary - Dual-channel sparkline: bar height = relative (stability/anomalies), color+brightness = absolute (fast vs slow) - Brightness gradient within color bands (dim→bright as latency approaches next threshold) - Row background passes through sparkline ANSI so zebra stripes and selection highlights render correctly - Cap sparkline width to 60 (maxHistoryLen) and column to 62 — no trailing dead space - Group sparkline: subtle dots for healthy, bold red for failures - Braille subpixel canvas ported from meridian for future multi-row graph use ## Test plan - [x] All TUI tests pass (`go test ./internal/tui/`) - [x] Sparkline shows variation on fast sites (10-20ms range) - [x] Color differs between fast (green) and slow (yellow/red) sites - [x] Zebra background carries through sparkline on alternating rows - [x] Selected row highlight carries through sparkline - [x] No trailing whitespace in HISTORY column - [x] Group rows show subtle dots (not bright green)
lerko added 1 commit 2026-06-04 23:45:43 +00:00
feat(tui): overhaul latency sparkline scaling, color, and layout
CI / test (pull_request) Successful in 2m39s
CI / lint (pull_request) Failing after 56s
CI / vulncheck (pull_request) Successful in 51s
986681ef8a
Replace misleading relative-only sparkline with dual-channel design:
bar height uses relative scaling (shows stability and anomalies),
color+brightness uses absolute thresholds (shows fast vs slow).

- Add brightness gradient within color bands (dim→bright as latency
  increases toward the next threshold)
- Pass row background through sparkline rendering so zebra stripes
  and selection highlights carry through ANSI sequences
- Cap sparkline width to 60 (matches maxHistoryLen) and column
  width to 62 to eliminate trailing dead space
- Quiet group sparkline: subtle dots for healthy, bold red for down
- Add braille subpixel canvas (ported from meridian) for future
  multi-row graph use
lerko added 1 commit 2026-06-04 23:56:10 +00:00
fix(tui): check fmt.Sscanf return value (errcheck lint)
CI / test (pull_request) Successful in 2m37s
CI / lint (pull_request) Successful in 57s
CI / vulncheck (pull_request) Successful in 51s
7bff79b09c
lerko merged commit 7bff79b09c into main 2026-06-05 00:01:25 +00:00
lerko deleted branch feat/sparkline-overhaul 2026-06-05 00:01:25 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lerkolabs/uptop#64