Repository navigation
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughReplaces in-page evaluate usage with Playwright locator APIs and real mouse actions for node/slot interactions; computes canvas→client coordinates for slot clicks; updates breadcrumb testids and component attributes; renames one SubgraphHelper method; and adapts tests to use test-id locators, stronger null assertions, and deterministic waits. Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Test Script
participant Page as Playwright Page
participant App as ComfyUI App (in-page)
participant DOM as Page DOM / Context Menu
Test->>Page: locate slot elements via locator API
Page-->>Test: slot locator(s)
Test->>Page: request slot canvas->client coordinates (evaluate helper)
Page->>App: compute client/screen coordinates (app canvas helpers)
App-->>Page: return coordinates
Test->>Page: perform mouse action (mouse.move / click / dblclick / right-click) at coords
Page->>DOM: native mouse events dispatched
DOM-->>Page: UI updates / context menu appears
Page-->>Test: wait/assert (toHaveCount / visible / locator.waitFor)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🎨 Storybook: ✅ Built — View Storybook |
🎭 Playwright: ❌ 741 passed, 13 failed · 2 flaky❌ Failed Tests📊 Browser Reports
|
📦 Bundle: 5.09 MB gzip 🔴 +86 BDetailsSummary
Category Glance App Entry Points — 22.3 kB (baseline 22.3 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.14 MB (baseline 1.14 MB) • 🔴 +157 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 76.6 kB (baseline 76.6 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed / 2 unchanged Panels & Settings — 484 kB (baseline 484 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 12 unchanged User & Accounts — 17.1 kB (baseline 17.1 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed / 2 unchanged Editors & Dialogs — 109 kB (baseline 109 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 60.3 kB (baseline 60.3 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed / 8 unchanged Data & Services — 2.96 MB (baseline 2.96 MB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 13 added / 13 removed / 4 unchanged Utilities & Hooks — 334 kB (baseline 334 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 13 added / 13 removed / 12 unchanged Vendor & Third-Party — 9.8 MB (baseline 9.8 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 8.43 MB (baseline 8.43 MB) • ⚪ 0 BBundles that do not match a named category
Status: 55 added / 55 removed / 79 unchanged ⚡ Performance ReportNo regressions detected. All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-03-29T01:05:56.618Z",
"gitSha": "64779603e15b114a7bc9acb9d75e2f1f9d9c84f8",
"branch": "drjkl/test/subgraphs-2",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2029.108000000008,
"styleRecalcs": 11,
"styleRecalcDurationMs": 10.081,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 346.049,
"heapDeltaBytes": 20867572,
"heapUsedBytes": 65003180,
"domNodes": 22,
"jsHeapTotalBytes": 22544384,
"scriptDurationMs": 17.878999999999998,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000036
},
{
"name": "canvas-idle",
"durationMs": 2049.3589999999813,
"styleRecalcs": 11,
"styleRecalcDurationMs": 12.331,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 342.419,
"heapDeltaBytes": 20284176,
"heapUsedBytes": 64216748,
"domNodes": 22,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 23.554000000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000036
},
{
"name": "canvas-idle",
"durationMs": 1999.7920000000704,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.328999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 336.408,
"heapDeltaBytes": 20235812,
"heapUsedBytes": 63089232,
"domNodes": 22,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 17.651,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2024.7580000000198,
"styleRecalcs": 84,
"styleRecalcDurationMs": 44.902,
"layouts": 12,
"layoutDurationMs": 3.875,
"taskDurationMs": 1016.6679999999999,
"heapDeltaBytes": 15966868,
"heapUsedBytes": 58714552,
"domNodes": 66,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 138.114,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000073
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1999.6140000000082,
"styleRecalcs": 84,
"styleRecalcDurationMs": 40.181000000000004,
"layouts": 12,
"layoutDurationMs": 3.2369999999999997,
"taskDurationMs": 929.105,
"heapDeltaBytes": 15873296,
"heapUsedBytes": 58751416,
"domNodes": 66,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 125.48200000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2037.183999999911,
"styleRecalcs": 86,
"styleRecalcDurationMs": 41.469,
"layouts": 12,
"layoutDurationMs": 3.207,
"taskDurationMs": 943.2810000000001,
"heapDeltaBytes": 16699260,
"heapUsedBytes": 59102228,
"domNodes": 70,
"jsHeapTotalBytes": 23330816,
"scriptDurationMs": 126.87599999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.659999999999947
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1730.9470000000147,
"styleRecalcs": 30,
"styleRecalcDurationMs": 16.128000000000004,
"layouts": 6,
"layoutDurationMs": 0.601,
"taskDurationMs": 291.33599999999996,
"heapDeltaBytes": 15399792,
"heapUsedBytes": 68158964,
"domNodes": 78,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 24.956,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000036
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1732.627999999977,
"styleRecalcs": 32,
"styleRecalcDurationMs": 16.395,
"layouts": 6,
"layoutDurationMs": 0.561,
"taskDurationMs": 287.84700000000004,
"heapDeltaBytes": 24722300,
"heapUsedBytes": 67245944,
"domNodes": 79,
"jsHeapTotalBytes": 20185088,
"scriptDurationMs": 23.631,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1746.721999999977,
"styleRecalcs": 32,
"styleRecalcDurationMs": 16.654999999999998,
"layouts": 6,
"layoutDurationMs": 0.639,
"taskDurationMs": 295.253,
"heapDeltaBytes": 24879500,
"heapUsedBytes": 67409564,
"domNodes": 80,
"jsHeapTotalBytes": 20447232,
"scriptDurationMs": 25.747000000000003,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.659999999999947
},
{
"name": "dom-widget-clipping",
"durationMs": 603.2820000000072,
"styleRecalcs": 12,
"styleRecalcDurationMs": 8.837,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 366.157,
"heapDeltaBytes": 6553460,
"heapUsedBytes": 49085024,
"domNodes": 20,
"jsHeapTotalBytes": 12582912,
"scriptDurationMs": 74.19400000000002,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.67999999999997
},
{
"name": "dom-widget-clipping",
"durationMs": 556.617000000017,
"styleRecalcs": 13,
"styleRecalcDurationMs": 14.765,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 351.996,
"heapDeltaBytes": 6781520,
"heapUsedBytes": 49230928,
"domNodes": 21,
"jsHeapTotalBytes": 12582912,
"scriptDurationMs": 64.101,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000027
},
{
"name": "dom-widget-clipping",
"durationMs": 538.1780000000163,
"styleRecalcs": 15,
"styleRecalcDurationMs": 11.016,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 323.741,
"heapDeltaBytes": 6842024,
"heapUsedBytes": 49194900,
"domNodes": 25,
"jsHeapTotalBytes": 13107200,
"scriptDurationMs": 61.447,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.65999999999999
},
{
"name": "large-graph-idle",
"durationMs": 2055.0190000000157,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.327000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 519,
"heapDeltaBytes": 4989252,
"heapUsedBytes": 56195920,
"domNodes": -257,
"jsHeapTotalBytes": 16191488,
"scriptDurationMs": 97.06700000000001,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "large-graph-idle",
"durationMs": 2012.0650000000069,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.334999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 513.387,
"heapDeltaBytes": 3889332,
"heapUsedBytes": 54537140,
"domNodes": -257,
"jsHeapTotalBytes": 16453632,
"scriptDurationMs": 92.671,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "large-graph-idle",
"durationMs": 2025.6239999999934,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.265000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 519.733,
"heapDeltaBytes": 4106260,
"heapUsedBytes": 55463616,
"domNodes": -260,
"jsHeapTotalBytes": 16453632,
"scriptDurationMs": 96.009,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000073
},
{
"name": "large-graph-pan",
"durationMs": 2105.280999999991,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.761000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1023.1870000000001,
"heapDeltaBytes": 17217344,
"heapUsedBytes": 70830108,
"domNodes": -262,
"jsHeapTotalBytes": 18231296,
"scriptDurationMs": 386.163,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "large-graph-pan",
"durationMs": 2138.859000000025,
"styleRecalcs": 70,
"styleRecalcDurationMs": 16.299999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1032.0620000000001,
"heapDeltaBytes": 18124636,
"heapUsedBytes": 70204208,
"domNodes": -259,
"jsHeapTotalBytes": 18493440,
"scriptDurationMs": 391.944,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "large-graph-pan",
"durationMs": 2115.2150000000347,
"styleRecalcs": 67,
"styleRecalcDurationMs": 14.397999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1030.164,
"heapDeltaBytes": 17686404,
"heapUsedBytes": 75326520,
"domNodes": -262,
"jsHeapTotalBytes": 19570688,
"scriptDurationMs": 382.60299999999995,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "large-graph-zoom",
"durationMs": 3133.8739999999916,
"styleRecalcs": 66,
"styleRecalcDurationMs": 15.954999999999997,
"layouts": 60,
"layoutDurationMs": 6.966000000000001,
"taskDurationMs": 1280.092,
"heapDeltaBytes": 6780632,
"heapUsedBytes": 61803936,
"domNodes": -264,
"jsHeapTotalBytes": 17240064,
"scriptDurationMs": 481.739,
"eventListeners": -123,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000036
},
{
"name": "large-graph-zoom",
"durationMs": 3164.537999999993,
"styleRecalcs": 66,
"styleRecalcDurationMs": 16.266000000000002,
"layouts": 60,
"layoutDurationMs": 6.917999999999998,
"taskDurationMs": 1256.867,
"heapDeltaBytes": 7171164,
"heapUsedBytes": 61584060,
"domNodes": -262,
"jsHeapTotalBytes": 17240064,
"scriptDurationMs": 470.83899999999994,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "large-graph-zoom",
"durationMs": 3160.6270000000904,
"styleRecalcs": 67,
"styleRecalcDurationMs": 16.866,
"layouts": 60,
"layoutDurationMs": 6.728,
"taskDurationMs": 1276.6259999999997,
"heapDeltaBytes": 7067784,
"heapUsedBytes": 61515080,
"domNodes": -262,
"jsHeapTotalBytes": 18026496,
"scriptDurationMs": 478.948,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000036
},
{
"name": "minimap-idle",
"durationMs": 2017.583000000002,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.785000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 520.125,
"heapDeltaBytes": 4115624,
"heapUsedBytes": 56382852,
"domNodes": -257,
"jsHeapTotalBytes": 16715776,
"scriptDurationMs": 92.688,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "minimap-idle",
"durationMs": 2019.1300000000183,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.018000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 512.849,
"heapDeltaBytes": 4439056,
"heapUsedBytes": 56414208,
"domNodes": -257,
"jsHeapTotalBytes": 16453632,
"scriptDurationMs": 94.45299999999999,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000036
},
{
"name": "minimap-idle",
"durationMs": 2013.133000000039,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.852000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 501.45400000000006,
"heapDeltaBytes": 2324920,
"heapUsedBytes": 56395548,
"domNodes": -263,
"jsHeapTotalBytes": 16453632,
"scriptDurationMs": 88.57399999999998,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000036
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 567.3469999999838,
"styleRecalcs": 49,
"styleRecalcDurationMs": 12.183000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 351.204,
"heapDeltaBytes": 6611532,
"heapUsedBytes": 49365272,
"domNodes": 23,
"jsHeapTotalBytes": 14417920,
"scriptDurationMs": 122.755,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 541.3500000000226,
"styleRecalcs": 50,
"styleRecalcDurationMs": 12.822000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 352.67199999999997,
"heapDeltaBytes": 6850724,
"heapUsedBytes": 49486472,
"domNodes": 25,
"jsHeapTotalBytes": 12582912,
"scriptDurationMs": 122.70100000000001,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 546.2380000000167,
"styleRecalcs": 50,
"styleRecalcDurationMs": 12.759000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 356.754,
"heapDeltaBytes": 6997052,
"heapUsedBytes": 49674492,
"domNodes": 25,
"jsHeapTotalBytes": 12845056,
"scriptDurationMs": 124.82100000000001,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "subgraph-idle",
"durationMs": 2004.9459999999897,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.453,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 328.844,
"heapDeltaBytes": 19845320,
"heapUsedBytes": 62917212,
"domNodes": 22,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 17.816,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000036
},
{
"name": "subgraph-idle",
"durationMs": 2022.4869999999555,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.496999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 330.712,
"heapDeltaBytes": 19842916,
"heapUsedBytes": 62934192,
"domNodes": 22,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 17.105999999999995,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "subgraph-idle",
"durationMs": 2020.6620000000157,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.547999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 326.284,
"heapDeltaBytes": 19911780,
"heapUsedBytes": 63001260,
"domNodes": 22,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 17.083000000000006,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1689.914000000016,
"styleRecalcs": 77,
"styleRecalcDurationMs": 33.891,
"layouts": 16,
"layoutDurationMs": 4.146,
"taskDurationMs": 632.821,
"heapDeltaBytes": 12301104,
"heapUsedBytes": 56183848,
"domNodes": 64,
"jsHeapTotalBytes": 23330816,
"scriptDurationMs": 95.081,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1978.8209999999822,
"styleRecalcs": 84,
"styleRecalcDurationMs": 44.909000000000006,
"layouts": 16,
"layoutDurationMs": 4.42,
"taskDurationMs": 882.039,
"heapDeltaBytes": 12276144,
"heapUsedBytes": 56600792,
"domNodes": 73,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 93.779,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000036
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1972.5879999999734,
"styleRecalcs": 84,
"styleRecalcDurationMs": 41.44499999999999,
"layouts": 16,
"layoutDurationMs": 4.020999999999999,
"taskDurationMs": 867.0880000000001,
"heapDeltaBytes": 11820856,
"heapUsedBytes": 54837308,
"domNodes": 73,
"jsHeapTotalBytes": 22544384,
"scriptDurationMs": 95.37,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000073
},
{
"name": "viewport-pan-sweep",
"durationMs": 8160.201000000001,
"styleRecalcs": 251,
"styleRecalcDurationMs": 41.936,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3661.226,
"heapDeltaBytes": 26957240,
"heapUsedBytes": 77517000,
"domNodes": -256,
"jsHeapTotalBytes": 21901312,
"scriptDurationMs": 1306.7169999999999,
"eventListeners": -111,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000073
},
{
"name": "viewport-pan-sweep",
"durationMs": 8181.267000000048,
"styleRecalcs": 251,
"styleRecalcDurationMs": 42.535,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3547.107,
"heapDeltaBytes": 26475972,
"heapUsedBytes": 77053140,
"domNodes": -255,
"jsHeapTotalBytes": 19279872,
"scriptDurationMs": 1249.41,
"eventListeners": -107,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999989
},
{
"name": "viewport-pan-sweep",
"durationMs": 8125.737999999956,
"styleRecalcs": 250,
"styleRecalcDurationMs": 41.406,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3514.972,
"heapDeltaBytes": 21395204,
"heapUsedBytes": 71526820,
"domNodes": -255,
"jsHeapTotalBytes": 21114880,
"scriptDurationMs": 1210.906,
"eventListeners": -107,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000036
},
{
"name": "vue-large-graph-idle",
"durationMs": 12422.097000000009,
"styleRecalcs": 3,
"styleRecalcDurationMs": 27.34700000000001,
"layouts": 2,
"layoutDurationMs": 9.59399999999999,
"taskDurationMs": 12406.474,
"heapDeltaBytes": -12294976,
"heapUsedBytes": 166128644,
"domNodes": -4995,
"jsHeapTotalBytes": 57237504,
"scriptDurationMs": 564.573,
"eventListeners": 3526,
"totalBlockingTimeMs": 880,
"frameDurationMs": 18.329999999999927
},
{
"name": "vue-large-graph-idle",
"durationMs": 12508.280999999954,
"styleRecalcs": 3,
"styleRecalcDurationMs": 29.757000000000005,
"layouts": 2,
"layoutDurationMs": 12.567999999999996,
"taskDurationMs": 12489.593,
"heapDeltaBytes": -2440340,
"heapUsedBytes": 149951956,
"domNodes": -4993,
"jsHeapTotalBytes": 52518912,
"scriptDurationMs": 566.373,
"eventListeners": 3530,
"totalBlockingTimeMs": 865,
"frameDurationMs": 18.329999999999927
},
{
"name": "vue-large-graph-idle",
"durationMs": 12576.483000000053,
"styleRecalcs": 2,
"styleRecalcDurationMs": 28.10499999999999,
"layouts": 2,
"layoutDurationMs": 9.941000000000006,
"taskDurationMs": 12556.646999999999,
"heapDeltaBytes": 13910312,
"heapUsedBytes": 166185436,
"domNodes": -4997,
"jsHeapTotalBytes": 56975360,
"scriptDurationMs": 580.047,
"eventListeners": 3530,
"totalBlockingTimeMs": 889,
"frameDurationMs": 18.340000000000146
},
{
"name": "vue-large-graph-pan",
"durationMs": 14107.955000000004,
"styleRecalcs": 67,
"styleRecalcDurationMs": 13.007999999999992,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14088.817999999997,
"heapDeltaBytes": -59636516,
"heapUsedBytes": 147196480,
"domNodes": -8333,
"jsHeapTotalBytes": -434176,
"scriptDurationMs": 869.616,
"eventListeners": -16488,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.340000000000146
},
{
"name": "vue-large-graph-pan",
"durationMs": 14048.081999999966,
"styleRecalcs": 65,
"styleRecalcDurationMs": 12.865999999999989,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14027.594999999998,
"heapDeltaBytes": -35524604,
"heapUsedBytes": 171182088,
"domNodes": -8333,
"jsHeapTotalBytes": -3141632,
"scriptDurationMs": 838.792,
"eventListeners": -16460,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.329999999999927
},
{
"name": "vue-large-graph-pan",
"durationMs": 13476.720000000001,
"styleRecalcs": 64,
"styleRecalcDurationMs": 12.537999999999993,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13455.859,
"heapDeltaBytes": -23079820,
"heapUsedBytes": 186176212,
"domNodes": -8333,
"jsHeapTotalBytes": 28315648,
"scriptDurationMs": 824.65,
"eventListeners": -16460,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.33000000000029
},
{
"name": "workflow-execution",
"durationMs": 445.4850000000192,
"styleRecalcs": 19,
"styleRecalcDurationMs": 27.156,
"layouts": 6,
"layoutDurationMs": 1.722,
"taskDurationMs": 130.15300000000002,
"heapDeltaBytes": 4792540,
"heapUsedBytes": 49860244,
"domNodes": 167,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 29.412999999999993,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.65999999999999
},
{
"name": "workflow-execution",
"durationMs": 456.6859999999906,
"styleRecalcs": 16,
"styleRecalcDurationMs": 21.314,
"layouts": 5,
"layoutDurationMs": 1.198,
"taskDurationMs": 117.965,
"heapDeltaBytes": 4481364,
"heapUsedBytes": 48983500,
"domNodes": 156,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 28.726000000000003,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.65999999999999
},
{
"name": "workflow-execution",
"durationMs": 442.61100000005626,
"styleRecalcs": 16,
"styleRecalcDurationMs": 20.031999999999996,
"layouts": 5,
"layoutDurationMs": 1.258,
"taskDurationMs": 114.339,
"heapDeltaBytes": 4482744,
"heapUsedBytes": 49009084,
"domNodes": 156,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 27.561999999999998,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000027
}
]
} |
…ight interactions - Replace synthetic CanvasPointerEvent dispatch with real page.mouse clicks - Split interactWithSubgraphSlot into getSlotScreenPositions + rightClickSlot + doubleClickSlot - Replace isInSubgraph evaluate with breadcrumb visibility check - Remove silent evaluate fallback from exitViaBreadcrumb - Replace 3 evaluateAll/evaluate/waitForFunction in VueNodeHelpers with locator API - Replace brittle CSS selectors with data-testid locators - Replace getNodeCount and findSubgraphNodeId with DOM-based approaches - Add data-testid to SubgraphBreadcrumbItem.vue - Remove debug console.warn from NodeSlotReference Amp-Thread-ID: https://ampcode.com/threads/T-019d32eb-d58e-734b-b3f1-3036334fa774 Co-authored-by: Amp <amp@ampcode.com>
2c5f16b to
a13c333
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@browser_tests/fixtures/helpers/SubgraphHelper.ts`:
- Around line 388-390: getNodeCount() and findSubgraphNodeId() currently assume
Vue DOM elements ([data-node-id], subgraph-enter-button) exist; when
Comfy.VueNodes.Enabled is false these should fall back to the internal graph
model. Update getNodeCount() to return the count of [data-node-id] if present,
otherwise query the page's graph model (e.g., use the same model accessor used
elsewhere in this helper) to count nodes; update findSubgraphNodeId() to first
try locating the Vue-node button/attribute and if not found, search the graph
model for a node with matching properties/label and return its id. Ensure you
reference the helper methods getNodeCount and findSubgraphNodeId and the DOM
token subgraph-enter-button in your changes so callers in
browser_tests/tests/subgraph.spec.ts work with both VueNodes and LiteGraph.
- Around line 70-87: When handling the 'rightClick' branch you must convert
slot.pos from subgraph/local coordinates to canvas coordinates before calling
canvasPosToClientPos; update the block that checks action === 'rightClick' to
run slot.pos through app.canvas.ds.convertOffsetToCanvas (or the equivalent
conversion helper used elsewhere) to produce canvasX/canvasY, then feed those
into app.canvasPosToClientPos and push the client coords into results (same
place where canvasPosToClientPos is currently called for the boundingRect path).
In `@browser_tests/tests/subgraph.spec.ts`:
- Around line 447-453: The test currently finds the clone target via the DOM
locator comfyPage.page.locator('[data-node-id]') which only exists when
Comfy.VueNodes.Enabled is true; for LiteGraph runs this fails before clipboard
assertions. Fix by either enabling the Vue nodes flag for this describe (set
Comfy.VueNodes.Enabled for this test setup) or avoid DOM lookup and instead
obtain a node ID from the graph model and pass that into
comfyPage.nodeOps.getNodeRefById (use the graph-side API on comfyPage/nodeOps to
list or access nodes and pick an ID rather than using the DOM locator).
In `@browser_tests/tests/subgraphLifecycle.spec.ts`:
- Around line 313-315: The assertion using
comfyPage.page.locator('[data-node-id="7"]') is mode-dependent because the test
doesn't enable Comfy.VueNodes.Enabled and in LiteGraph that locator can already
be absent; update the test to either opt into the Vue nodes mode (enable the
Comfy.VueNodes.Enabled feature for this test before unpacking) or replace the
DOM-based check with a graph-model assertion that verifies node id 7 is removed
from the internal model (e.g., assert via the graph state helper or API used
elsewhere in this spec that node 7 does not exist) so the removal is validated
reliably across modes.
In `@browser_tests/tests/subgraphPromotion.spec.ts`:
- Around line 562-571: The test discovers subgraph nodes by querying
comfyPage.page.getByTestId(TestIds.widgets.subgraphEnterButton) and walking to
an ancestor with data-node-id, which only works when Vue nodes are enabled;
enable Comfy.VueNodes.Enabled for this describe block or else use the
graph-model ID lookup instead: either set the Comfy.VueNodes.Enabled flag in the
test setup where subgraphNodeIds is built, or replace the ancestor data-node-id
lookup with the graph model API (the same lookup used elsewhere) to populate
subgraphNodeIds so the test passes in LiteGraph runs; update the setup around
comfyPage, TestIds.widgets.subgraphEnterButton, and subgraphNodeIds accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 525d5c7a-5551-403c-aebd-0aadb11acbfa
📒 Files selected for processing (8)
browser_tests/fixtures/VueNodeHelpers.tsbrowser_tests/fixtures/helpers/SubgraphHelper.tsbrowser_tests/fixtures/selectors.tsbrowser_tests/fixtures/utils/litegraphUtils.tsbrowser_tests/tests/subgraph.spec.tsbrowser_tests/tests/subgraphLifecycle.spec.tsbrowser_tests/tests/subgraphPromotion.spec.tssrc/components/breadcrumb/SubgraphBreadcrumbItem.vue
| async getNodeCount(): Promise<number> { | ||
| return this.page.evaluate(() => { | ||
| return window.app!.canvas.graph!.nodes?.length || 0 | ||
| }) | ||
| return this.page.locator('[data-node-id]').count() | ||
| } |
There was a problem hiding this comment.
These helpers no longer work when only LiteGraph nodes are rendered.
getNodeCount() and findSubgraphNodeId() now assume Vue-node DOM ([data-node-id] / subgraph-enter-button) exists, but existing callers such as browser_tests/tests/subgraph.spec.ts still use comfyPage.subgraph.getNodeCount() in describes that never enable Comfy.VueNodes.Enabled. In LiteGraph runs that collapses the count to 0, and findSubgraphNodeId() has no fallback discovery path. Please keep a graph-model fallback when the Vue DOM is absent.
Suggested fallback
async getNodeCount(): Promise<number> {
- return this.page.locator('[data-node-id]').count()
+ const domCount = await this.page.locator('[data-node-id]').count()
+ if (domCount > 0) {
+ return domCount
+ }
+ return this.page.evaluate(() => window.app!.canvas.graph!.nodes.length)
}
@@
async findSubgraphNodeId(): Promise<string> {
const enterButton = this.page
.getByTestId(TestIds.widgets.subgraphEnterButton)
.first()
const nodeEl = enterButton
.locator('xpath=ancestor::*[`@data-node-id`]')
.first()
const id = await nodeEl.getAttribute('data-node-id')
- if (!id) throw new Error('No subgraph node found in current graph')
- return id
+ if (id) {
+ return id
+ }
+
+ return this.page.evaluate(() => {
+ const subgraphNode = window.app!.canvas.graph!.nodes.find(
+ (node) =>
+ typeof node.isSubgraphNode === 'function' &&
+ node.isSubgraphNode()
+ )
+ if (!subgraphNode) {
+ throw new Error('No subgraph node found in current graph')
+ }
+ return String(subgraphNode.id)
+ })
}Also applies to: 426-433
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@browser_tests/fixtures/helpers/SubgraphHelper.ts` around lines 388 - 390,
getNodeCount() and findSubgraphNodeId() currently assume Vue DOM elements
([data-node-id], subgraph-enter-button) exist; when Comfy.VueNodes.Enabled is
false these should fall back to the internal graph model. Update getNodeCount()
to return the count of [data-node-id] if present, otherwise query the page's
graph model (e.g., use the same model accessor used elsewhere in this helper) to
count nodes; update findSubgraphNodeId() to first try locating the Vue-node
button/attribute and if not found, search the graph model for a node with
matching properties/label and return its id. Ensure you reference the helper
methods getNodeCount and findSubgraphNodeId and the DOM token
subgraph-enter-button in your changes so callers in
browser_tests/tests/subgraph.spec.ts work with both VueNodes and LiteGraph.
- Rename convertDefaultKSamplerToSubgraph to loadDefaultAndConvertKSamplerToSubgraph - Remove redundant nextFrame() after convertToSubgraph (already called internally) - Add dispose() calls after collectConsoleWarnings assertions - Add explicit null guards on getSlotLabel() before non-null assertions Amp-Thread-ID: https://ampcode.com/threads/T-019d3651-bd02-760c-9542-a2fbe03e051a Co-authored-by: Amp <amp@ampcode.com>
| ): Promise<void> { | ||
| const foundSlot = await this.page.evaluate( | ||
| async (params) => { | ||
| ): Promise<{ x: number; y: number; slotName: string }[]> { |
There was a problem hiding this comment.
nit: prefer a type like CanvasPosition for expressiveness and reusability
| @@ -47,7 +35,6 @@ | |||
|
|
|||
| const subgraph = currentGraph as Subgraph | |||
There was a problem hiding this comment.
nit: add a helper "isInSubgraph" so we maintain the expressiveness that this comment was providing before then use it here.
| app.canvas.pointer.onDoubleClick( | ||
| event as Partial<CanvasPointerEvent> as CanvasPointerEvent | ||
| ) | ||
| if (action === 'rightClick') { |
There was a problem hiding this comment.
nit: use composable functions and higher-order composed public methods rather than functions with special cases
| event as Partial<CanvasPointerEvent> as CanvasPointerEvent | ||
| ) | ||
| if (action === 'rightClick') { | ||
| if (!slot.pos) continue |
There was a problem hiding this comment.
question: Should this actually be silently continuing or actually throwing?
| const rect = slot.boundingRect | ||
| canvasX = rect[0] + rect[2] / 2 | ||
| canvasY = rect[1] + rect[3] / 2 |
There was a problem hiding this comment.
nit: would be good to use shared helper for this coordinate conversion operation for expressiveness and reusability.
| }) | ||
|
|
||
| const breadcrumb = comfyPage.page.locator(SELECTORS.breadcrumb) | ||
| const breadcrumb = comfyPage.page.getByTestId(TestIds.breadcrumb.subgraph) |
There was a problem hiding this comment.
nit: move to page object (all breadcrumb locating code in this PR).
| const subgraphTextarea = comfyPage.page.getByTestId( | ||
| TestIds.widgets.domWidgetTextarea | ||
| ) |
There was a problem hiding this comment.
nit: move to shared helper or object (all text area locating code in this PR).
| return !!window.app!.graph!.getNodeById('7') | ||
| }) | ||
| expect(firstNodeExists).toBe(false) | ||
| await expect(comfyPage.page.locator('[data-node-id="7"]')).toHaveCount( |
There was a problem hiding this comment.
super nit: move to shared helper for getting a node and then even possibly use typed strings for the argument like "NodeIdLocator: "[data-node-id=`.... etc."
https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html
| const enterButtons = comfyPage.page.getByTestId( | ||
| TestIds.widgets.subgraphEnterButton | ||
| ) |
There was a problem hiding this comment.
same as comments on breadcrumbs and text areas.
| const allButtons = await enterButtons.all() | ||
| const subgraphNodeIds: string[] = [] | ||
| for (const btn of allButtons) { | ||
| const nodeEl = btn.locator('xpath=ancestor::*[@data-node-id]').first() | ||
| const id = await nodeEl.getAttribute('data-node-id') | ||
| if (id) subgraphNodeIds.push(id) | ||
| } |
There was a problem hiding this comment.
nit: move to helper
isInSubgraph, exitViaBreadcrumb, getNodeCount, and delete now use DOM-first with page.evaluate fallback when UseNewMenu is Disabled. Amp-Thread-ID: https://ampcode.com/threads/T-019d368d-bb9c-74f6-8b34-71cef5e40054 Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
browser_tests/fixtures/helpers/SubgraphHelper.ts (1)
118-132: Consider using Playwright's locator-based waiting pattern.The
waitForSelector+.then().catch()chain works but doesn't follow the Playwright best practice of using locator-based waiting. This could be simplified withlocator.waitFor().Suggested refactor
- const menuVisible = await this.page - .waitForSelector('.litemenu-entry', { - state: 'visible', - timeout: 1000 - }) - .then(() => true) - .catch(() => false) + const menuLocator = this.page.locator('.litemenu-entry') + const menuVisible = await menuLocator + .waitFor({ state: 'visible', timeout: 1000 }) + .then(() => true) + .catch(() => false)As per coding guidelines: "Refer to
docs/guidance/playwright.mdfor Playwright best practices"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/helpers/SubgraphHelper.ts` around lines 118 - 132, Replace the waitForSelector + then/catch pattern with Playwright's locator-based waiting: create a locator for '.litemenu-entry' (use the existing usage context where menuVisible is computed), call locator.waitFor({ state: 'visible', timeout: 1000 }) inside a try/catch and return early if it succeeds, and if it throws fallback to locator.waitFor({ state: 'visible', timeout: 5000 }) instead of calling this.page.waitForSelector; update usages of menuVisible and this.page.waitForSelector accordingly so the code uses the locator API.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@browser_tests/fixtures/helpers/SubgraphHelper.ts`:
- Around line 118-132: Replace the waitForSelector + then/catch pattern with
Playwright's locator-based waiting: create a locator for '.litemenu-entry' (use
the existing usage context where menuVisible is computed), call
locator.waitFor({ state: 'visible', timeout: 1000 }) inside a try/catch and
return early if it succeeds, and if it throws fallback to locator.waitFor({
state: 'visible', timeout: 5000 }) instead of calling this.page.waitForSelector;
update usages of menuVisible and this.page.waitForSelector accordingly so the
code uses the locator API.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ef4f69df-687c-440f-8574-6b9186cf9d7e
📒 Files selected for processing (7)
browser_tests/fixtures/helpers/SubgraphHelper.tsbrowser_tests/fixtures/utils/litegraphUtils.tsbrowser_tests/tests/subgraph-promoted-widget-dom.spec.tsbrowser_tests/tests/subgraph.spec.tsbrowser_tests/tests/subgraphLegacyPrefixedProxyWidgets.spec.tsbrowser_tests/tests/subgraphNestedConfigureOrder.spec.tsbrowser_tests/tests/subgraphSearchAliases.spec.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- browser_tests/fixtures/utils/litegraphUtils.ts
- Add convertOffsetToCanvas() for slot.pos in rightClick branch - Restore page.evaluate fallback in findSubgraphNodeId() - Replace DOM-only lookups with graph-model queries in specs Amp-Thread-ID: https://ampcode.com/threads/T-019d36b1-19c4-75ed-924c-5eaea2f3a90c Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
browser_tests/fixtures/helpers/SubgraphHelper.ts (1)
332-345:⚠️ Potential issue | 🟠 MajorKeep
exitViaBreadcrumb()UI-only.The
canvas.setGraph(graph.rootGraph)fallback makes breadcrumb regressions invisible: if the breadcrumb never renders or its click handler breaks, callers still leave the subgraph and the test stays green. If you still need a non-UI escape hatch, split it into a separately named helper and let this method fail whenTestIds.breadcrumb.rootis unavailable.Suggested tightening
async exitViaBreadcrumb(): Promise<void> { const breadcrumb = this.page.getByTestId(TestIds.breadcrumb.subgraph) const rootItem = breadcrumb.getByTestId(TestIds.breadcrumb.root) - if (await rootItem.isVisible().catch(() => false)) { - await rootItem.click() - } else { - await this.page.evaluate(() => { - const canvas = window.app!.canvas - const graph = canvas.graph - if (!graph) return - canvas.setGraph(graph.rootGraph) - }) - } + await expect(rootItem).toBeVisible() + await rootItem.click() await this.comfyPage.nextFrame() await expect.poll(async () => this.isInSubgraph()).toBe(false) }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/helpers/SubgraphHelper.ts` around lines 332 - 345, The exitViaBreadcrumb method currently uses a JS fallback (canvas.setGraph(graph.rootGraph)) when TestIds.breadcrumb.root is not visible, which hides breadcrumb regressions; remove the page.evaluate fallback so exitViaBreadcrumb (which queries TestIds.breadcrumb.subgraph and TestIds.breadcrumb.root) remains UI-only and fails when the root breadcrumb is unavailable, and if a non-UI escape hatch is required add a separately named helper (e.g., exitViaBreadcrumbForce or forceExitSubgraph) that explicitly performs the canvas.setGraph(graph.rootGraph) behavior.
🧹 Nitpick comments (1)
browser_tests/tests/subgraph.spec.ts (1)
451-458: Pick a stable interior node instead ofnodes[0].This test is now tied to graph serialization order, so a fixture shuffle can make it clone a different node—or even one of the synthetic subgraph scaffold nodes—without changing the behavior under test. Targeting a known interior node from
subgraphs/basic-subgraphkeeps the copy/paste assertion focused.Possible cleanup
- const firstNodeId = await comfyPage.page.evaluate(() => { - const nodes = window.app!.canvas.graph!.nodes - return nodes?.[0]?.id != null ? String(nodes[0].id) : null - }) - expect(firstNodeId).not.toBeNull() - - const nodeToClone = await comfyPage.nodeOps.getNodeRefById(firstNodeId!) + const [nodeToClone] = await comfyPage.nodeOps.getNodeRefsByType( + 'VAEEncode', + true + ) + if (!nodeToClone) { + throw new Error('Expected a VAEEncode node inside basic-subgraph') + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/subgraph.spec.ts` around lines 451 - 458, The test currently grabs nodes[0] which is brittle; instead evaluate the graph to find a stable interior node from the test fixture (e.g., find a node whose type/metadata/label identifies it as the interior node from "subgraphs/basic-subgraph") and return that node's id into firstNodeId. Then use comfyPage.nodeOps.getNodeRefById(firstNodeId) and continue to click as before; update the evaluate lambda (and the variable firstNodeId) to search nodes.find(n => /* match on stable property such as n.label, n.type, n.subgraphId, or n.meta.name that corresponds to the basic-subgraph interior node */) rather than using nodes[0].
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@browser_tests/fixtures/helpers/SubgraphHelper.ts`:
- Around line 332-345: The exitViaBreadcrumb method currently uses a JS fallback
(canvas.setGraph(graph.rootGraph)) when TestIds.breadcrumb.root is not visible,
which hides breadcrumb regressions; remove the page.evaluate fallback so
exitViaBreadcrumb (which queries TestIds.breadcrumb.subgraph and
TestIds.breadcrumb.root) remains UI-only and fails when the root breadcrumb is
unavailable, and if a non-UI escape hatch is required add a separately named
helper (e.g., exitViaBreadcrumbForce or forceExitSubgraph) that explicitly
performs the canvas.setGraph(graph.rootGraph) behavior.
---
Nitpick comments:
In `@browser_tests/tests/subgraph.spec.ts`:
- Around line 451-458: The test currently grabs nodes[0] which is brittle;
instead evaluate the graph to find a stable interior node from the test fixture
(e.g., find a node whose type/metadata/label identifies it as the interior node
from "subgraphs/basic-subgraph") and return that node's id into firstNodeId.
Then use comfyPage.nodeOps.getNodeRefById(firstNodeId) and continue to click as
before; update the evaluate lambda (and the variable firstNodeId) to search
nodes.find(n => /* match on stable property such as n.label, n.type,
n.subgraphId, or n.meta.name that corresponds to the basic-subgraph interior
node */) rather than using nodes[0].
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5b36e421-a016-47ca-b3fc-6f9ac89089a4
📒 Files selected for processing (4)
browser_tests/fixtures/helpers/SubgraphHelper.tsbrowser_tests/tests/subgraph.spec.tsbrowser_tests/tests/subgraphLifecycle.spec.tsbrowser_tests/tests/subgraphPromotion.spec.ts
✅ Files skipped from review due to trivial changes (2)
- browser_tests/tests/subgraphPromotion.spec.ts
- browser_tests/tests/subgraphLifecycle.spec.ts
- boundingRect is also in graph-local coords, not canvas coords - Remove breadcrumb check from isInSubgraph (stale after Escape) Amp-Thread-ID: https://ampcode.com/threads/T-019d36b1-19c4-75ed-924c-5eaea2f3a90c Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
browser_tests/fixtures/helpers/SubgraphHelper.ts (1)
75-81: Consider validating thatboundingRecthas been populated.
slot.boundingRectis always initialized to aRectangleinstance perSlotBase.ts, so the!slot.boundingRectcheck will pass even when the rectangle hasn't been populated with actual dimensions (zeros). If this code runs before the slot has been rendered, the center calculation would yield(0, 0).This is likely fine in practice since tests call these helpers after rendering, but a defensive check could prevent subtle flakiness:
🛡️ Optional defensive check
} else { - if (!slot.boundingRect) { + if (!slot.boundingRect || slot.boundingRect[2] === 0) { throw new Error(`${slotType} slot bounding rect not found`) } const rect = slot.boundingRect🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/helpers/SubgraphHelper.ts` around lines 75 - 81, The current check uses if (!slot.boundingRect) but SlotBase initializes boundingRect to a Rectangle (possibly zeros), so guard against unpopulated rectangles by verifying the rect contains real dimensions before computing center: access slot.boundingRect into rect and assert rect[2] and rect[3] (width/height) are > 0 (or that rect values are not all zero); if not, either throw a clearer error referencing slotType and slot.id or wait/retry as appropriate; update the logic around offsetX/offsetY calculation in SubgraphHelper.ts to use this validated rect.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@browser_tests/fixtures/helpers/SubgraphHelper.ts`:
- Around line 75-81: The current check uses if (!slot.boundingRect) but SlotBase
initializes boundingRect to a Rectangle (possibly zeros), so guard against
unpopulated rectangles by verifying the rect contains real dimensions before
computing center: access slot.boundingRect into rect and assert rect[2] and
rect[3] (width/height) are > 0 (or that rect values are not all zero); if not,
either throw a clearer error referencing slotType and slot.id or wait/retry as
appropriate; update the logic around offsetX/offsetY calculation in
SubgraphHelper.ts to use this validated rect.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: cf793308-6699-42a7-9a86-0539199e5c54
📒 Files selected for processing (1)
browser_tests/fixtures/helpers/SubgraphHelper.ts
- Rename getSlotScreenPositions action param to coordinateSource - Replace waitForSelector with locator.waitFor() in rightClickSlot - Replace redundant trailing waitForSelector with descriptive error - Migrate missed .p-breadcrumb-list selector to TestIds.breadcrumb.root - Replace force:true click with dispatchEvent in delete() - Wrap dispose() calls in try/finally for console warning tests - Remove unnecessary .catch on isVisible() in exitViaBreadcrumb - Add comments explaining DOM-first strategy in getNodeCount() Amp-Thread-ID: https://ampcode.com/threads/T-019d36ed-0ac0-7093-b695-47e2950a5c51 Co-authored-by: Amp <amp@ampcode.com>
…readcrumb getter, rename var Amp-Thread-ID: https://ampcode.com/threads/T-019d36f8-0597-7259-a52f-f49e95e9b213 Co-authored-by: Amp <amp@ampcode.com>
|
Going to close this and approach it from a different direction. |
Summary
Replace synthetic event dispatch and unnecessary
page.evaluatecalls in subgraph browser tests with real Playwright interactions and DOM-based locators.Changes
High Impact
CanvasPointerEventdispatch with realpage.mouseclicks —interactWithSubgraphSlotwas constructing fake events and callingnode.onPointerDown()directly, bypassing the browser event pipeline. Tests now use real mouse events at screen-translated coordinates.exitViaBreadcrumbfallback — was falling back to programmaticcanvas.setGraph()when breadcrumb wasn't visible, masking UI failures.isInSubgraphevaluate with breadcrumb visibility check — 2 implementation sites converted from internal graph state query to DOM locator.Medium Impact
evaluateAll/evaluate/waitForFunctioninVueNodeHelperswith Playwright locator API.lg-node-header,.comfy-multiline-input,.subgraph-breadcrumb,.lg-node-widgets > div) withgetByTestId()getNodeCountandfindSubgraphNodeIdwith DOM-based approachesdata-testidtoSubgraphBreadcrumbItem.vueCleanup
console.warnfromNodeSlotReference.getPositionCanvasPointerEventimportEvaluate Call Impact
~14
page.evaluatecalls eliminated or converted to locator-based approaches out of ~78 total. The remaining ~64 access internal LiteGraph state (proxyWidgets, slot arrays, canvas geometry, graph mutation APIs) with no DOM representation.┆Issue is synchronized with this Notion page by Unito