feat(tui): overhaul latency sparkline scaling, color, and layout
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
This commit is contained in:
@@ -25,6 +25,10 @@ var (
|
||||
titleStyle lipgloss.Style
|
||||
activeTab lipgloss.Style
|
||||
inactiveTab lipgloss.Style
|
||||
|
||||
sparkSuccess string
|
||||
sparkWarning string
|
||||
sparkDanger string
|
||||
)
|
||||
|
||||
func applyTheme(t Theme) {
|
||||
@@ -33,6 +37,11 @@ func applyTheme(t Theme) {
|
||||
warnStyle = lipgloss.NewStyle().Foreground(t.Warning)
|
||||
staleStyle = lipgloss.NewStyle().Foreground(t.Stale)
|
||||
dangerStyle = lipgloss.NewStyle().Foreground(t.Danger)
|
||||
|
||||
sparkSuccess = string(t.Success)
|
||||
sparkWarning = string(t.Warning)
|
||||
sparkDanger = string(t.Danger)
|
||||
|
||||
titleStyle = lipgloss.NewStyle().Foreground(t.Accent).Bold(true)
|
||||
activeTab = lipgloss.NewStyle().Border(lipgloss.NormalBorder(), false, false, true, false).BorderForeground(t.Accent).Foreground(t.Accent).Bold(true).Padding(0, 1)
|
||||
inactiveTab = lipgloss.NewStyle().Padding(0, 1).Foreground(t.Muted)
|
||||
|
||||
Reference in New Issue
Block a user