Skip to content

feat(ui): draggable edges on trace overview minimap#145

Merged
daharoni merged 1 commit into
mainfrom
feat/trace-overview-edge-drag
Apr 24, 2026
Merged

feat(ui): draggable edges on trace overview minimap#145
daharoni merged 1 commit into
mainfrom
feat/trace-overview-edge-drag

Conversation

@daharoni
Copy link
Copy Markdown
Contributor

@daharoni daharoni commented Apr 24, 2026

Summary

  • Adds resize handles to the zoom rectangle on the trace-card minimap: dragging the left/right edge moves just that boundary while the opposite side stays fixed.
  • Body-drag / click-to-recenter behavior is unchanged.
  • Small darker-blue grip with a white notch is drawn on each visible edge, and the cursor switches to ew-resize on hover for discoverability.
  • Change is in the shared TraceOverview component, so both CaTune and CaDecon pick it up without any call-site changes.

Implementation notes:

  • Hit-testing treats an edge as grabbable only when its time boundary actually falls within the row under the cursor — prevents the clipped x=0 / x=width sides on intermediate rows of a multi-row zoom from being mistaken for handles.
  • Drags clamp to [0, totalDuration] with a one-sample minimum gap so the window can't invert or collapse.

Test plan

  • Hover near the edges of the blue rectangle — cursor becomes ew-resize, grip is visible.
  • Drag left edge: zoomStart moves, zoomEnd fixed.
  • Drag right edge: zoomEnd moves, zoomStart fixed.
  • Dragging one edge past the other clamps (no inversion).
  • Clicking/body-dragging inside the rect still pans the window as before.
  • Clicking outside the rect still recenters the window.
  • Multi-row zoom: grip only shows on the row containing the actual boundary (not on clipped edges of rows in between).
  • Verify in both CaTune and CaDecon trace inspectors.

🤖 Generated with Claude Code

Lets users resize the zoom window by dragging its left/right edges on
the minimap, instead of only panning or click-to-recenter. Edge handles
get a small visual grip and an ew-resize cursor on hover. Shared
component — both CaTune and CaDecon pick it up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@daharoni
Copy link
Copy Markdown
Contributor Author

Added nice little draggable edges to the trace viewer:

image

@daharoni daharoni merged commit 57283c4 into main Apr 24, 2026
6 checks passed
@daharoni daharoni deleted the feat/trace-overview-edge-drag branch April 24, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant