feat(tui): click-to-inspect sparkline tooltips #97

Merged
lerko merged 1 commits from feat/sparkline-tooltip into main 2026-06-10 19:02:24 +00:00
Owner

Summary

  • Click any sparkline character in the detail view to inspect that data point
  • Shows approximate time ago, latency value, and UP/DOWN status
  • Esc dismisses tooltip without leaving detail view; click outside sparkline clears it
  • Uses existing BubbleZone zone manager — no new dependencies
  • 12 table-driven tests for index resolution (padding, truncation, edge cases)

Files

  • sparkline.goresolveSparklineIndex() maps zone-relative X to data index
  • sparkline_test.go — table-driven tests for index resolution
  • tui.gosparkTooltipIdx field on Model
  • update.gohandleSparklineClick() + Esc dismissal in detail view
  • view_dashboard.gozones.Scan() enabled for detail view
  • view_detail.go — zone-marked sparklines + tooltip info line rendering

Test plan

  • go build ./... passes
  • go test ./... passes (all packages)
  • Manual: click sparkline chars, verify tooltip content
  • Manual: Esc dismisses tooltip, second Esc exits detail view
  • Manual: click on dot padding shows nothing
## Summary - Click any sparkline character in the detail view to inspect that data point - Shows approximate time ago, latency value, and UP/DOWN status - Esc dismisses tooltip without leaving detail view; click outside sparkline clears it - Uses existing BubbleZone zone manager — no new dependencies - 12 table-driven tests for index resolution (padding, truncation, edge cases) ## Files - `sparkline.go` — `resolveSparklineIndex()` maps zone-relative X to data index - `sparkline_test.go` — table-driven tests for index resolution - `tui.go` — `sparkTooltipIdx` field on Model - `update.go` — `handleSparklineClick()` + Esc dismissal in detail view - `view_dashboard.go` — `zones.Scan()` enabled for detail view - `view_detail.go` — zone-marked sparklines + tooltip info line rendering ## Test plan - [x] `go build ./...` passes - [x] `go test ./...` passes (all packages) - [x] Manual: click sparkline chars, verify tooltip content - [x] Manual: Esc dismisses tooltip, second Esc exits detail view - [x] Manual: click on dot padding shows nothing
lerko added 1 commit 2026-06-10 15:28:44 +00:00
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
f97ea3d66b
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.
lerko merged commit f97ea3d66b into main 2026-06-10 19:02:24 +00:00
lerko deleted branch feat/sparkline-tooltip 2026-06-10 19:02:24 +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#97