Repository navigation
fix(charts): zoom drag after Escape, after a lost release, and its label at the plot's edge - #2575
Conversation
…rlay presses, touch, the trailing click
A pointerup lost to a window switch left the drag set: later moves kept painting the band and the chart stopped getting pointer events. A move with no button down now cancels it.
…in the plot Escape dropped the drag at once, so the click after the release reached the chart and pinned its tooltip. A cancelled drag now clears its band and waits for its release, which is swallowed like any other drag's. The label was centred on the band and clipped at the plot's edge. It is a sibling of the band now, centred on it and held inside the plot.
Maple review🟢 Confidence 10/10 · safe to merge. Each of the three gesture fixes is pinned by a DOM test that fails without it; only the label's px placement rests on the Fixes three drag-gesture defects in the linked zoom: Escape now keeps the drag so its trailing click is swallowed, a lost pointerup ends the drag, and the label is clamped inside the plot. Safe to merge.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
🍁 Maple PR previewNote Preview resources were removed when this pull request closed. Final commit |
Preview checkDriven on
Not checked on a preview: the lost-release case (it needs the window to lose focus mid-drag, which a headless browser does not do); it is covered by the DOM test. No server code changes here, so there are no new traces to look at. |


Follow-up to #2571, which merged before its review fixes were pushed and before its preview check finished. Three fixes to the drag gesture, and the DOM tests it did not have.
What changes
linked-cursor.dom.test.ts): a drag reports its span and labels it, a small move is a click, Escape cancels, a missed release ends the drag, a press on a page overlay or a touch starts nothing, and the click after a drag or after an Escape never reaches the chart.Verified
bunx vitest run src/chartsinpackages/views: 146 passed (8 new).bunx oxlint -c .oxlintrc.effect.json --quietandbunx oxfmt --checkon the changed files,bun run --filter=@maple/web typecheck: clean./lab/bench/service-detail: a drag to the right edge puts the label's right edge exactly on the plot's (621px and 621px); after a drag cancelled with Escape the tooltip follows the pointer again (10:55 AM at 20% of the plot, 04:55 PM at 70%).Before and after
The label at the plot's right edge, 2x. "Before" is from the #2571 preview.
After Escape: the tooltip pinned at the release point (before, from the preview), and following the pointer (after).
Not in this PR
After a zoom the header shows the range as raw UTC bounds ("2026-11-13 13:33:59 - 2026-11-13 17:08:31") while the drag label and the axes read in the viewer's zone. That is how the header has always shown an absolute range (
TODO(range-label)intime-controls.ts); zoom makes it more visible. It touches every page's time controls, so it is its own change.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.