Files
pad/web/src
xarmian 45d032cb09 fix(web): graph node click/dbl-click + Open as real link (TASK-1788) (#725)
* fix(web): graph node click/dbl-click + Open as real link (TASK-1788)

Three interaction fixes for the per-item graph (TASK-1787 follow-up):

- Click-to-select and double-click-to-zoom didn't fire. Root cause: the
  viewport called setPointerCapture on pointerdown, which suppressed the SVG
  nodes' click/dblclick events. Now drag/capture engages only after the pointer
  moves past a 4px threshold, so a plain press still produces a node click;
  a gesture that became a pan suppresses the trailing click via a flag.
- Open actions are now real <a href> links (controls "Open ↗" and the detail
  panel "Open item ↗"), so cmd/ctrl-click opens the item in a new tab; a plain
  click is a normal SvelteKit navigation that closes the drawer via the ?graph
  URL effect. Replaced the onOpenItem callback prop with an itemHref builder.

Parent: PLAN-1780.

* fix(web): robust pan/click suppression per Codex review (round 1)

- Clear suppressClick when the drag gesture ends (deferred one tick so the
  trailing click is still suppressed) instead of waiting for the next node
  click. Fixes a pan ending on empty canvas leaving the flag set and swallowing
  the next intentional click.
- Guard onPointerMove on e.buttons: if the primary button isn't held (press
  ended off-viewport before a drag engaged, so no pointerup was seen), abort
  instead of starting a ghost pan when the pointer returns.

Parent: PLAN-1780.
2026-06-08 20:20:46 -04:00
..
2026-03-26 01:52:36 +00:00