Restore exact graph controls on current main #21

Merged
lost-rob0t merged 11 commits from fix/graph-controls-current-main into main 2026-08-19 12:11:11 +00:00
lost-rob0t commented 2026-08-19 11:25:50 +00:00 (Migrated from github.com)

Summary

Rebuilds the useful intent of stale/conflicted PR #5 directly on current main after the shared UI-core/shell overhaul.

  • left-click a node selects exactly that node;
  • left-drag on the canvas uses native Cytoscape viewport panning;
  • right-drag draws an explicit selection rectangle and selects overlapping nodes;
  • right-click without dragging still selects the node and leaves the existing context-menu path intact;
  • wheel/trackpad navigation feeds the shared navigation guard used by GraphPage, preventing delayed recenter from undoing user navigation;
  • touch/pen remain on native Cytoscape navigation;
  • relation drag behavior is preserved.

Why a replacement PR

PR #5 is month-old, conflicted with current main, and its last CI run is red. The required behavior is still absent on main (userPanningEnabled was still defaulting to false), so closing it as merely obsolete would preserve the bug. This branch starts at current main and carries only the control semantics that are still needed.

During current-main review, the branch also found and removed a duplicate navigation-guard path: GraphPage reads isGraphUserNavigationActive() from user-navigation-guard.js, so the adapter now installs that shared guard directly instead of maintaining a second private gesture state.

Coverage

  • GraphAdapter unit coverage asserts native panning and single-selection defaults.
  • GraphAdapter coverage proves it installs and cleans up the exact shared navigation guard GraphPage reads.
  • Gesture unit coverage asserts rectangle normalization, overlap selection, and single selection.
  • Existing navigation-guard tests continue to cover pointer lifetime, wheel/pan marking, and release cooldown semantics.

Merge gate

Do not merge unless the exact current-head CI run is green.

Supersedes #5 after this PR is merged.

## Summary Rebuilds the useful intent of stale/conflicted PR #5 directly on current `main` after the shared UI-core/shell overhaul. - left-click a node selects exactly that node; - left-drag on the canvas uses native Cytoscape viewport panning; - right-drag draws an explicit selection rectangle and selects overlapping nodes; - right-click without dragging still selects the node and leaves the existing context-menu path intact; - wheel/trackpad navigation feeds the shared navigation guard used by GraphPage, preventing delayed recenter from undoing user navigation; - touch/pen remain on native Cytoscape navigation; - relation drag behavior is preserved. ## Why a replacement PR PR #5 is month-old, conflicted with current `main`, and its last CI run is red. The required behavior is still absent on main (`userPanningEnabled` was still defaulting to `false`), so closing it as merely obsolete would preserve the bug. This branch starts at current main and carries only the control semantics that are still needed. During current-main review, the branch also found and removed a duplicate navigation-guard path: GraphPage reads `isGraphUserNavigationActive()` from `user-navigation-guard.js`, so the adapter now installs that shared guard directly instead of maintaining a second private gesture state. ## Coverage - GraphAdapter unit coverage asserts native panning and single-selection defaults. - GraphAdapter coverage proves it installs and cleans up the exact shared navigation guard GraphPage reads. - Gesture unit coverage asserts rectangle normalization, overlap selection, and single selection. - Existing navigation-guard tests continue to cover pointer lifetime, wheel/pan marking, and release cooldown semantics. ## Merge gate Do not merge unless the exact current-head CI run is green. Supersedes #5 after this PR is merged.
Sign in to join this conversation.
No description provided.