Use left pan, click selection, and right-drag box selection #5

Closed
lost-rob0t wants to merge 18 commits from agent/fix-exact-graph-controls into main
lost-rob0t commented 2026-07-28 01:07:08 +00:00 (Migrated from github.com)

Exact controls

  • left-click a node: select exactly that node;
  • left-drag the canvas: native Cytoscape viewport pan;
  • right-drag: draw a selection rectangle and select overlapping nodes;
  • right-click without dragging: select that node and open its context menu;
  • wheel or trackpad: zoom without the delayed selected-node recenter undoing navigation;
  • touch and pen: retain native viewport navigation.

Root cause

The previous change set userPanningEnabled to false, which globally reassigned ordinary left-drag from panning to Cytoscape box selection. That directly contradicted the required input map. It also relied on overlapping manual pan state.

Implementation

  • restore native user panning as the default;
  • remove manual middle/Space pan state;
  • implement right-drag selection using Cytoscape cxttapstart, cxtdrag, and cxttapend events;
  • explicitly single-select nodes on normal left click and right click;
  • suppress the context menu only when a right-drag actually became a selection gesture;
  • retain a narrow navigation guard so GraphPage's delayed panBy() cannot snap a completed pan or zoom back.

Validation

CI must pass formatting, lint, typecheck, boundaries, static checks, unit/integration tests, production build validation, and Chromium Playwright E2E before merge.

## Exact controls - left-click a node: select exactly that node; - left-drag the canvas: native Cytoscape viewport pan; - right-drag: draw a selection rectangle and select overlapping nodes; - right-click without dragging: select that node and open its context menu; - wheel or trackpad: zoom without the delayed selected-node recenter undoing navigation; - touch and pen: retain native viewport navigation. ## Root cause The previous change set `userPanningEnabled` to `false`, which globally reassigned ordinary left-drag from panning to Cytoscape box selection. That directly contradicted the required input map. It also relied on overlapping manual pan state. ## Implementation - restore native user panning as the default; - remove manual middle/Space pan state; - implement right-drag selection using Cytoscape `cxttapstart`, `cxtdrag`, and `cxttapend` events; - explicitly single-select nodes on normal left click and right click; - suppress the context menu only when a right-drag actually became a selection gesture; - retain a narrow navigation guard so GraphPage's delayed `panBy()` cannot snap a completed pan or zoom back. ## Validation CI must pass formatting, lint, typecheck, boundaries, static checks, unit/integration tests, production build validation, and Chromium Playwright E2E before merge.
lost-rob0t commented 2026-08-19 11:29:05 +00:00 (Migrated from github.com)

Replacement work is now in #21, rebuilt directly on current main instead of trying to resolve this month-old conflict stack. Keeping #5 open until #21 passes exact-head CI and merges, then this stale PR can close as superseded.

Replacement work is now in #21, rebuilt directly on current `main` instead of trying to resolve this month-old conflict stack. Keeping #5 open until #21 passes exact-head CI and merges, then this stale PR can close as superseded.
lost-rob0t commented 2026-08-19 12:11:20 +00:00 (Migrated from github.com)

Superseded by #21, which rebuilt this behavior directly on current main, passed the full exact-head CI suite including Playwright E2E, and has now merged. Closing this stale/conflicted branch so the backlog reflects shipped state rather than archaeological layers.

Superseded by #21, which rebuilt this behavior directly on current `main`, passed the full exact-head CI suite including Playwright E2E, and has now merged. Closing this stale/conflicted branch so the backlog reflects shipped state rather than archaeological layers.

Pull request closed

Sign in to join this conversation.
No description provided.