Conversation
📝 WalkthroughWalkthroughAdded pointer event forwarding to GraphCanvas with a handler that filters out copy-paste target interactions and non-middle-pointer inputs before delegating events to canvasInteractions.forwardEventToCanvas. No public API changes. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User (Pointer)
participant GC as GraphCanvas
participant Check as Filter (shouldIgnoreCopyPaste / isMiddlePointerInput)
participant CI as canvasInteractions
User->>GC: pointerdown / pointermove / pointerup
GC->>Check: evaluate target & pointer type
alt ignore event
Check-->>GC: ignore
else forward
Check->>CI: forwardEventToCanvas(event)
CI-->>GC: handled
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 02/14/2026, 05:55:53 PM UTC 🔗 Links🎉 Your Storybook is ready for review! |
|
Playwright: ✅ 524 passed, 0 failed · 1 flaky 📊 Browser Reports
|
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 21.7 kB (baseline 21.7 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 880 kB (baseline 879 kB) • 🔴 +328 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 68.9 kB (baseline 68.9 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Panels & Settings — 427 kB (baseline 427 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
User & Accounts — 16.1 kB (baseline 16.1 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Editors & Dialogs — 785 B (baseline 785 B) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
UI Components — 36.6 kB (baseline 36.6 kB) • ⚪ 0 BReusable component library chunks
Data & Services — 2.15 MB (baseline 2.15 MB) • ⚪ 0 BStores, services, APIs, and repositories
Utilities & Hooks — 237 kB (baseline 237 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Vendor & Third-Party — 8.69 MB (baseline 8.69 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 7.31 MB (baseline 7.31 MB) • ⚪ 0 BBundles that do not match a named category
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/components/graph/GraphCanvas.vue`:
- Line 160: The top-level import of forwardMiddlePointerIfNeeded from
useNodePointerInteractions causes module-scoped side effects (it triggers
useCanvasInteractions at module load); to fix, remove the module-scope import in
GraphCanvas.vue and load the helper inside the component lifecycle (e.g.,
dynamically import or import within setup()) so useCanvasInteractions runs only
at runtime, or change the composable to expose a side-effect-free export and
import that instead; reference the forwardMiddlePointerIfNeeded symbol and the
useNodePointerInteractions composable so you can either lazy-import the function
in setup() or refactor useNodePointerInteractions to expose a safe entrypoint.
🧹 Nitpick comments (1)
src/components/graph/GraphCanvas.vue (1)
548-552: TheshouldIgnoreCopyPastecheck is semantically misaligned with the function's purpose.
shouldIgnoreCopyPasteis designed to check if copy/paste shortcuts should be suppressed (for text inputs). Reusing it here as "is this a focused text element?" works by coincidence but makes the intent opaque to future readers. A more descriptive helper (e.g.,isFocusedTextInput) or at minimum a brief comment would clarify why this guard exists.Also note:
forwardMiddlePointerIfNeeded(e)returns aboolean, but the return value is discarded. If you addstopPropagationto prevent double-dispatch (per the comment above), you'd need to use that return value:function forwardPanEvent(e: PointerEvent) { if (shouldIgnoreCopyPaste(e.target) && document.activeElement === e.target) return - forwardMiddlePointerIfNeeded(e) + if (forwardMiddlePointerIfNeeded(e)) e.stopPropagation() }
e45ae1a to
cb08eae
Compare
Sometimes, middle mouse clicks would fail to initiate a canvas pan, depending on the target of the initial pan. This PR adds a capturing event handler to the transform pane that forwards the pointer event to canvas if
Resolves #6911
While testing this, I encountered infrequent cases of "some nodes unintentionally translating continually to the left". Reproduction was too unreliable to properly track down, but did appear unrelated to this PR.
┆Issue is synchronized with this Notion page by Unito