Repository navigation
fix: promoted widget indicator missing on nested subgraphs - #10851
dante01yoon wants to merge 25 commits into
Conversation
🎨 Storybook: ✅ Built — View Storybook |
|
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:
📝 WalkthroughWalkthroughUpdated promotion detection in NodeWidgets.vue to treat a widget as promoted if promotionStore reports a match either with or without a disambiguatingSourceNodeId; added a unit test and a Playwright E2E test that reproduce nested subgraph promotion scenarios and assert the promoted-widget indicator appears inside nested subgraphs. Changes
Sequence Diagram(s)sequenceDiagram
participant UI as "NodeWidgets.vue\n(Component)"
participant Promotion as "promotionStore"
participant Canvas as "canvasStore"
participant VM as "Vue runtime"
Note over UI,Canvas: on mount / render
UI->>Canvas: read rootGraph.id
UI->>Promotion: isPromotedByAny({sourceNodeId, sourceWidgetName, disambiguatingSourceNodeId})
alt disambiguatingSourceNodeId available
Promotion-->>UI: result (with disambiguatingSourceNodeId)
end
UI->>Promotion: isPromotedByAny({sourceNodeId, sourceWidgetName})
Promotion-->>UI: result (without disambiguatingSourceNodeId)
UI->>VM: compute isPromoted = either result
VM-->>UI: compute borderStyle and render promoted ring if true
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
🎭 Playwright: ✅ 1125 passed, 0 failed · 2 flaky📊 Browser Reports
|
📦 Bundle: 5.16 MB gzip 🔴 +393 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.22 MB (baseline 1.22 MB) • 🔴 +1 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 — 482 kB (baseline 482 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 11 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 — 3 MB (baseline 3 MB) • 🔴 +1.56 kBStores, services, APIs, and repositories
Status: 13 added / 13 removed / 4 unchanged Utilities & Hooks — 344 kB (baseline 344 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 13 added / 13 removed / 14 unchanged Vendor & Third-Party — 9.86 MB (baseline 9.86 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 8.57 MB (baseline 8.57 MB) • ⚪ 0 BBundles that do not match a named category
Status: 56 added / 56 removed / 79 unchanged ⚡ Performance Report
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-04-15T09:58:46.761Z",
"gitSha": "3ed76d8448cb4791595a68e6c62863d4f0e75441",
"branch": "fix/promoted-indicator-nested-subgraph",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2064.1669999999976,
"styleRecalcs": 10,
"styleRecalcDurationMs": 10.310000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 489.79400000000004,
"heapDeltaBytes": 20906840,
"heapUsedBytes": 63866388,
"domNodes": 20,
"jsHeapTotalBytes": 22544384,
"scriptDurationMs": 30.197999999999997,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2031.9320000000403,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.536,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 424.34800000000007,
"heapDeltaBytes": 20359900,
"heapUsedBytes": 62927188,
"domNodes": 20,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 29.999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2038.0030000000033,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.363000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 377.04400000000004,
"heapDeltaBytes": 20058440,
"heapUsedBytes": 63222236,
"domNodes": 20,
"jsHeapTotalBytes": 22544384,
"scriptDurationMs": 20.423,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2256.7190000000037,
"styleRecalcs": 83,
"styleRecalcDurationMs": 59.255,
"layouts": 12,
"layoutDurationMs": 4.388000000000001,
"taskDurationMs": 1222.177,
"heapDeltaBytes": 16798136,
"heapUsedBytes": 59856420,
"domNodes": 67,
"jsHeapTotalBytes": 23592960,
"scriptDurationMs": 157.88,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1881.8049999999857,
"styleRecalcs": 79,
"styleRecalcDurationMs": 45.287,
"layouts": 12,
"layoutDurationMs": 3.8810000000000002,
"taskDurationMs": 831.335,
"heapDeltaBytes": 16291672,
"heapUsedBytes": 60159000,
"domNodes": 63,
"jsHeapTotalBytes": 22544384,
"scriptDurationMs": 133.467,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1968.4140000000525,
"styleRecalcs": 79,
"styleRecalcDurationMs": 49.864999999999995,
"layouts": 12,
"layoutDurationMs": 4.11,
"taskDurationMs": 892.898,
"heapDeltaBytes": 16345180,
"heapUsedBytes": 58941164,
"domNodes": 64,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 130.44400000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1755.675999999994,
"styleRecalcs": 31,
"styleRecalcDurationMs": 19.616,
"layouts": 6,
"layoutDurationMs": 0.7070000000000002,
"taskDurationMs": 372.479,
"heapDeltaBytes": 15380576,
"heapUsedBytes": 67194164,
"domNodes": 79,
"jsHeapTotalBytes": 23330816,
"scriptDurationMs": 30.229,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1730.246999999963,
"styleRecalcs": 31,
"styleRecalcDurationMs": 18.744000000000003,
"layouts": 6,
"layoutDurationMs": 0.8049999999999999,
"taskDurationMs": 351.58199999999994,
"heapDeltaBytes": -107552,
"heapUsedBytes": 48891768,
"domNodes": 78,
"jsHeapTotalBytes": 23855104,
"scriptDurationMs": 31.958000000000002,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1738.5579999998981,
"styleRecalcs": 32,
"styleRecalcDurationMs": 19.254,
"layouts": 6,
"layoutDurationMs": 0.6099999999999999,
"taskDurationMs": 364.87800000000004,
"heapDeltaBytes": 15683272,
"heapUsedBytes": 67504860,
"domNodes": 81,
"jsHeapTotalBytes": 23592960,
"scriptDurationMs": 30.845,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 647.5230000000067,
"styleRecalcs": 13,
"styleRecalcDurationMs": 11.158000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 396.1790000000001,
"heapDeltaBytes": 6794836,
"heapUsedBytes": 49424084,
"domNodes": 21,
"jsHeapTotalBytes": 13631488,
"scriptDurationMs": 68.452,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 602.23000000002,
"styleRecalcs": 15,
"styleRecalcDurationMs": 11.091,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 367.608,
"heapDeltaBytes": 6541292,
"heapUsedBytes": 49135176,
"domNodes": 25,
"jsHeapTotalBytes": 13893632,
"scriptDurationMs": 63.725,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-clipping",
"durationMs": 552.6709999999184,
"styleRecalcs": 12,
"styleRecalcDurationMs": 8.458,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 345.954,
"heapDeltaBytes": 6022684,
"heapUsedBytes": 49089816,
"domNodes": 19,
"jsHeapTotalBytes": 13893632,
"scriptDurationMs": 55.77,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "large-graph-idle",
"durationMs": 2042.6180000000045,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.326,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 624.983,
"heapDeltaBytes": 4626924,
"heapUsedBytes": 55995056,
"domNodes": -260,
"jsHeapTotalBytes": 15917056,
"scriptDurationMs": 103.711,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-idle",
"durationMs": 2062.7719999999954,
"styleRecalcs": 12,
"styleRecalcDurationMs": 11.029000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 665.9770000000001,
"heapDeltaBytes": 4682232,
"heapUsedBytes": 55753776,
"domNodes": -255,
"jsHeapTotalBytes": 15917056,
"scriptDurationMs": 107.157,
"eventListeners": -121,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2037.4489999999241,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.554,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 588.612,
"heapDeltaBytes": 20030928,
"heapUsedBytes": 72005252,
"domNodes": -256,
"jsHeapTotalBytes": 14663680,
"scriptDurationMs": 103.72200000000001,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2197.6510000000076,
"styleRecalcs": 70,
"styleRecalcDurationMs": 17.72,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1228.1449999999998,
"heapDeltaBytes": 15721148,
"heapUsedBytes": 67822260,
"domNodes": -261,
"jsHeapTotalBytes": 17170432,
"scriptDurationMs": 411.571,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2175.576000000035,
"styleRecalcs": 71,
"styleRecalcDurationMs": 18.142,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1200.6889999999999,
"heapDeltaBytes": 16418352,
"heapUsedBytes": 68410176,
"domNodes": -256,
"jsHeapTotalBytes": 17432576,
"scriptDurationMs": 421.956,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2178.472000000056,
"styleRecalcs": 69,
"styleRecalcDurationMs": 16.892000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1202.449,
"heapDeltaBytes": 18616080,
"heapUsedBytes": 71981328,
"domNodes": -261,
"jsHeapTotalBytes": 17956864,
"scriptDurationMs": 417.05499999999995,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3230.5599999999968,
"styleRecalcs": 66,
"styleRecalcDurationMs": 19.658,
"layouts": 60,
"layoutDurationMs": 8.28,
"taskDurationMs": 1450.2189999999998,
"heapDeltaBytes": 2706780,
"heapUsedBytes": 57736384,
"domNodes": -263,
"jsHeapTotalBytes": 16703488,
"scriptDurationMs": 493.647,
"eventListeners": -121,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3166.22000000001,
"styleRecalcs": 64,
"styleRecalcDurationMs": 16.602,
"layouts": 60,
"layoutDurationMs": 8.228000000000002,
"taskDurationMs": 1383.0580000000002,
"heapDeltaBytes": 7202500,
"heapUsedBytes": 62343536,
"domNodes": -267,
"jsHeapTotalBytes": 17752064,
"scriptDurationMs": 484.39099999999996,
"eventListeners": -123,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3231.843000000026,
"styleRecalcs": 65,
"styleRecalcDurationMs": 16.165,
"layouts": 60,
"layoutDurationMs": 8.275,
"taskDurationMs": 1407.7630000000001,
"heapDeltaBytes": 8973976,
"heapUsedBytes": 65100384,
"domNodes": -264,
"jsHeapTotalBytes": 17285120,
"scriptDurationMs": 509.66100000000006,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2012.9409999999552,
"styleRecalcs": 8,
"styleRecalcDurationMs": 9.536000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 624.121,
"heapDeltaBytes": 2650160,
"heapUsedBytes": 56586552,
"domNodes": -264,
"jsHeapTotalBytes": 15392768,
"scriptDurationMs": 97.53699999999999,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2041.9499999999857,
"styleRecalcs": 11,
"styleRecalcDurationMs": 10.844,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 625.9129999999999,
"heapDeltaBytes": 4106436,
"heapUsedBytes": 55971088,
"domNodes": -259,
"jsHeapTotalBytes": 16703488,
"scriptDurationMs": 102.77999999999999,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2033.4659999999758,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.133,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 558.5949999999999,
"heapDeltaBytes": 4501880,
"heapUsedBytes": 57800480,
"domNodes": -258,
"jsHeapTotalBytes": 15425536,
"scriptDurationMs": 94.251,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 631.465999999989,
"styleRecalcs": 47,
"styleRecalcDurationMs": 12.657,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 417.7339999999999,
"heapDeltaBytes": 6730384,
"heapUsedBytes": 49853068,
"domNodes": 20,
"jsHeapTotalBytes": 13369344,
"scriptDurationMs": 137.33599999999998,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 571.0339999999974,
"styleRecalcs": 48,
"styleRecalcDurationMs": 12.998999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 382.22999999999996,
"heapDeltaBytes": 6150680,
"heapUsedBytes": 50722036,
"domNodes": 22,
"jsHeapTotalBytes": 13631488,
"scriptDurationMs": 121.195,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 574.3310000000292,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.866999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 374.556,
"heapDeltaBytes": 6485120,
"heapUsedBytes": 49673520,
"domNodes": 20,
"jsHeapTotalBytes": 13369344,
"scriptDurationMs": 125.037,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-idle",
"durationMs": 2001.5000000000214,
"styleRecalcs": 12,
"styleRecalcDurationMs": 12.923999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 432.245,
"heapDeltaBytes": 19954628,
"heapUsedBytes": 64111872,
"domNodes": 23,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 24.857000000000003,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2027.2820000000138,
"styleRecalcs": 11,
"styleRecalcDurationMs": 10.595000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 413.597,
"heapDeltaBytes": 10549836,
"heapUsedBytes": 62773536,
"domNodes": 22,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 26.182000000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2024.9730000000454,
"styleRecalcs": 10,
"styleRecalcDurationMs": 15.698999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 380.17100000000005,
"heapDeltaBytes": 20124388,
"heapUsedBytes": 63402504,
"domNodes": 20,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 22.712,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1811.7560000000026,
"styleRecalcs": 79,
"styleRecalcDurationMs": 45.663,
"layouts": 16,
"layoutDurationMs": 5.787999999999999,
"taskDurationMs": 805.023,
"heapDeltaBytes": 12302220,
"heapUsedBytes": 55190448,
"domNodes": 66,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 114.04099999999998,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 2007.3739999999702,
"styleRecalcs": 84,
"styleRecalcDurationMs": 49.092,
"layouts": 16,
"layoutDurationMs": 4.649,
"taskDurationMs": 963.505,
"heapDeltaBytes": 11542288,
"heapUsedBytes": 54842768,
"domNodes": 73,
"jsHeapTotalBytes": 23330816,
"scriptDurationMs": 100.08600000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1988.5459999999284,
"styleRecalcs": 84,
"styleRecalcDurationMs": 52.661,
"layouts": 16,
"layoutDurationMs": 4.928999999999999,
"taskDurationMs": 1007.2080000000001,
"heapDeltaBytes": 12235528,
"heapUsedBytes": 55358336,
"domNodes": 73,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 110.732,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "viewport-pan-sweep",
"durationMs": 8170.3469999999925,
"styleRecalcs": 251,
"styleRecalcDurationMs": 49.749,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4210.761,
"heapDeltaBytes": 17575656,
"heapUsedBytes": 77983056,
"domNodes": -259,
"jsHeapTotalBytes": 18595840,
"scriptDurationMs": 1329.55,
"eventListeners": -109,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8228.291999999954,
"styleRecalcs": 250,
"styleRecalcDurationMs": 46.800999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4101.039,
"heapDeltaBytes": 25102216,
"heapUsedBytes": 77584084,
"domNodes": -259,
"jsHeapTotalBytes": 19529728,
"scriptDurationMs": 1296.385,
"eventListeners": -111,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8320.093000000043,
"styleRecalcs": 251,
"styleRecalcDurationMs": 47.144000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4095.0999999999995,
"heapDeltaBytes": -20423124,
"heapUsedBytes": 51666576,
"domNodes": -251,
"jsHeapTotalBytes": 21889024,
"scriptDurationMs": 1325.71,
"eventListeners": -109,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 11425.005999999996,
"styleRecalcs": 1,
"styleRecalcDurationMs": 17.154000000000003,
"layouts": 1,
"layoutDurationMs": 4.380000000000009,
"taskDurationMs": 11399.902,
"heapDeltaBytes": -35487864,
"heapUsedBytes": 159435192,
"domNodes": -8329,
"jsHeapTotalBytes": 26828800,
"scriptDurationMs": 603.829,
"eventListeners": -14702,
"totalBlockingTimeMs": 1117,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 10699.180000000013,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10679.867999999999,
"heapDeltaBytes": -29226016,
"heapUsedBytes": 168614160,
"domNodes": -9850,
"jsHeapTotalBytes": 26566656,
"scriptDurationMs": 589.4699999999999,
"eventListeners": -23962,
"totalBlockingTimeMs": 251,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 10760.765999999989,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10744.006,
"heapDeltaBytes": -54308092,
"heapUsedBytes": 159861980,
"domNodes": -9850,
"jsHeapTotalBytes": 17391616,
"scriptDurationMs": 593.4939999999999,
"eventListeners": -23963,
"totalBlockingTimeMs": 262,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 13203.18599999996,
"styleRecalcs": 66,
"styleRecalcDurationMs": 15.616999999999992,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13181.419000000002,
"heapDeltaBytes": -67312656,
"heapUsedBytes": 149758356,
"domNodes": -9850,
"jsHeapTotalBytes": -10395648,
"scriptDurationMs": 874.7280000000001,
"eventListeners": -23961,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 13094.673,
"styleRecalcs": 67,
"styleRecalcDurationMs": 15.637999999999986,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13064.881,
"heapDeltaBytes": -63825108,
"heapUsedBytes": 150421268,
"domNodes": -9850,
"jsHeapTotalBytes": -10395648,
"scriptDurationMs": 890.5110000000001,
"eventListeners": -23961,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 13022.695999999996,
"styleRecalcs": 66,
"styleRecalcDurationMs": 15.23399999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12998.598,
"heapDeltaBytes": -40776848,
"heapUsedBytes": 173961800,
"domNodes": -9850,
"jsHeapTotalBytes": -8122368,
"scriptDurationMs": 925.3549999999999,
"eventListeners": -23958,
"totalBlockingTimeMs": 43,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "workflow-execution",
"durationMs": 446.0109999999986,
"styleRecalcs": 19,
"styleRecalcDurationMs": 26.025,
"layouts": 4,
"layoutDurationMs": 1.3109999999999997,
"taskDurationMs": 131.77300000000002,
"heapDeltaBytes": 4620764,
"heapUsedBytes": 49019828,
"domNodes": 169,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 24.974999999999998,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 121.4870000000019,
"styleRecalcs": 10,
"styleRecalcDurationMs": 20.221,
"layouts": 4,
"layoutDurationMs": 1.706,
"taskDurationMs": 97.68199999999999,
"heapDeltaBytes": 2763096,
"heapUsedBytes": 47124156,
"domNodes": 140,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 27.606000000000005,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 458.2029999999122,
"styleRecalcs": 19,
"styleRecalcDurationMs": 28.682,
"layouts": 6,
"layoutDurationMs": 1.731,
"taskDurationMs": 138.79,
"heapDeltaBytes": 4567240,
"heapUsedBytes": 48989096,
"domNodes": 156,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 31.045,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
}
]
} |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/core/graph/subgraph/promotedWidgetIndicator.test.ts (1)
41-41: Consider usingcreateTestRootGraph()directly.The current code creates a subgraph just to access its
rootGraph, discarding the subgraph itself. ThecreateTestRootGraph()helper from the same fixtures module would be cleaner.♻️ Suggested refactor
- const rootGraph = createTestSubgraph().rootGraph + const rootGraph = createTestRootGraph()You would need to add
createTestRootGraphto the imports:import { createTestRootGraph, createTestSubgraph, createTestSubgraphNode, resetSubgraphFixtureState } from '@/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers'Based on learnings: "
createTestSubgraph()is only appropriate when the test does not need to control or reference the parentLGraph."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/core/graph/subgraph/promotedWidgetIndicator.test.ts` at line 41, The test creates a subgraph only to access its rootGraph; replace the call to createTestSubgraph().rootGraph with createTestRootGraph() and update the imports to include createTestRootGraph (and remove createTestSubgraph if it becomes unused). Locate the rootGraph assignment in promotedWidgetIndicator.test.ts and change the expression to use createTestRootGraph(), adjusting imports accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/core/graph/subgraph/promotedWidgetIndicator.test.ts`:
- Around line 99-121: The test shows a key mismatch between
makePromotionEntryKey stored keys and the lookup performed by
promotionStore.isPromotedByAny: fix this by making lookup keys consistent with
stored keys — either stop appending disambiguatingSourceNodeId when the stored
promotion key has no disambiguator or ensure promotions are stored with the
disambiguator too; additionally ensure the sourceNodeId passed into
isPromotedByAny (from NodeWidgets.vue) is the original promotion source id
(e.g., subBNodeId) rather than the host node id (subANodeId) so
makePromotionEntryKey({ sourceNodeId, sourceWidgetName,
disambiguatingSourceNodeId }) produces the same key format as when the promotion
was saved (check callers that construct sourceNodeId and change NodeWidgets.vue
or normalize inside isPromotedByAny/makePromotionEntryKey accordingly).
---
Nitpick comments:
In `@src/core/graph/subgraph/promotedWidgetIndicator.test.ts`:
- Line 41: The test creates a subgraph only to access its rootGraph; replace the
call to createTestSubgraph().rootGraph with createTestRootGraph() and update the
imports to include createTestRootGraph (and remove createTestSubgraph if it
becomes unused). Locate the rootGraph assignment in
promotedWidgetIndicator.test.ts and change the expression to use
createTestRootGraph(), adjusting imports 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: 0cf063ce-67b7-4a4b-89af-cbcfa76e29e3
📒 Files selected for processing (1)
src/core/graph/subgraph/promotedWidgetIndicator.test.ts
Reproduces #10612 where the promoted widget ring indicator is missing on nested subgraphs due to a key mismatch in isPromotedByAny lookup.
The isPromotedByAny check was only looking up the key with disambiguatingSourceNodeId, missing promotions stored without one. Now tries both with and without the disambiguating segment so nested subgraph promotions are detected regardless of storage shape. Fixes #10612
12992c3 to
fd9e732
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/core/graph/subgraph/promotedWidgetIndicator.test.ts (1)
76-83: Consider using type narrowing instead of double-cast throughfromAny.The
fromAnyhelper from@total-typescript/shoehornis typically for test scenarios where you need to bypass strict typing. Here, you're accessingwrapper.vm.processedWidgetswhich is a known property. A simpler approach using type assertion might be clearer.♻️ Suggested refactor
function getBorderStyles(wrapper: ReturnType<typeof mount>) { - return fromAny<{ processedWidgets: unknown[] }, unknown>( - wrapper.vm - ).processedWidgets.map( - (entry) => - (entry as { simplified: { borderStyle?: string } }).simplified.borderStyle - ) + const vm = wrapper.vm as unknown as { + processedWidgets: Array<{ simplified: { borderStyle?: string } }> + } + return vm.processedWidgets.map((entry) => entry.simplified.borderStyle) }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/core/graph/subgraph/promotedWidgetIndicator.test.ts` around lines 76 - 83, The test helper getBorderStyles currently double-casts wrapper.vm through fromAny; instead directly narrow the type of wrapper.vm to access processedWidgets (e.g. assert wrapper.vm as { processedWidgets: { simplified: { borderStyle?: string } }[] }) and then map over processedWidgets to return simplified.borderStyle; update references to getBorderStyles, wrapper.vm, processedWidgets and simplified.borderStyle to use this direct type assertion or an explicit local interface rather than fromAny.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/core/graph/subgraph/promotedWidgetIndicator.test.ts`:
- Around line 76-83: The test helper getBorderStyles currently double-casts
wrapper.vm through fromAny; instead directly narrow the type of wrapper.vm to
access processedWidgets (e.g. assert wrapper.vm as { processedWidgets: {
simplified: { borderStyle?: string } }[] }) and then map over processedWidgets
to return simplified.borderStyle; update references to getBorderStyles,
wrapper.vm, processedWidgets and simplified.borderStyle to use this direct type
assertion or an explicit local interface rather than fromAny.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 3039742a-57f0-4d57-a465-1725137a8854
📒 Files selected for processing (2)
src/core/graph/subgraph/promotedWidgetIndicator.test.tssrc/renderer/extensions/vueNodes/components/NodeWidgets.vue
There was a problem hiding this comment.
🧹 Nitpick comments (1)
browser_tests/tests/subgraph/subgraphNested.spec.ts (1)
512-518: Preferexpect.pollfor this single-call retry assertion.Line 512 uses
toPassfor one async read (count()) and one assertion;expect.pollis the clearer and recommended pattern here.♻️ Proposed refactor
- await comfyExpect(async () => { - const count = await intermediateRings.count() - expect( - count, - 'Node 6 (Sub 1) should have at least one promoted ring' - ).toBeGreaterThan(0) - }).toPass({ timeout: 5000 }) + await expect + .poll(() => intermediateRings.count(), { + timeout: 5000, + message: 'Node 6 (Sub 1) should have at least one promoted ring' + }) + .toBeGreaterThan(0)As per coding guidelines: "Prefer
expect.poll()overexpect(async () => { ... }).toPass()when the block contains a single async call with a single assertion".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/subgraph/subgraphNested.spec.ts` around lines 512 - 518, Replace the comfyExpect(...).toPass retry pattern with expect.poll for the single async call; specifically, swap the comfyExpect wrapper and its inner async block that calls intermediateRings.count() with expect.poll(() => intermediateRings.count()).toBeGreaterThan(0, { timeout: 5000 }) so the test retries the count until it's > 0 using the built-in expect.poll API (keep the same timeout and assertion target).
🤖 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/tests/subgraph/subgraphNested.spec.ts`:
- Around line 512-518: Replace the comfyExpect(...).toPass retry pattern with
expect.poll for the single async call; specifically, swap the comfyExpect
wrapper and its inner async block that calls intermediateRings.count() with
expect.poll(() => intermediateRings.count()).toBeGreaterThan(0, { timeout: 5000
}) so the test retries the count until it's > 0 using the built-in expect.poll
API (keep the same timeout and assertion target).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 52fed46a-f144-4b39-bf79-fb47ea6c39fe
📒 Files selected for processing (1)
browser_tests/tests/subgraph/subgraphNested.spec.ts
There was a problem hiding this comment.
🧹 Nitpick comments (1)
browser_tests/tests/subgraph/subgraphNested.spec.ts (1)
519-525: Useexpect.poll()instead of single-calltoPass()This block has one async read (
intermediateRings.count()) and one assertion, soexpect.poll()is the clearer retry primitive here.♻️ Suggested refactor
- await comfyExpect(async () => { - const count = await intermediateRings.count() - expect( - count, - 'Node 6 (Sub 1) should have at least one promoted ring' - ).toBeGreaterThan(0) - }).toPass({ timeout: 5000 }) + await expect + .poll(async () => intermediateRings.count(), { + timeout: 5000, + message: 'Node 6 (Sub 1) should have at least one promoted ring' + }) + .toBeGreaterThan(0)As per coding guidelines: "Prefer
expect.poll()overexpect(async () => { ... }).toPass()when the block contains a single async call with a single assertion."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/subgraph/subgraphNested.spec.ts` around lines 519 - 525, The test uses comfyExpect(...).toPass() around a single async read and assertion; replace that with expect.poll() to align with the guideline: call expect.poll(() => intermediateRings.count()) and assert the polled value with .toBeGreaterThan(0) (or use expect.poll(async () => await intermediateRings.count()).toBeGreaterThan(0) if needed), removing the comfyExpect wrapper and keeping the same timeout of 5000ms so the retry behaviour and message ("Node 6 (Sub 1) should have at least one promoted ring") are preserved.
🤖 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/tests/subgraph/subgraphNested.spec.ts`:
- Around line 519-525: The test uses comfyExpect(...).toPass() around a single
async read and assertion; replace that with expect.poll() to align with the
guideline: call expect.poll(() => intermediateRings.count()) and assert the
polled value with .toBeGreaterThan(0) (or use expect.poll(async () => await
intermediateRings.count()).toBeGreaterThan(0) if needed), removing the
comfyExpect wrapper and keeping the same timeout of 5000ms so the retry
behaviour and message ("Node 6 (Sub 1) should have at least one promoted ring")
are preserved.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2f11177d-3d39-470d-ba07-6da4154ad6e6
📒 Files selected for processing (1)
browser_tests/tests/subgraph/subgraphNested.spec.ts
|
@coderabbitai approve |
✅ Actions performedComments resolved and changes approved. |
| const sourceWidgetName = widget.storeName ?? widget.name | ||
| // Promotions stored for non-SubgraphNode inner nodes omit the | ||
| // disambiguatingSourceNodeId, but the widget's storeNodeId causes | ||
| // one to be computed here. Check both key shapes to handle nested | ||
| // subgraph promotions correctly (#10612). | ||
| const isPromoted = | ||
| graphId && | ||
| promotionStore.isPromotedByAny(graphId, { | ||
| (promotionStore.isPromotedByAny(graphId, { | ||
| sourceNodeId: hostNodeId, | ||
| sourceWidgetName: widget.storeName ?? widget.name, | ||
| sourceWidgetName, | ||
| disambiguatingSourceNodeId: promotionSourceNodeId | ||
| }) | ||
| ? 'ring ring-component-node-widget-promoted' | ||
| : mergedOptions.advanced | ||
| ? 'ring ring-component-node-widget-advanced' | ||
| : undefined | ||
| }) || | ||
| promotionStore.isPromotedByAny(graphId, { | ||
| sourceNodeId: hostNodeId, | ||
| sourceWidgetName | ||
| })) |
There was a problem hiding this comment.
I think this is complex enough to graduate into promotionUtils so the logic can be shared with BaseWidget and domWidget.
There was a problem hiding this comment.
Agreed — the promoted indicator check is duplicated across NodeWidgets.vue, domWidget.ts, and BaseWidget.ts. Will extract it into promotionUtils.ts as a shared isWidgetPromoted(graphId, hostNodeId, sourceWidgetName, disambiguatingSourceNodeId?) function.
There was a problem hiding this comment.
Handled in 91a754f. I did extract the shared lookup, but kept it in a lightweight promotionLookup.ts helper rather than the existing promotionUtils.ts so BaseWidget/domWidget/useProcessedWidgets can share the hot-path logic without pulling in the heavier promotion utils dependency graph.
| const outerRings = outerNode.locator(`.${PROMOTED_BORDER_CLASS}`) | ||
| await comfyExpect(outerRings).toHaveCount(0) | ||
|
|
||
| // Navigate into Sub 0 programmatically to avoid click interception |
There was a problem hiding this comment.
If there's a bug with entering subgraphs via our utilities we should fix that.
There was a problem hiding this comment.
No bug — enterSubgraph works correctly here. I used the manual double-click approach initially during development when debugging the subgraph navigation flow, but comfyPage.vueNodes.enterSubgraph('5') is the right call. Will switch to it.
There was a problem hiding this comment.
Fixed in 91a754f — the test now uses comfyPage.vueNodes.enterSubgraph('5') instead of mutating canvas state from page.evaluate.
Move promotion entry resolution logic (linked/fallback merging, alias pruning, persistence decisions) into a standalone module to reduce SubgraphNode method count and improve readability. - Extract resolvePromotionEntries, buildLinkedReconcileEntries, buildDisplayNameByViewKey, makePromotionViewKey into PromotionEntryResolver.ts - Remove 12 private methods (~280 lines) from SubgraphNode - Eliminate _makePromotionEntryKey wrapper (use store export directly) - Add 10 characterization tests pinning promotion entry resolution behavior before refactoring
Address Codex adversarial review findings: 1. [high] Fix at data layer instead of read-time fallback: during SubgraphNode._internalConfigureAfterSlots, resolve the concrete node for entries targeting SubgraphNodes and store the correct disambiguatingSourceNodeId. This ensures ALL promotion consumers (ring, side panel, demote) see consistent keys. 2. [medium] Prevent over-matching of duplicate-named widgets: replace the unconditional base-key fallback with dual-indexed ref counts. Disambiguated entries now increment both exact and base keys, so exact lookups (Vue renderer) match precisely while base lookups (legacy BaseWidget) still work without a disambiguator. 3. Simplify isWidgetPromoted to a pass-through — no special fallback logic needed since the data is correct at the source.
|
@coderabbitai approve |
✅ Actions performedComments resolved and changes approved. |
| "properties": { | ||
| "proxyWidgets": [ | ||
| ["5", "string_a"], | ||
| ["9", "string_a"], |
There was a problem hiding this comment.
Bumping — still curious about this. Was the original ["5", "string_a"] entry pointing at the wrong node (node 5 is the outermost SubgraphNode, while node 9 is an inner concrete node)?
There was a problem hiding this comment.
Yes — the original ['5', 'string_a'] was pointing at the wrong node for that nested promotion. proxyWidgets on node 6 are scoped to Sub 1's local graph, so the nested string_a entry needs to target inner node 9, not the outer SubgraphNode 5. I also added an inline comment in the spec to make that scope explicit.
DrJKL
left a comment
There was a problem hiding this comment.
Nice fix — root cause analysis is solid and the dual-indexing approach is well thought out. Tests pass, typecheck clean, knip clean. A few inline suggestions below, none blocking.
| : mergedOptions | ||
|
|
||
| const borderStyle = | ||
| const sourceWidgetName = widget.slotName ?? widget.name |
There was a problem hiding this comment.
storeName → slotName — semantic change worth verifying
The old code used widget.storeName ?? widget.name (the resolved interior widget name, e.g. text). The new code uses widget.slotName ?? widget.name (the subgraph input slot name, e.g. value_1).
For the nested case this is correct — sourceWidgetName in the store is set to targetInput.name (SubgraphNode.ts L157) which is the slot name. But this changes lookup semantics for all promoted widgets, not only nested ones.
Can you confirm there is no scenario where slotName is undefined but storeName would have been set and was the correct lookup key? The dual-indexing in the store provides a safety net, but it would be good to verify this explicitly.
There was a problem hiding this comment.
To add to this: the promotion entries in SubgraphNode.ts set sourceWidgetName from either targetInput.name (L157, the slot name) or targetWidget.name (L163, the widget name). For non-subgraph sources these are typically the same, but for the nested subgraph case they can diverge — slotName matches the slot-based path (L157) while storeName matches the widget-based path (L163).
The dual-indexed base key masks potential mismatches, but ideally a comment here would explain why slotName is the correct lookup key for the nested case, so future readers don't have to re-derive the reasoning.
There was a problem hiding this comment.
Verified and documented in 91a754f. For the nested case the store key is slot-based, so slotName is the correct lookup key; storeName still tracks the concrete leaf widget and is now only used as the disambiguator. I added a code comment in useProcessedWidgets.ts to spell that out.
| sourceWidgetName, | ||
| ...(disambiguatingSourceNodeId && { disambiguatingSourceNodeId }) | ||
| }) | ||
| } |
There was a problem hiding this comment.
Consider replacing isPromotedByAny rather than adding isWidgetPromoted alongside it
isWidgetPromoted is a thin wrapper that destructures positional args into a PromotedWidgetSource object, then delegates to isPromotedByAny. Both are now exported. Since all three call sites (BaseWidget, domWidget, useProcessedWidgets) have been migrated to isWidgetPromoted, consider making isPromotedByAny private (remove from the return object) to reduce the store's public API surface.
If external callers (extensions, tests) need isPromotedByAny, keeping both is fine — but worth a conscious decision.
| } | |
| function isWidgetPromoted( | |
| graphId: UUID, | |
| sourceNodeId: string, | |
| sourceWidgetName: string, | |
| disambiguatingSourceNodeId?: string | |
| ): boolean { | |
| return isPromotedByAny(graphId, { | |
| sourceNodeId, | |
| sourceWidgetName, | |
| ...(disambiguatingSourceNodeId && { disambiguatingSourceNodeId }) | |
| }) | |
| } | |
| return { | |
| getPromotionsRef, | |
| getPromotions, | |
| isPromoted, | |
| isPromotedByAny, | |
| isWidgetPromoted, |
There was a problem hiding this comment.
+1 — after the planned extraction to promotionUtils, it would be a good time to also make isPromotedByAny private (remove from the store's return object). All external callers now use isWidgetPromoted, and tests can access internal methods via the store instance directly if needed.
There was a problem hiding this comment.
I left isPromotedByAny exported for now. There are still direct internal call sites/tests built around the object-form API, so I wanted to keep this follow-up scoped to the behavior/perf fixes; making it private would be a reasonable follow-up cleanup.
| @@ -0,0 +1,152 @@ | |||
| import { createTestingPinia } from '@pinia/testing' | |||
There was a problem hiding this comment.
Nit: consider colocating this test with the renderer composable
This test renders NodeWidgets.vue and asserts on the promoted ring CSS class — it's really testing the useProcessedWidgets → promotionStore integration from the renderer's perspective. src/renderer/extensions/vueNodes/composables/ (alongside useProcessedWidgets.test.ts) might be a more natural home.
Not blocking — just a suggestion for discoverability.
There was a problem hiding this comment.
I left the test in its current file for now to keep this PR focused on the promotion regression and follow-up review fixes. Agreed that colocating it with the renderer composable could improve discoverability in a later cleanup.
… tag, retrying assertion
- Replace manual page.evaluate subgraph navigation with enterSubgraph('5')
- Use @vue-nodes tag (from #11184) instead of manual beforeEach setting
- Replace expect.poll with comfyExpect retrying assertion per Playwright best practices
enterSubgraph helper clicks the button, but the canvas z-999 overlay intercepts pointer events at root level. Use page.evaluate to navigate programmatically instead.
| // Navigate programmatically — the enter-subgraph button on | ||
| // node 5 is obscured by the canvas z-999 overlay at root level. | ||
| await comfyPage.page.evaluate(() => { | ||
| const node = window.app!.graph!.getNodeById('5') | ||
| if (node?.isSubgraphNode()) { | ||
| window.app!.canvas.setGraph(node.subgraph) | ||
| } | ||
| }) | ||
| await comfyPage.nextFrame() |
There was a problem hiding this comment.
I've hit this before, I think it's a misdiagnosis of the issue. The LLMs seem to fixate on the overlay, but that's almost never the real source of the failure.
There was a problem hiding this comment.
We should fix the interaction here. Users aren't expected to run console commands so the test shouldn't either.
There was a problem hiding this comment.
Fixed in 91a754f — the regression test now exercises the real enter-subgraph control instead of using a console-side graph switch.
DrJKL
left a comment
There was a problem hiding this comment.
Nice fix — the root cause analysis is solid, dual-indexing is a reasonable approach, and the regression E2E test is a great addition. A few items below, some new and some following up on existing threads.
| const count = (refCounts.get(key) ?? 1) - 1 | ||
| if (count <= 0) { | ||
| refCounts.delete(key) | ||
| } else { |
There was a problem hiding this comment.
Nit: (refCounts.get(key) ?? 1) - 1 silently treats "decrement a non-existent key" as a no-op (result is 0 → delete). This could mask ref-count imbalance bugs. Consider:
| } else { | |
| function _decrementKey(refCounts: Map<string, number>, key: string): void { | |
| const current = refCounts.get(key) | |
| if (current === undefined) return | |
| if (current <= 1) { | |
| refCounts.delete(key) | |
| } else { | |
| refCounts.set(key, current - 1) | |
| } | |
| } |
Not blocking — just a defensive coding note.
There was a problem hiding this comment.
Applied in 91a754f. _decrementKey now no-ops on a missing key and only decrements/deletes from an existing count.
| // Infer disambiguatingSourceNodeId for entries whose source node is a | ||
| // SubgraphNode. The renderer computes a promotionSourceNodeId from the | ||
| // concrete (leaf) node deep in the promotion chain; the store key must | ||
| // carry the same value so that exact-match lookups succeed (#10612). | ||
| for (const entry of entries) { | ||
| if (entry.disambiguatingSourceNodeId) continue | ||
|
|
||
| const sourceNode = this.subgraph.getNodeById(entry.sourceNodeId) | ||
| if (!sourceNode?.isSubgraphNode()) continue | ||
|
|
||
| const result = resolveConcretePromotedWidget( | ||
| this, | ||
| entry.sourceNodeId, | ||
| entry.sourceWidgetName | ||
| ) | ||
| if (result.status === 'resolved') { | ||
| entry.disambiguatingSourceNodeId = String(result.resolved.node.id) |
There was a problem hiding this comment.
The entries were just built by the .map() above via normalizeLegacyProxyWidgetEntry, which already does widget resolution. This loop calls resolveConcretePromotedWidget again for SubgraphNode sources — a second resolution pass.
Could the disambiguator be inferred during the initial .map() pass instead? That would avoid O(entries × graph depth) duplicate work during hydration.
There was a problem hiding this comment.
Fixed in 91a754f. I moved the disambiguator inference into normalizeLegacyProxyWidgetEntry() and removed the second resolveConcretePromotedWidget() pass from SubgraphNode.configure(), so hydration no longer walks the promotion chain twice.
| usePromotionStore().isWidgetPromoted( | ||
| graphId, | ||
| String(this.node.id), | ||
| this.name | ||
| ) |
There was a problem hiding this comment.
Minor: the old code cached this.promotionStore = usePromotionStore() as an instance property. Now usePromotionStore() is called inline on every draw() (per-widget per-frame). Pinia returns a singleton so it's functionally correct, but it's a function call + map lookup on a hot path.
Was the removal intentional? If the planned extraction to promotionUtils (per the other thread) caches the store reference internally, this becomes moot.
There was a problem hiding this comment.
Addressed in 91a754f. I factored the shared lookup into a lightweight promotionLookup.ts helper that caches the store per active Pinia, so the widget hot paths no longer call usePromotionStore() inline each draw.
| }) | ||
|
|
||
| it('isPromotedByAny with disambiguatingSourceNodeId only matches keyed entries', () => { | ||
| it('isPromotedByAny with disambiguatingSourceNodeId matches exact key and base key', () => { |
There was a problem hiding this comment.
The new public method isWidgetPromoted() has no direct unit tests in this file. The store tests have 10+ assertions covering isPromotedByAny — worth adding parallel coverage for isWidgetPromoted, especially the key behavioral difference: when disambiguatingSourceNodeId is omitted, it should fall back to the base-key lookup.
There was a problem hiding this comment.
Added in 91a754f. promotionStore.test.ts now has direct isWidgetPromoted() coverage for both the exact disambiguated lookup and the base-key fallback when the disambiguator is omitted.
Summary
The promoted widget indicator ring (CSS class
ring-component-node-widget-promoted) was missing on nested subgraph widgets because of a key mismatch inisPromotedByAnylookups.Root cause: When a widget is promoted from a non-SubgraphNode inner node, the promotion is stored WITHOUT
disambiguatingSourceNodeId(key:"3:text"). However,NodeWidgets.vuealways computes adisambiguatingSourceNodeIdfromwidget.storeNodeId, producing a different lookup key ("3:text:1"). The keys never match, so the ring never renders.Fix: Check both key shapes — with and without
disambiguatingSourceNodeId— so nested promotions stored in either format are detected.Red-Green Verification
E2E Test Coverage
This fix is a rendering logic change (CSS class application in
processedWidgetscomputed) that is fully testable via Vitest component mount test. The existing E2E test insubgraphNested.spec.ts(lines 219-251) already covers promoted border styling for 2-level nested subgraphs. A 3-level E2E test would require a new fixture workflow and is better suited as a follow-up.Test Plan