feat(tui): click-to-inspect sparkline tooltips in detail view
CI / test (pull_request) Successful in 2m47s
CI / lint (pull_request) Successful in 56s
CI / vulncheck (pull_request) Successful in 46s

Click any sparkline character to see data point details — approximate
time, latency, and up/down status. Esc dismisses tooltip without
leaving detail view. Uses existing BubbleZone infrastructure with
zone-relative coordinate math for index resolution.
This commit was merged in pull request #97.
This commit is contained in:
2026-06-10 11:28:29 -04:00
parent 21a1563e53
commit f97ea3d66b
6 changed files with 152 additions and 18 deletions
+16
View File
@@ -127,6 +127,22 @@ func heartbeatSparkline(statuses []bool, width int, bg lipgloss.Color) string {
return sb.String()
}
func resolveSparklineIndex(x, sparkWidth, dataLen int) int {
visible := dataLen
if visible > sparkWidth {
visible = sparkWidth
}
padding := sparkWidth - visible
if x < padding {
return -1
}
offset := 0
if dataLen > sparkWidth {
offset = dataLen - sparkWidth
}
return offset + (x - padding)
}
func (m Model) groupSparkline(groupID int, width int, bg lipgloss.Color) string {
allSites := m.engine.GetAllSites()
var childStatuses [][]bool