Skip to content

MOBILE-TOUCH (#29): reliable tap-to-open + 44px hit areas#130

Merged
mvalancy merged 1 commit into
devfrom
feat/mobile-touch
Jun 19, 2026
Merged

MOBILE-TOUCH (#29): reliable tap-to-open + 44px hit areas#130
mvalancy merged 1 commit into
devfrom
feat/mobile-touch

Conversation

@mvalancy

Copy link
Copy Markdown
Member

Mobile touch overhaul. New pure lib/touchInteraction.ts (11 tests) drives: tap-to-open (node touchend classifies a quick still touch as a tap → handleNodeClick + preventDefault, works even while locked; also makes the touch grow flow's target-tap deterministic) and 44px hit-rects on the header icon buttons (coarse-pointer only). Verified: unit 11/11, new @mobile @touch e2e (real hasTouch) taps a node → inspector opens while locked, typecheck clean, THE GATE 5/5.

🤖 Generated with Claude Code

On a phone the graph defaults to LOCKED (touch pans the canvas), and a single tap
on a node previously relied on the flaky synthetic mouse-click — so opening a node
on touch was unreliable. The header icon buttons also draw at 16-24px, well under
the 44px touch-target minimum.

- New pure lib/touchInteraction.ts (11 unit tests): isTap / isLongPress (duration +
  movement thresholds), touchHitSize (>= 44px on touch), distance, isCoarsePointer.
- TAP-TO-OPEN: the node touchend now classifies a quick, still touch as a tap and
  calls handleNodeClick directly + preventDefault (suppresses the synthetic click so
  it can't double-fire open-then-shut). Long-press (context menu) and drag/pan are
  excluded by isTap. Works even while the graph is locked. This also makes the touch
  grow flow's target-tap (complete-connection) fire deterministically.
- 44px HIT AREAS: on a coarse pointer, each node header icon group (edit /
  relationship / expand / descend) gets a transparent 44px hit-rect — bigger tap
  target, identical look, tracks the counter-zoom.

Verified: touchInteraction 11/11; new tests/e2e/mobile/touch-graph.spec.ts
(@mobile @touch, real hasTouch context) — single tap opens the inspector while
locked; web typecheck clean; THE GATE 5/5 (no desktop regression).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mvalancy mvalancy merged commit b8000ef into dev Jun 19, 2026
@mvalancy mvalancy deleted the feat/mobile-touch branch June 19, 2026 02:07
@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.

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