Repository navigation
fix(app): Improve heatmap hover state alignment and reliability - #3273
Conversation
🦋 Changeset detectedLatest commit: 98820bb79b7b661639444280ac5243de74404ede The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
| setHighlightedPoint(point); | ||
| // Keep the same object while the cursor stays on one cell, so | ||
| // moving within it doesn't re-render the tooltip. | ||
| setHighlightedPoint(prev => |
There was a problem hiding this comment.
🔵 minor — Tooltip dedup keyed only on closestIndex keeps stale count/position after a data refresh or resize
When the cursor stays still and the data refreshes (live mode) or the chart resizes, uPlot runs setCursor again and the plugin reports a fresh point with the same closestIndex. Because the updater returns prev whenever the indices match, the tooltip keeps the old countVal/xVal/xCoord/xSize. After a live refresh the same index can even point to a different time bucket. Before this PR, a resize rebuilt the plugin and reset lastDataPointIndex; now the state survives that. Fix: keep prev only when the fields that are rendered also match (xVal, yVal, countVal, xCoord, yCoord, xSize, ySize), and add a HeatmapPlot test for it.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
PR Review
2 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 2 minor None could be anchored to changed lines; they are listed below. Findings outside the changed lines2 minor
Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
|
Deep Review✅ No critical issues found. This is a focused, well-tested heatmap-hover fix. The cursor→cell matching now measures distance to cell bounds (via 🟡 P2 — recommended
🔵 P3 nitpicks (3)
Reviewers (7): correctness, testing, maintainability, project-standards, kieran-typescript, julik-frontend-races, previous-comments. Testing gaps: No assertion that moving within a single cell avoids a re-render (the No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
E2E Test Results✅ All tests passed • 393 passed • 1 skipped • 1486s
Tests ran across 4 shards in parallel. |
eccd0ca to
98820bb
Compare
98820bb to
4e7c8e0
Compare
Summary
This PR makes three improvements to the heatmap hover state
Screenshots or video
Before
Screen.Recording.2026-10-02.at.8.23.08.AM.mov
After
Screen.Recording.2026-10-02.at.8.22.36.AM.mov
How to test on Vercel preview
View the heatmap either on chart-explorer, dashboards, or search page event deltas
References