Repository navigation
test: pin subgraph IO drag → Vue widget slot reveal - #12017
christian-byrne wants to merge 1 commit into
Conversation
|
Warning Review limit reachedNext included review available in 20 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (12)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Acknowledged — auto-review skip is expected here. This PR intentionally targets No retry needed. |
📦 Bundle Size
⚡ Performance ReportNo baseline found — showing absolute values.
Raw data{
"timestamp": "2026-05-13T20:16:25.540Z",
"gitSha": "80fcffe1929d6d396df8c2a8eb7bba758fd001fd",
"branch": "glary/subgraph-io-drag-feedback-tdd",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2101.324000000005,
"styleRecalcs": 10,
"styleRecalcDurationMs": 17.472,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 488.17900000000003,
"heapDeltaBytes": -858396
},
{
"name": "canvas-idle",
"durationMs": 2010.167000000024,
"styleRecalcs": 12,
"styleRecalcDurationMs": 10.058000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 360.61699999999996,
"heapDeltaBytes": -704772
},
{
"name": "canvas-idle",
"durationMs": 2042.3999999999864,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.889999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 375.655,
"heapDeltaBytes": -298796
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1894.7860000000105,
"styleRecalcs": 80,
"styleRecalcDurationMs": 41.443999999999996,
"layouts": 12,
"layoutDurationMs": 3.675,
"taskDurationMs": 878.82,
"heapDeltaBytes": 1210744
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1848.622999999975,
"styleRecalcs": 76,
"styleRecalcDurationMs": 37.684000000000005,
"layouts": 12,
"layoutDurationMs": 3.338,
"taskDurationMs": 758.462,
"heapDeltaBytes": 1163392
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1878.645000000006,
"styleRecalcs": 79,
"styleRecalcDurationMs": 45.873,
"layouts": 13,
"layoutDurationMs": 3.9189999999999996,
"taskDurationMs": 790.589,
"heapDeltaBytes": 1802568
},
{
"name": "dom-widget-clipping",
"durationMs": 550.8329999999546,
"styleRecalcs": 15,
"styleRecalcDurationMs": 12.7,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 330.794,
"heapDeltaBytes": 6461400
},
{
"name": "dom-widget-clipping",
"durationMs": 632.6829999999859,
"styleRecalcs": 16,
"styleRecalcDurationMs": 13.177000000000001,
"layouts": 1,
"layoutDurationMs": 0.2829999999999999,
"taskDurationMs": 406.90999999999997,
"heapDeltaBytes": 18075604
},
{
"name": "dom-widget-clipping",
"durationMs": 610.1699999999823,
"styleRecalcs": 14,
"styleRecalcDurationMs": 14.642,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 368.24,
"heapDeltaBytes": 12646848
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 624.0399999999795,
"styleRecalcs": 52,
"styleRecalcDurationMs": 16.464,
"layouts": 1,
"layoutDurationMs": 0.23300000000000012,
"taskDurationMs": 427.52000000000004,
"heapDeltaBytes": -3182888
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 608.8270000000193,
"styleRecalcs": 49,
"styleRecalcDurationMs": 13.411999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 413.24299999999994,
"heapDeltaBytes": -3800136
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 619.891999999993,
"styleRecalcs": 49,
"styleRecalcDurationMs": 14.592,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 434.36199999999997,
"heapDeltaBytes": -3519832
},
{
"name": "subgraph-idle",
"durationMs": 2024.5990000000234,
"styleRecalcs": 14,
"styleRecalcDurationMs": 15.247999999999998,
"layouts": 1,
"layoutDurationMs": 0.27700000000000014,
"taskDurationMs": 410.75700000000006,
"heapDeltaBytes": 884452
},
{
"name": "subgraph-idle",
"durationMs": 2013.228999999967,
"styleRecalcs": 14,
"styleRecalcDurationMs": 14.084,
"layouts": 1,
"layoutDurationMs": 0.24799999999999994,
"taskDurationMs": 361.317,
"heapDeltaBytes": 1243788
},
{
"name": "subgraph-idle",
"durationMs": 2024.7770000000287,
"styleRecalcs": 11,
"styleRecalcDurationMs": 10.086999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 358.709,
"heapDeltaBytes": 516992
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1769.1499999999678,
"styleRecalcs": 77,
"styleRecalcDurationMs": 38.928000000000004,
"layouts": 16,
"layoutDurationMs": 4.475,
"taskDurationMs": 688.443,
"heapDeltaBytes": -1038496
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1754.3690000000538,
"styleRecalcs": 81,
"styleRecalcDurationMs": 46.895999999999994,
"layouts": 17,
"layoutDurationMs": 5.053999999999999,
"taskDurationMs": 739.291,
"heapDeltaBytes": -373408
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1739.9829999999952,
"styleRecalcs": 77,
"styleRecalcDurationMs": 41.367999999999995,
"layouts": 16,
"layoutDurationMs": 5.053,
"taskDurationMs": 755.1170000000001,
"heapDeltaBytes": -990036
}
]
}🎭 Playwright: 🕵🏻 0 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🔗 Website PreviewWebsite Preview: https://comfy-website-preview-pr-12017.vercel.app This commit: https://website-frontend-baio5imgm-comfyui.vercel.app Last updated: 2026-09-01T08:34:27Z for 📦 Bundle Size
⚡ Performance
🔬 E2E Coverage
|
christian-byrne
left a comment
There was a problem hiding this comment.
The test is supposed to fail and then be fixed by commits in #12019, correct? However, it's passing currently... (indicating a mistaken assumption somewhere).
christian-byrne
left a comment
There was a problem hiding this comment.
Review Summary (6 agents, 13 findings)
General Issues
issue: The implementation handles both SubgraphInput and SubgraphOutput drags (checks SubgraphIONodeBase), but this test only covers dragNewFromSubgraphInput. A regression in output drag handling would go undetected. Consider adding a second test case for dragNewFromSubgraphOutput.
suggestion: (non-blocking) Test asserts drag state and candidate resolution but never exercises the before-drop-on-canvas event handler that actually connects links. A bug in connectToCandidate() could allow the test to pass while actual drop fails.
suggestion: (non-blocking) Test only verifies compatible STRING->STRING match. Consider adding a case with mismatched types to verify incompatible slots are correctly marked compatible: false.
nitpick: (non-blocking) Test calls scope.stop() but doesn't verify state.active returns to false afterward.
Addresses review feedback: #12017 (comment) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add expect assertion before inputs[0].widget access for clarity - Add test for hover changed branch (pointer moves away from widget) Addresses review feedback: #12017 (comment) #12017 (comment) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Addresses review feedback: #12017 (comment) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ad5d3d5 to
3083c58
Compare
- Add expect assertion before inputs[0].widget access for clarity - Add test for hover changed branch (pointer moves away from widget) Addresses review feedback: #12017 (comment) #12017 (comment) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
✅ All contributors have signed the CLA. Thank you! This PR is ready to be merged. |
|
Rebased onto main and reconciled. Addressing the open review points: "Test passes but should fail (fixed by #12019)?" — The premise was off: the #9010 fix lives in this branch's earlier commits (the Supersession found during rebase — main has since added 6-agent summary suggestions — already covered by the current four cases: Local gates green: |
|
Conflict resolved by merging base Three content conflicts, all resolved in favour of the TDD head (this PR's intended state):
Result: base is now an ancestor of head; PR is MERGEABLE (was CONFLICTING/DIRTY). No conflict markers remain. Intended test diff preserved. |
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
Rebase PR #12017 onto current main (d849604), retargeting from stacked base fix/subgraph-io-drag-feedback (#9838) to main directly. Preserves the full 12-file intended diff: - Subgraph drag bridge (useSubgraphDragBridge) + tests - LinkConnector connecting/before-drop events - LinkConnectorEventMap additions - SubgraphInputNode slot-links-changed emission - SlotConnectionDot snap-target styling - useSlotLinkInteraction subgraph snap logic + tests - GraphCanvas wiring Conflicts resolved: - SubgraphInputNode.ts: kept PR's slot-links-changed event emission - SlotConnectionDot.vue: kept PR's larger dots + snap-target hover
6333cfe to
b2d0e4c
Compare
|
Rebased onto current Result: PR is now Conflicts resolved:
Evidence:
|
Rebase/retarget verification — act-fe-12017-rebaseVerified PR state at 2026-09-01T08:41:19Z:
The PR has already been retargeted from |
|
@coderabbitai review |
|
PR Created by the Glary-Bot Agent
Adds a regression test that pins the exact Slack-reported scenario for #9010 / #9838: a canvas-initiated drag from a
SubgraphInputNodeslot should propagate throughuseSubgraphDragBridgeto the VueslotLinkDragUIState, so a Vue node's widget-backed input (e.g. multiline text widget) is marked compatible and resolved as the active drop candidate while hovering its widget surface.What the test asserts
File:
src/renderer/core/canvas/links/useSubgraphDragBridge.test.tsTest:
useSubgraphDragBridge › marks a multiline widget backing input as compatible during subgraph-input canvas dragSubgraphwith oneSTRINGinput slot and a Vue-tracked targetLGraphNodewhose input is widget-backed (inputs[0].widget = { name: 'multiline_prompt' }).layoutStoreand mount a DOM element with.lg-node-widget+data-node-id+data-slot-keyto mirror the multiline widget surface.useSubgraphDragBridge()inside aneffectScope, setuseCanvasStore().canvasto a stub canvas wired to a realLinkConnector, then dispatchlinkConnector.dragNewFromSubgraphInput(...).slotLinkDragUIState.state.active === trueANDstate.compatible.get(slotKey) === true(bridge picked up the canvas-initiated drag from the SubgraphInput).pointermoveover the widget container and advance the RAF batch. Assert the resolved candidate matches the widget-backed input slot withcompatible: true.TDD verification (failing → passing)
Strict TDD as required by the task brief:
Failing state — temporarily early-return from
useSubgraphDragBridge()so the bridge is inert:Passing state — restore the bridge implementation:
Both runs invoked exactly:
pnpm vitest run src/renderer/core/canvas/links/useSubgraphDragBridge.test.ts.Quality gates
pnpm typecheck: passes (full repo)Notes for reviewers of #9838
A separate Oracle review of this branch surfaced two pre-existing concerns in the underlying fix (out of scope for this test-only PR):
useSubgraphDragBridge.tsreadsdragState.candidateinonBeforeDropOnCanvaswithout flushing the RAF batch — a drop in the same frame as a pointer entering a compatible slot can still see a stale/null candidate and fall through to the canvas-drop path.LGraphNode.disconnectInput()andSubgraphInputNode._disconnectNodeInput()both emitnode:slot-links:changedfor widget-backed subgraph inputs on disconnect; the second emission fires afterinput.linkis cleared and can carrylinkId: null.This PR intentionally does not modify the fix; it only adds a regression test pinning the primary reported scenario.
┆Issue is synchronized with this Notion page by Unito