feat(tui): click-to-inspect sparkline tooltips in detail view
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user