Skip to content

Graph PR-C: minimap wheel + pinch zoom#64

Merged
mvalancy merged 1 commit into
developfrom
feat/minimap-zoom
Jun 14, 2026
Merged

Graph PR-C: minimap wheel + pinch zoom#64
mvalancy merged 1 commit into
developfrom
feat/minimap-zoom

Conversation

@mvalancy

Copy link
Copy Markdown
Member

The minimap only supported click-to-navigate. Now you can zoom from the minimap (wheel or pinch), not just the main graph view.

  • MiniMap.tsx: native (passive:false) wheel + 2-touch pinch listeners on the minimap svg → map the gesture point (minimap px → graph coords via the existing inverse transform) and drive the main view through a new window.miniMapZoom. The listener attaches when the svg actually appears (the minimap renders a "No nodes yet" div first).
  • InteractiveGraphVisualization.tsx: window.miniMapZoom(graphX, graphY, targetK) zooms the main view to targetK (clamped to the [0.1,4] scaleExtent), centered on the graph point, via the shared zoom behavior.

Verified: minimap-zoom.spec.ts — wheel-in increases / wheel-out decreases the main view scale (0.30 → 0.49 → 0.25). THE GATE 5/5, typecheck clean.

🤖 Generated with Claude Code

The minimap only supported click-to-navigate. Add wheel and pinch zoom so you
can zoom from the minimap as well as the main view.

- MiniMap.tsx: native (passive:false) wheel + 2-touch pinch listeners on the
  minimap svg → map the gesture point (minimap px → graph coords via the
  existing inverse transform) and drive the main view via window.miniMapZoom.
  Listener attaches when the svg actually appears (the minimap renders a
  "No nodes yet" div first), via a nodes-present effect dep.
- InteractiveGraphVisualization.tsx: window.miniMapZoom(graphX, graphY, targetK)
  — zoom the main view to targetK (clamped to the [0.1,4] scaleExtent) centered
  on the graph point, applied through the shared zoom behavior.

Verified: tests/diagnostics/minimap-zoom.spec.ts — wheel-in increases and
wheel-out decreases the main view scale (0.30 → 0.49 → 0.25). Web typecheck clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🧪 Comprehensive Test Suite

  • Unit suites (Node 18.x & 20.x) — core, web, server, mcp-server: ✅ passed
  • Installer & deploy config: ✅ passed

Full-stack smoke gate runs in the CI workflow.

@mvalancy mvalancy merged commit 6a255ec into develop Jun 14, 2026
16 checks passed
@mvalancy mvalancy deleted the feat/minimap-zoom branch June 14, 2026 19:24
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