Repository navigation
fix: guard Node Manager isCoreNode lookup; recover graph traversal from an unready root graph - #19736
Conversation
mapAllNodes/forEachNode were called with app.rootGraph before ComfyApp.setup() finishes, so graph.nodes was accessed on an undefined/null graph and threw. Use rootGraphOrUndefined with an early return, matching the pattern already used in useNodeErrorFlagSync and useFreeTierQuota. Fixes CLOUD-FRONTEND-PROD-1YN
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎭 Playwright: ✅ 2250 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 6067deec0c6e96b42dc90f509b21f394344afc08
Full docs: ADR-DEVEX-LINT-0015 📦 Bundle: 9.36 MB gzip 🔴 +234 BDetailsSummary
Category Glance App Entry Points — 4.6 kB (baseline 4.6 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 2.15 MB (baseline 2.15 MB) • 🔴 +70 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 156 kB (baseline 156 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 13 added / 13 removed / 6 unchanged Panels & Settings — 671 kB (baseline 671 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 11 added / 11 removed / 19 unchanged User & Accounts — 54.3 kB (baseline 54.3 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 6 added / 6 removed / 8 unchanged Editors & Dialogs — 340 kB (baseline 340 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 9 added / 9 removed / 4 unchanged UI Components — 201 kB (baseline 201 kB) • ⚪ 0 BReusable component library chunks
Status: 7 added / 7 removed / 17 unchanged Data & Services — 3.06 MB (baseline 3.06 MB) • 🔴 +193 BStores, services, APIs, and repositories
Status: 18 added / 18 removed / 4 unchanged Utilities & Hooks — 823 kB (baseline 822 kB) • 🔴 +1.09 kBHelpers, composables, and utility bundles
Status: 22 added / 22 removed / 32 unchanged Vendor & Third-Party — 14.2 MB (baseline 14.2 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 18.8 MB (baseline 18.8 MB) • 🟢 -36 BBundles that do not match a named category
Status: 86 added / 86 removed / 260 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-10-09T20:16:27.811Z",
"gitSha": "a540dd2bcf31b0a83c4bbaa608c66ad97b502d7b",
"branch": "fix/undefined-root-graph-traversal",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2046.6670000000136,
"styleRecalcs": 7,
"styleRecalcDurationMs": 3.2969999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 596.5590000000001,
"heapDeltaBytes": -41573256,
"heapUsedBytes": 59432132,
"domNodes": -217,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 13.846999999999998,
"eventListeners": -126,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2021.3950000000978,
"styleRecalcs": 8,
"styleRecalcDurationMs": 3.359000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 515.184,
"heapDeltaBytes": 5539644,
"heapUsedBytes": 62199676,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 11.865999999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1742.0019999999568,
"styleRecalcs": 56,
"styleRecalcDurationMs": 16.766999999999996,
"layouts": 12,
"layoutDurationMs": 3.666,
"taskDurationMs": 894.32,
"heapDeltaBytes": 1811704,
"heapUsedBytes": 63562432,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 167.10999999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66442307692308,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1810.137999999938,
"styleRecalcs": 77,
"styleRecalcDurationMs": 15.850000000000003,
"layouts": 12,
"layoutDurationMs": 3.709,
"taskDurationMs": 867.112,
"heapDeltaBytes": 921676,
"heapUsedBytes": 57946560,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 162.76000000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1730.0030000000106,
"styleRecalcs": 20,
"styleRecalcDurationMs": 7.000000000000001,
"layouts": 3,
"layoutDurationMs": 0.79,
"taskDurationMs": 476.234,
"heapDeltaBytes": -38301496,
"heapUsedBytes": 62309532,
"domNodes": -190,
"jsHeapTotalBytes": -1572864,
"scriptDurationMs": 17.027000000000005,
"eventListeners": -87,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666019417475724,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1708.0409999999802,
"styleRecalcs": 20,
"styleRecalcDurationMs": 8.633999999999999,
"layouts": 3,
"layoutDurationMs": 0.7750000000000001,
"taskDurationMs": 442.32099999999997,
"heapDeltaBytes": 17051420,
"heapUsedBytes": 117662568,
"domNodes": 47,
"jsHeapTotalBytes": 10223616,
"scriptDurationMs": 16.225,
"eventListeners": 39,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 737.3340000000326,
"styleRecalcs": 11,
"styleRecalcDurationMs": 2.8019999999999987,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 492.46299999999997,
"heapDeltaBytes": 18516600,
"heapUsedBytes": 75519748,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 173.422,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66363636363636,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 627.0240000000058,
"styleRecalcs": 12,
"styleRecalcDurationMs": 3.4549999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 446.002,
"heapDeltaBytes": 18510256,
"heapUsedBytes": 75534996,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 178.559,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665789473684193,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1238.7490000000412,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 949.6060000000001,
"heapDeltaBytes": 13264976,
"heapUsedBytes": 96828420,
"domNodes": 0,
"jsHeapTotalBytes": 1736704,
"scriptDurationMs": 73.99300000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 604,
"frameDurationMs": 36.27352941176471,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1235.971999999947,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 959.082,
"heapDeltaBytes": 15006280,
"heapUsedBytes": 96809024,
"domNodes": 0,
"jsHeapTotalBytes": 1736704,
"scriptDurationMs": 69.337,
"eventListeners": 0,
"totalBlockingTimeMs": 603,
"frameDurationMs": 36.27058823529414,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 856.2349999999697,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 499.38800000000015,
"heapDeltaBytes": 21117896,
"heapUsedBytes": 106197872,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 169.69400000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 220,
"frameDurationMs": 25,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 874.149999999986,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 490.38199999999944,
"heapDeltaBytes": 19107164,
"heapUsedBytes": 96858728,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 170.38600000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 230,
"frameDurationMs": 25.488235294117658,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-clean-combined-draw",
"durationMs": 9283.059999999978,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8386.635,
"heapDeltaBytes": -3124252,
"heapUsedBytes": 80555016,
"domNodes": 0,
"jsHeapTotalBytes": -18350080,
"scriptDurationMs": 7056.528,
"eventListeners": 0,
"totalBlockingTimeMs": 825,
"frameDurationMs": 32.802120141342755,
"p95FrameDurationMs": 66.59999999999854
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11108.718000000066,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10243.096,
"heapDeltaBytes": 12680200,
"heapUsedBytes": 95700080,
"domNodes": 0,
"jsHeapTotalBytes": -22020096,
"scriptDurationMs": 8451.442000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 1289,
"frameDurationMs": 31.760571428571424,
"p95FrameDurationMs": 66.59999999999854
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10084.712000000025,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9295.167000000001,
"heapDeltaBytes": -13488364,
"heapUsedBytes": 69396892,
"domNodes": 0,
"jsHeapTotalBytes": -21757952,
"scriptDurationMs": 7626.354,
"eventListeners": 0,
"totalBlockingTimeMs": 905,
"frameDurationMs": 31.908227848101266,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10718.789000000015,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9766.589999999998,
"heapDeltaBytes": -12800944,
"heapUsedBytes": 69902268,
"domNodes": 0,
"jsHeapTotalBytes": -15204352,
"scriptDurationMs": 8318.462,
"eventListeners": 0,
"totalBlockingTimeMs": 1388,
"frameDurationMs": 32.37522658610271,
"p95FrameDurationMs": 66.60000000000036
},
{
"name": "large-combo-open",
"durationMs": 219.29199999999582,
"styleRecalcs": 25,
"styleRecalcDurationMs": 17.474999999999998,
"layouts": 5,
"layoutDurationMs": 1.785,
"taskDurationMs": 162.62500000000003,
"heapDeltaBytes": 12115900,
"heapUsedBytes": 77072528,
"domNodes": 918,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 8.459999999999999,
"eventListeners": 202,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.660000000000036,
"p95FrameDurationMs": 66.69999999999982
},
{
"name": "large-combo-open",
"durationMs": 229.2529999999715,
"styleRecalcs": 23,
"styleRecalcDurationMs": 19.453,
"layouts": 5,
"layoutDurationMs": 1.637,
"taskDurationMs": 171.31199999999998,
"heapDeltaBytes": 12216748,
"heapUsedBytes": 76899372,
"domNodes": 918,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 9.342999999999998,
"eventListeners": 202,
"totalBlockingTimeMs": 7,
"frameDurationMs": 25.91111111111109,
"p95FrameDurationMs": 100
},
{
"name": "large-graph-idle",
"durationMs": 2034.249999999986,
"styleRecalcs": 8,
"styleRecalcDurationMs": 3.0729999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 654.4630000000001,
"heapDeltaBytes": -39841196,
"heapUsedBytes": 85155832,
"domNodes": -313,
"jsHeapTotalBytes": -4292608,
"scriptDurationMs": 35.2,
"eventListeners": -126,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667213114754095,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2037.953000000016,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.8990000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 645.236,
"heapDeltaBytes": -39723856,
"heapUsedBytes": 85335544,
"domNodes": -313,
"jsHeapTotalBytes": -3768320,
"scriptDurationMs": 36.843999999999994,
"eventListeners": -126,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2223.879000000011,
"styleRecalcs": 66,
"styleRecalcDurationMs": 6.0520000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1487.836,
"heapDeltaBytes": 15524988,
"heapUsedBytes": 81220792,
"domNodes": -313,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 830.14,
"eventListeners": -112,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.792424242424246,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2410.6050000000323,
"styleRecalcs": 65,
"styleRecalcDurationMs": 5.9049999999999985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1651.2349999999997,
"heapDeltaBytes": 20016744,
"heapUsedBytes": 85971600,
"domNodes": -313,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 824.891,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.782517482517488,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 4026.520000000005,
"styleRecalcs": 71,
"styleRecalcDurationMs": 9.171000000000003,
"layouts": 60,
"layoutDurationMs": 10.489999999999998,
"taskDurationMs": 2003.546,
"heapDeltaBytes": -13152440,
"heapUsedBytes": 72509520,
"domNodes": 24,
"jsHeapTotalBytes": 561152,
"scriptDurationMs": 965.5039999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66570247933884,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3653.5619999999653,
"styleRecalcs": 69,
"styleRecalcDurationMs": 7.982999999999999,
"layouts": 60,
"layoutDurationMs": 9.739,
"taskDurationMs": 1786.578,
"heapDeltaBytes": 8668316,
"heapUsedBytes": 75826364,
"domNodes": 24,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 819.394,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665753424657535,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3198.9280000000235,
"styleRecalcs": 41,
"styleRecalcDurationMs": 4.2,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2109.643,
"heapDeltaBytes": 26040568,
"heapUsedBytes": 93004020,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 1059.073,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.841578947368426,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 3157.2499999999764,
"styleRecalcs": 42,
"styleRecalcDurationMs": 4.325999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2028.79,
"heapDeltaBytes": 17758716,
"heapUsedBytes": 84582792,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 1028.4089999999999,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.843850267379676,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2032.3210000000245,
"styleRecalcs": 8,
"styleRecalcDurationMs": 3.1719999999999993,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 686.1490000000001,
"heapDeltaBytes": -40221640,
"heapUsedBytes": 86570716,
"domNodes": -313,
"jsHeapTotalBytes": -2719744,
"scriptDurationMs": 36.384,
"eventListeners": -126,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6655737704918,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2030.91900000004,
"styleRecalcs": 7,
"styleRecalcDurationMs": 2.9899999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 624.5710000000001,
"heapDeltaBytes": 20781656,
"heapUsedBytes": 86642716,
"domNodes": -313,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 36.382,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 615.0749999999903,
"styleRecalcs": 45,
"styleRecalcDurationMs": 6.152000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 413.559,
"heapDeltaBytes": 13221508,
"heapUsedBytes": 69894048,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 153.91,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 598.9839999999731,
"styleRecalcs": 43,
"styleRecalcDurationMs": 5.188999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 427.36600000000004,
"heapDeltaBytes": 13176244,
"heapUsedBytes": 69476272,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 148.927,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66571428571429,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2051.074999999969,
"styleRecalcs": 10,
"styleRecalcDurationMs": 4.291999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 607.723,
"heapDeltaBytes": -40927640,
"heapUsedBytes": 61390448,
"domNodes": -235,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 13.073999999999998,
"eventListeners": -172,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2012.5260000000935,
"styleRecalcs": 9,
"styleRecalcDurationMs": 4.2299999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 578.654,
"heapDeltaBytes": 5502484,
"heapUsedBytes": 62292220,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 12.361,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 2006.8599999999606,
"styleRecalcs": 87,
"styleRecalcDurationMs": 19.107,
"layouts": 16,
"layoutDurationMs": 4.522,
"taskDurationMs": 1047.394,
"heapDeltaBytes": 23852728,
"heapUsedBytes": 81213488,
"domNodes": 0,
"jsHeapTotalBytes": 1310720,
"scriptDurationMs": 113.63600000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66583333333334,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1753.7059999999656,
"styleRecalcs": 77,
"styleRecalcDurationMs": 17.627999999999997,
"layouts": 16,
"layoutDurationMs": 4.7989999999999995,
"taskDurationMs": 845.086,
"heapDeltaBytes": -21674456,
"heapUsedBytes": 79597164,
"domNodes": -235,
"jsHeapTotalBytes": -3670016,
"scriptDurationMs": 114.083,
"eventListeners": -172,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846145,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1417.1870000000126,
"styleRecalcs": 19,
"styleRecalcDurationMs": 32.08699999999999,
"layouts": 5,
"layoutDurationMs": 15.483999999999998,
"taskDurationMs": 871.1809999999998,
"heapDeltaBytes": 33887924,
"heapUsedBytes": 113378912,
"domNodes": 14650,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 35.51199999999999,
"eventListeners": 2456,
"totalBlockingTimeMs": 151,
"frameDurationMs": 19.632876712328766,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 9890.014000000008,
"styleRecalcs": 250,
"styleRecalcDurationMs": 21.443000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6325.298,
"heapDeltaBytes": -34846232,
"heapUsedBytes": 90417856,
"domNodes": -313,
"jsHeapTotalBytes": -3575808,
"scriptDurationMs": 2879.978,
"eventListeners": -124,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.722504230118442,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 9463.620999999988,
"styleRecalcs": 248,
"styleRecalcDurationMs": 20.366,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6177.134,
"heapDeltaBytes": -34056396,
"heapUsedBytes": 91028540,
"domNodes": -313,
"jsHeapTotalBytes": -1478656,
"scriptDurationMs": 2856.4880000000003,
"eventListeners": -124,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.754787234042553,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 14236.69000000001,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13207.787999999999,
"heapDeltaBytes": -31007552,
"heapUsedBytes": 188941148,
"domNodes": -3046,
"jsHeapTotalBytes": 11673600,
"scriptDurationMs": 245.90799999999996,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 23.988888888888887,
"p95FrameDurationMs": 49.900000000001455
},
{
"name": "vue-large-graph-idle",
"durationMs": 14256.67400000009,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13195.625,
"heapDeltaBytes": -32619368,
"heapUsedBytes": 186875868,
"domNodes": -3046,
"jsHeapTotalBytes": 13377536,
"scriptDurationMs": 233.837,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 23.698006644518273,
"p95FrameDurationMs": 33.400000000001455
},
{
"name": "vue-large-graph-pan",
"durationMs": 23721.224000000006,
"styleRecalcs": 179,
"styleRecalcDurationMs": 18.844999999999974,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 23344.324,
"heapDeltaBytes": -28980240,
"heapUsedBytes": 189373988,
"domNodes": -3046,
"jsHeapTotalBytes": 6197248,
"scriptDurationMs": 909.5540000000001,
"eventListeners": -14913,
"totalBlockingTimeMs": 39,
"frameDurationMs": 44.19422718808193,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "vue-large-graph-pan",
"durationMs": 23569.14800000004,
"styleRecalcs": 180,
"styleRecalcDurationMs": 17.86500000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 23199.022,
"heapDeltaBytes": -26630980,
"heapUsedBytes": 189130280,
"domNodes": -3046,
"jsHeapTotalBytes": 6488064,
"scriptDurationMs": 933.476,
"eventListeners": -14913,
"totalBlockingTimeMs": 22,
"frameDurationMs": 44.5476370510397,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "vue-node-resize-workload",
"durationMs": 6815.759999999955,
"styleRecalcs": 20,
"styleRecalcDurationMs": 75.78599999999999,
"layouts": 20,
"layoutDurationMs": 26.28900000000001,
"taskDurationMs": 6677.899,
"heapDeltaBytes": 4900176,
"heapUsedBytes": 216824500,
"domNodes": 0,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 114.89499999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 39.861403508771936,
"p95FrameDurationMs": 83.39999999999964
},
{
"name": "vue-node-resize-workload",
"durationMs": 6797.054000000003,
"styleRecalcs": 20,
"styleRecalcDurationMs": 77.119,
"layouts": 20,
"layoutDurationMs": 27.489,
"taskDurationMs": 6681.612,
"heapDeltaBytes": 1001668,
"heapUsedBytes": 217304256,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 120.41499999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 38.855428571428575,
"p95FrameDurationMs": 83.39999999999964
},
{
"name": "vue-zoom-out-idle",
"durationMs": 9479.988000000048,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9119.186000000002,
"heapDeltaBytes": -32053184,
"heapUsedBytes": 184790996,
"domNodes": -3046,
"jsHeapTotalBytes": 7622656,
"scriptDurationMs": 146.24600000000004,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 32.927083333333336,
"p95FrameDurationMs": 66.60000000000218
},
{
"name": "vue-zoom-out-idle",
"durationMs": 9655.091999999968,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9326.408,
"heapDeltaBytes": -34310228,
"heapUsedBytes": 186787304,
"domNodes": -3046,
"jsHeapTotalBytes": 5337088,
"scriptDurationMs": 172.65500000000006,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 33.04657534246575,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "workflow-execution",
"durationMs": 169.98399999999947,
"styleRecalcs": 10,
"styleRecalcDurationMs": 13.855,
"layouts": 4,
"layoutDurationMs": 1.842,
"taskDurationMs": 147.187,
"heapDeltaBytes": -42601636,
"heapUsedBytes": 59875680,
"domNodes": -96,
"jsHeapTotalBytes": -3407872,
"scriptDurationMs": 11.447000000000003,
"eventListeners": -100,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663636363636382,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 126.25900000000456,
"styleRecalcs": 9,
"styleRecalcDurationMs": 10.739,
"layouts": 3,
"layoutDurationMs": 1.2040000000000002,
"taskDurationMs": 83.02999999999999,
"heapDeltaBytes": 4135180,
"heapUsedBytes": 60470424,
"domNodes": 119,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 6.088,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.675000000000068,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 820.2049999999872,
"styleRecalcs": 77,
"styleRecalcDurationMs": 83.898,
"layouts": 76,
"layoutDurationMs": 17.851,
"taskDurationMs": 779.27,
"heapDeltaBytes": 17563232,
"heapUsedBytes": 92390864,
"domNodes": 77,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 329.31100000000004,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665306122448968,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 719.6720000000596,
"styleRecalcs": 77,
"styleRecalcDurationMs": 79.469,
"layouts": 76,
"layoutDurationMs": 16.257,
"taskDurationMs": 679.8949999999999,
"heapDeltaBytes": 16438612,
"heapUsedBytes": 90856460,
"domNodes": 77,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 272.484,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66744186046511,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 1414.2479999999296,
"styleRecalcs": 77,
"styleRecalcDurationMs": 255.123,
"layouts": 76,
"layoutDurationMs": 20.136999999999997,
"taskDurationMs": 1400.396,
"heapDeltaBytes": -19608356,
"heapUsedBytes": 120736924,
"domNodes": 77,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 482.801,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.917499999999997,
"p95FrameDurationMs": 33.29999999999927
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 1416.9919999999365,
"styleRecalcs": 77,
"styleRecalcDurationMs": 251.228,
"layouts": 76,
"layoutDurationMs": 19.865000000000002,
"taskDurationMs": 1397.467,
"heapDeltaBytes": -19270924,
"heapUsedBytes": 118775732,
"domNodes": 77,
"jsHeapTotalBytes": 1835008,
"scriptDurationMs": 488.4,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.930379746835442,
"p95FrameDurationMs": 33.29999999999927
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff. Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #19736 +/- ##
==========================================
+ Coverage 85.96% 86.82% +0.86%
==========================================
Files 3623 2565 -1058
Lines 173330 144992 -28338
Branches 47850 39789 -8061
==========================================
- Hits 148997 125896 -23101
+ Misses 22311 18708 -3603
+ Partials 2022 388 -1634
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1067 files with indirect coverage changes 🚀 New features to boost your workflow:
|
christian-byrne
left a comment
There was a problem hiding this comment.
Exact-head review at d40ba2b. The guard fixes the immediate GraphCanvas traversal crash, and the focused test passes on this head while failing on parent a4df37d at visitGraphNodes. Two gaps keep this from proving the production repair end to end: the workflow-pack early return can permanently consume the one-shot fetch, and the regression fixture reproduces a null graph rather than the alert's undefined graph. Details inline.
| */ | ||
| const getWorkflowPacks = async () => { | ||
| const rootGraph = app.rootGraphOrUndefined | ||
| if (!rootGraph) return |
There was a problem hiding this comment.
This early return is followed unconditionally by startFetch(). With no root graph, that fetch receives an empty ID list and useAsyncState sets isReady=true; useManagerDisplayPacks then will not retry because it only triggers while !workflowPacksReady, and useMissingNodes retries only when activeWorkflow changes. The production race proves activeWorkflow can trigger before graph readiness, so this can turn the crash into a stale empty Workflow/Missing result for the current workflow. Please defer the fetch and add a graph-readiness retry (or otherwise keep the state unready) and cover undefined → ready with a workflow-pack test.
There was a problem hiding this comment.
Fixed in e0e8dda. startFetchWorkflowPacks no longer calls startFetch() when the root graph isn't ready — it sets a retryWhenGraphReady flag and returns instead, so isReady stays false rather than latching true on an empty list.
A whenever() watcher (using canvasStore.canvas as the reactive proxy for graph-readiness, same pattern as AgentPanelRoot.vue, since app.isGraphReady is a plain getter on a non-reactive class) retries startFetchWorkflowPacks() once the graph becomes ready, re-parsing the workflow and re-fetching from the registry.
Added useWorkflowPacks.test.ts (there wasn't one before) covering: fetch-when-already-ready, skip-without-marking-ready when not ready, and the undefined → ready retry actually producing a resolved result. I confirmed the new retry test fails (stuck isReady: false) against the old unconditional-startFetch() code and passes with the fix.
Generated by Claude Code
There was a problem hiding this comment.
Addressed on 3553561f66, on top of e0e8ddab50.
getWorkflowPacks() now reports whether it parsed anything, and startFetchWorkflowPacks() skips startFetch() when it did not, so isReady stays false instead of latching true on an empty pack-ID list. The deferred fetch is then served as soon as the graph arrives.
One change to how that retry is triggered. e0e8ddab50 watched canvasStore.canvas because app.isGraphReady read a plain field and could not drive a watcher — which needed an eslint-disable import-x/no-restricted-paths in production code, since workbench/ may not import from renderer/. rootGraphInternal is now a shallowRef, so isGraphReady is watchable directly and the suppression and the cross-layer import are both gone. The graph itself stays non-reactive (shallowRef) and the slot is written once per page load, so no consumer recomputes more often than before. The deferred flag is also cleared when a direct fetch succeeds, so a later readiness transition cannot fire a second redundant fetch.
Regression coverage in src/workbench/extensions/manager/composables/nodePack/useWorkflowPacks.test.ts, keeping e0e8ddab50's cases and adding one for "readiness alone is not a reason to fetch". Both the unready case and the undefined → ready case fail on the composable without this change, on the stated assertion (expected true to be false for isReady) rather than incidentally.
One thing I added beyond the finding, so it is visible rather than buried: useMissingNodes' missingCoreNodes passes the same force-cast app.rootGraph to collectAllNodes, and hasMissingNodes is read from the workflow chrome, which can mount before setup() finishes. That is the same alert, third call site, so it is guarded here too. Its test mock answered rootGraph but not rootGraphOrUndefined, so it could not distinguish a loaded graph from the pre-setup() state; it now mirrors both accessors, and the new case fails without the guard.
Not done, and deliberately: AgentPanelRoot.vue:825-828 documents the canvasStore.canvas workaround that is now unnecessary. It is inside the frozen remote-ops area, and the comment is stale rather than wrong, so I left it for whoever touches that file next.
There was a problem hiding this comment.
Direct coverage for the real readiness seam is now on 41452a0144 in src/scripts/app.graphReadiness.test.ts. The focused current-behavior set is green (4 files, 51 tests). Mutation proof: replacing the shallowRef getter/setter with the former plain field makes both new cases fail on their intended assertions (expected [] to deeply equal [true] and expected [undefined] to have a length of 2 but got 1); restoring it returns them to green. The PR body now also discloses the readiness mechanism and its broader reactive blast radius.
| settingStore.settingValues['Comfy.WidgetControlMode'] = 'after' | ||
| await nextTick() | ||
| })() | ||
| ).resolves.not.toThrow() |
There was a problem hiding this comment.
The production alert is Cannot read properties of undefined (reading 'nodes'), but this file's app mock sets rootGraph: null and has no rootGraphOrUndefined. Applied unchanged to parent a4df37d, this test fails with Cannot read properties of null (reading 'nodes'). It covers the traversal frame, but not the exact production input/message claimed in the PR. Please make the mock reproduce undefined and assert the failing call/message closely enough that the Sentry shape is pinned.
There was a problem hiding this comment.
Fixed in e0e8dda. The mock now sets rootGraph/rootGraphOrUndefined to undefined (matching what the real app.rootGraph getter actually returns before initialization), instead of null.
Verified by temporarily reverting the GraphCanvas.vue guard locally: with the old rootGraph: null mock the test failed with Cannot read properties of null (reading 'nodes'); with the fix it fails with the exact production message Cannot read properties of undefined (reading 'nodes'). Restoring the guard makes all 19 tests in the file pass again.
Generated by Claude Code
There was a problem hiding this comment.
Addressed on 3553561f66, on top of e0e8ddab50.
e0e8ddab50 set the mock to rootGraph: undefined, rootGraphOrUndefined: undefined, which does reproduce the production value, but as two independent literals: there is no way to make the graph become ready, so the guard's recovery behaviour stayed unproven, and the alert's message was still unasserted. The mock now mirrors ComfyApp's accessors over one backing field — graph and rootGraph force-cast it, rootGraphOrUndefined reports it honestly, isGraphReady derives from it — with a test-only setter standing in for the setup() assignment, and mountGraphCanvas resets it so every test starts from the pre-setup() state.
Three cases now, in GraphCanvas.test.ts:
pins the unready-root-graph traversal failure the alert reported— assertsrootGraphOrUndefinedisundefined, then that traversing it throws aTypeErrorwhose message namesundefinedand'nodes'. This passes with or without the guard by design; it is what makes case 2 a reproduction of the production input rather than of a stand-in.skips the control-widget sync instead of throwing when the root graph is not ready— on the parenta4df37dacdthis now fails with exactly:
TypeError: Cannot read properties of undefined (reading 'nodes')
❯ visitGraphNodes src/utils/graphTraversalUtil.ts:125:28
❯ forEachNode src/utils/graphTraversalUtil.ts:256:3
❯ src/components/graph/GraphCanvas.vue:392:5
Same message and same frames as CLOUD-FRONTEND-PROD-1YN. Previously it failed with the null variant, and passed on the fix only because rootGraphOrUndefined was absent from the mock.
still syncs control-widget labels once the root graph is ready— the early return skips a sync rather than cancelling one, so a user who changes the setting during startup still gets correct labels from the next change. The widget's label isundefinedwhile the graph is unready and changes with the mode once it is ready.
Full unit suite is green apart from a pre-existing unrelated firebase failure in UnifiedPricingTable.test.ts, which fails identically on d40ba2b021.
- GraphCanvas.test.ts: mock app.rootGraph/rootGraphOrUndefined as
undefined (not null) so the widget-control-mode regression test
reproduces the exact production Sentry message ("Cannot read
properties of undefined (reading 'nodes')") instead of a
null-shaped variant.
- useWorkflowPacks.ts: stop calling startFetch() with an empty id
list when the root graph isn't ready yet, which previously latched
isReady=true and stranded the Node Manager's workflow/missing tabs
on an empty result. Now the fetch is deferred and retried once the
graph becomes ready (signaled via canvasStore.canvas, set right
after comfyApp.setup() resolves). Adds a regression test covering
the undefined -> ready transition.
Builds on e0e8dda, which already deferred the workflow-pack fetch and kept `isReady` false for an unready graph. Three things on top of it. Removes the layer-rule suppression. That commit had to reach into `@/renderer/core/canvas/canvasStore` from `workbench/` — with an `eslint-disable import-x/no-restricted-paths` in production code — because `app.isGraphReady` reads a plain field and so could not drive a watcher, and `canvasStore.canvas` happens to be set at the same moment. The root cause is fixable: `rootGraphInternal` is now a `shallowRef`, so `isGraphReady` is watchable directly. The graph itself stays non-reactive and the slot is written once per page load, so nothing recomputes more often than before. The retry also clears its deferred flag when a direct fetch succeeds, so a later readiness transition cannot fire a second redundant fetch. Guards the third traversal of the same unready graph. `useMissingNodes`' `missingCoreNodes` passes the force-cast `app.rootGraph` to `collectAllNodes`, and `hasMissingNodes` is read from the workflow chrome, which can mount before `setup()` finishes. Its test mock answered `rootGraph` but not `rootGraphOrUndefined`, so it could not tell a loaded graph from the pre-`setup()` state; it now mirrors both accessors. Makes the GraphCanvas regression discriminating. `rootGraphOrUndefined: undefined` as a literal reproduces the production value but cannot express the transition, so the guard's recovery behaviour stayed unproven and the alert's message was still unasserted. The mock now mirrors ComfyApp's accessors over one backing field, one test pins the exact alert TypeError and its visitGraphNodes -> forEachNode frame, and one proves control-widget labels still sync on the next setting change once the graph is ready. Verified: the two pack-readiness cases and the missing-core-nodes case fail on the unfixed composables; the watcher case fails on the parent with "Cannot read properties of undefined (reading 'nodes')" at GraphCanvas.vue. Full unit suite green apart from a pre-existing unrelated firebase failure in UnifiedPricingTable.test.ts.
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 6 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 2 |
| 🟡 Medium | 3 |
| 🟢 Low | 1 |
Panel: 8/8 reviewers contributed findings.
| // Serve whatever was deferred as soon as the graph exists, so a fetch lost to | ||
| // the startup race is not waiting on another workflow switch to come back. | ||
| whenever( | ||
| () => app.isGraphReady, |
There was a problem hiding this comment.
🟠 High — app.isGraphReady flips true the moment setup() assigns a freshly constructed, still-empty LGraph; the workflow is deserialized into it much later, after registerNodes() and the post-setup workflow restore. The deferred retry therefore traverses zero nodes, getWorkflowPacks() returns true, startFetch() short-circuits on an empty id list, and isReady flips to true — exactly the terminal empty state this watcher's own comment says it prevents, with no second transition to correct it since the slot is written once per page load. Gate the retry on the workflow's nodes having landed (the graph's configured event or activeWorkflow) rather than on a graph object merely existing. Raised by 4 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case).
There was a problem hiding this comment.
Fixed in 51efbf2. Investigated the real ComfyApp.setup() sequence (src/scripts/app.ts): setup() creates a brand-new, empty LGraph, assigns it to rootGraphInternal (flipping isGraphReady true), then calls registerNodes() -- and GraphCanvas.vue only calls workflowPersistence.initializeWorkflow() (which deserializes the saved workflow's nodes into that graph) after setup() has already resolved. So app.isGraphReady going true is exactly the empty-graph moment, confirming this finding.
LGraph.configure() (called during workflow deserialization, and on every later reconfigure: workflow switch, undo, subgraph enter/exit) dispatches a configured event on graph.events in a finally block, so it fires once nodes have actually landed. This is an established pattern elsewhere in the codebase (appModeStore.ts's resetSelectedToWorkflow listener, useResolvedSelectedInputs.ts) -- useEventListener(() => (app.isGraphReady ? app.rootGraph.events : undefined), 'configured', ...).
Swapped the whenever(() => app.isGraphReady, ...) watcher for exactly that useEventListener on configured. Since whenever only fires on the one false→true transition and isGraphReady only flips once per page load, the old code could only ever retry once, on the empty graph. The configured event fires every time nodes are (re)configured, so the retry now actually waits for nodes.
Test updated per finding #4 below to assert this precisely: installing the empty graph alone must NOT resolve the deferred fetch; only a subsequent configured dispatch with the workflow's node actually in place does.
Generated by Claude Code
| // can be read before `ComfyApp.setup()` installs the graph, and `rootGraph` | ||
| // force-casts `undefined` straight into the traversal. | ||
| const rootGraph = app.rootGraphOrUndefined | ||
| if (!rootGraph) return {} |
There was a problem hiding this comment.
🟠 High — The early return makes rootGraphRef this computed's only tracked dependency: over an empty graph the predicate never runs, so nodeDefStore.nodeDefsByName is not tracked either, and LGraph.nodes is not reactive behind a shallowRef. After the single recompute caused by setup() installing the empty graph, the value is frozen at {} for the session and missing core nodes are never reported — the previous throwing version did not cache and recovered on the next read. Add a dependency that changes when the workflow's nodes arrive, e.g. workflowStore.activeWorkflow or a graph version. Raised by 3 of 8 reviewers (gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Fixed in 51efbf2. missingCoreNodes now tracks a graphConfiguredCount ref that's bumped from a useEventListener on the root graph's configured event (the same signal LGraph.configure() dispatches once nodes are actually (re)loaded). That ref is read unconditionally at the top of the computed, before the early return on a missing root graph, so the computed re-tracks and recomputes every time the workflow's nodes land instead of freezing after the single empty-graph recompute ComfyApp.setup() triggers. Added a regression test (useMissingNodes.test.ts, "recomputes once the graph is configured, not just once at graph-ready") that seeds an empty-graph snapshot, then dispatches configured with a real missing core node and asserts the computed updates.
Generated by Claude Code
| () => app.isGraphReady, | ||
| () => { | ||
| if (!fetchDeferredUntilGraphReady.value) return | ||
| void startFetchWorkflowPacks() |
There was a problem hiding this comment.
🟡 Medium — void startFetchWorkflowPacks() has no .catch, so a rejection in the retry path becomes an unhandled rejection that never reaches the composable's error/isLoading state. That path can reject on plausible input: inferPack dereferences nodeDefsByName[nodeName].isCoreNode with no nil check (undefined for exactly the unregistered-node case this feature targets, and this watcher can fire before registerNodes() populates the store), and inferPackFromNodeName is a network call. On rejection fetchDeferredUntilGraphReady stays true while isGraphReady never transitions again, so the deferred fetch is silently lost with nothing surfaced to the user. Raised by 6 of 8 reviewers (claude-opus-5-thinking-max adversarial, gemini-3.1-pro adversarial, kimi-k3-max adversarial, gemini-3.1-pro edge-case, gpt-5.6-sol-max edge-case, kimi-k3-max edge-case).
There was a problem hiding this comment.
Addressed in 51efbf2 by rewriting the existing retry test (rather than adding a parallel one) to match the real production sequence: it now installs an empty-nodes root graph first (what ComfyApp.setup() actually publishes), asserts the deferred fetch does not resolve on that alone, then pushes the workflow's node onto that same graph object and dispatches the graph's configured event (what LGraph.configure() does once deserialization actually lands the node) before asserting it resolves. Confirmed this test fails against the pre-fix #2 code (gating on app.isGraphReady resolves immediately on the empty graph, before the node is ever added) and passes on the fix.
Generated by Claude Code
| @@ -129,6 +139,7 @@ const _useWorkflowPacks = () => { | |||
|
|
|||
| workflowPacks.value = resolvedPacks | |||
There was a problem hiding this comment.
🟡 Medium — getWorkflowPacks captures the graph, awaits per-node registry lookups, then unconditionally overwrites workflowPacks/unresolvedNodeNames with no in-flight or generation guard, and the new whenever retry is a third concurrent trigger alongside useMissingNodes' activeWorkflow watch and useManagerDisplayPacks' tab watcher (neither checks isLoading). Overlapping runs are last-writer-wins at both layers — useAsyncState.execute publishes whichever startFetch finishes last, and getPacksByIds keeps a single shared AbortController so one run's cancel aborts another's request — so a stale or empty pack set can be published while isReady reads true. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, kimi-k3-max adversarial, kimi-k3-max edge-case).
There was a problem hiding this comment.
Fixed in 51efbf2. Checked this directory and comfyRegistryStore.ts for an existing generation/staleness pattern first (per the suggestion) -- found only ad hoc per-call AbortControllers (e.g. useConflictDetection.ts, comfyRegistryStore.ts's single shared getPacksByIdController), no existing generation/sequence-token helper to reuse, so added a minimal one scoped to this composable: a fetchGeneration counter incremented at the start of every startFetchWorkflowPacks() call, threaded into getWorkflowPacks(generation), and checked again right after its registry-lookup Promise.all resolves. If a newer call has started by then, the stale call's write to workflowPacks/unresolvedNodeNames is skipped and it also skips calling startFetch(), leaving the newer call's result (and whichever startFetch() call it triggers) as the one that wins.
This guards the specific overwrite this finding flagged (getWorkflowPacks's unconditional write). It does not fully eliminate the deeper residual race in useNodePacks's useAsyncState.execute() itself if two startFetch() calls end up in flight concurrently (last-settled wins there, which is inherent to useAsyncState and shared by every other caller of it in this codebase) -- flagging that as a known residual limitation rather than silently claiming full coverage.
Added a regression test ("does not let a stale, slower fetch overwrite a newer fetch that already resolved") that starts a slow call, lets a newer fast call finish first, then resolves the slow call's lookup afterward and asserts its stale result did not overwrite the fresher one.
Generated by Claude Code
|
|
||
| /** What `ComfyApp.setup()` publishes once the root graph exists. */ | ||
| function finishSetup(cnrId: string) { | ||
| vi.mocked(app).rootGraph = fromPartial<LGraph>({ |
There was a problem hiding this comment.
🟡 Medium — finishSetup publishes a root graph that already contains the workflow's node, but production publishes an empty LGraph and the nodes arrive later, so the "retries and resolves packs once the root graph becomes ready" test exercises an input production never produces — it would pass even with the empty-graph retry bug flagged on the whenever watcher. Seed with { nodes: [] }, assert the retry does not resolve yet, and only then add the node. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Fixed in 51efbf2, both halves.
-
Nil-check:
inferPacknow readsnodeDefStore.nodeDefsByName[nodeName]?.isCoreNodeinline instead of binding the lookup to a variable first and dereferencing.isCoreNodeunguarded, so an unregistered node type (missing def) no longer throws -- it falls through to the registry lookup, same as the existing "no local definition" path. Added a regression test (useWorkflowPacks.test.ts, "falls back to the registry instead of throwing when the node has no local def") that resolves a node with nocnr_id/aux_idand nonodeDefsByNameentry and assertsstartFetchWorkflowPacks()resolves (not rejects) and falls through toinferPackFromNodeName. -
Rejection handling: the
configured-event retry (finding Configure vite to copy from src to dist #2) now doesstartFetchWorkflowPacks().catch((err) => { error.value = ... })instead of a barevoid startFetchWorkflowPacks(), so a rejection surfaces through the composable's existingerrorstate instead of becoming an unhandled rejection. Added a regression test ("surfaces a retry rejection through the error state instead of losing it silently") that forces the registry lookup to reject and assertserror.valuebecomes thatErrorinstead of being lost.
Generated by Claude Code
| const resolvedPacks: WorkflowPack[] = [] | ||
| const unresolved: string[] = [] | ||
|
|
||
| await Promise.all( |
There was a problem hiding this comment.
🟢 Low — Promise.all fans out one inferPackFromNodeName registry request per node lacking cnr_id/aux_id, with no concurrency cap or timeout, so a large workflow with many distinct unknown node types issues hundreds of simultaneous registry requests — and the new graph-ready retry makes that fan-out fire automatically at startup instead of only on explicit user action. Batching or a small concurrency limit would bound it. Raised by 2 of 8 reviewers (gemini-3.1-pro adversarial, claude-opus-5-thinking-max adversarial).
There was a problem hiding this comment.
Deliberately not fixing this one. It's Low severity and flagged by only 2/8 reviewers, and I checked this directory and the broader composables/stores tree for an existing concurrency-limiting primitive (p-limit, a batching helper, etc.) to reuse -- there isn't one in this codebase. Inventing a new concurrency-limiting primitive for a Low finding felt out of scope for this bugfix PR (which is about the graph-readiness race, not registry fan-out shape), so leaving this as a follow-up rather than rolling a bespoke limiter here. Happy to file a ticket for it if the team wants it tracked.
Generated by Claude Code
- useMissingNodes: give missingCoreNodes a dependency (the graph's `configured` event) that changes once the workflow's nodes actually land, so it stops freezing at the empty-graph snapshot ComfyApp.setup() produces (finding #1). - useWorkflowPacks: retry the deferred fetch on the graph's `configured` event instead of `app.isGraphReady`, since `isGraphReady` flips true on the still-empty graph `setup()` installs, before the workflow is deserialized into it -- reproducing the exact terminal-empty-state bug the retry exists to fix (finding #2). - useWorkflowPacks: guard `inferPack`'s nodeDefsByName lookup against a missing def, and catch the retry's rejection into the composable's `error` state instead of letting it become an unhandled rejection that silently drops the deferred-fetch flag (finding #3). - useWorkflowPacks: add a generation guard so an older, slower fetch can't overwrite a newer one's result (finding #5). Finding #4's test is folded into the existing retry test, now seeded with the empty-then-deserialized graph shape production actually produces. Finding #6 (no concurrency cap on registry lookups) is left as a follow-up -- no p-limit/batching pattern exists in this codebase to reuse, and inventing one is out of scope for this bugfix.
There was a problem hiding this comment.
Verdict: comment. I found no blocking defects at 51efbf2, but the new tests leave two of the PR's guards unproven and useWorkflowPacks carries more state and prose than the fix needs.
The guards do what they claim when the root graph is undefined, and the configured-event retry fixes the empty-graph retry from the earlier round. The four P2s are:
- One test passes with the guard it protects deleted ("does not fetch on the configured event when nothing was deferred").
- The stale-fetch test fails only when both generation checks are removed together.
- No test covers the production order (composable first,
setup()later) that the reactive listener target exists for. getWorkflowPacksreturns one boolean with two meanings.
The rest are P3 and nits. Most of them delete the comment blocks this PR adds, which record review history, Sentry IDs, or causation the PR description disclaims. Every inline comment has a committable suggestion where the fix is local. I applied all 56 suggestion blocks together in a scratch copy: oxfmt and eslint are clean, pnpm typecheck exits 0, and the four changed test files pass (51 tests; four fewer because three tests are deleted and two are merged).
There are no pre-merge blockers.
Findings without an anchorable line (5)
- P3: The GraphCanvas guard cannot fire in production, so the PR body's claim that this call site can run before
setup()does not hold. The watcher returns early unlesscanvasStore.canvasis set. Its only production write issrc/components/graph/GraphCanvas.vue:569, aftercomfyApp.setup()assigned the graph atsrc/scripts/app.ts:1038. UsingrootGraphOrUndefinedthere is still reasonable and points the same way as #20059. But the "skips the control-widget sync" test builds a state production never reaches; see my inline comment on that test. - P3:
src/workbench/extensions/agent/AgentPanelRoot.vue:825-827still says "app.isGraphReadyis a plain getter" to justify watchingcanvasStore.canvasas a stand-in. This PR makes that false, and the newapp.tsdocblock describes exactly this workaround. The comment can go, and thecanvasStore.canvas &&stand-in can follow in this PR or a follow-up. - P3: Three statements in the PR description are not in the net diff (
git diff a4df37d..HEAD):- The
app.tsbullet says the PR "addsrootGraphOrUndefined", but the getter exists at base (app.ts:360). - It says the PR "removed an
eslint-disable import-x/no-restricted-pathsand aworkbench/→renderer/cross-layer import". Both were added ine0e8ddaand removed in3553561inside this branch, so main never had them. - The "Why the retry is gated on
configured" section lists subgraph enter/exit among theconfiguredtriggers; see my inline comment onuseWorkflowPacks.ts:214-224.
- The
- P3: The PR body ends with AI-attribution lines and two session links, and three of the five commits are authored as
Claude <noreply@anthropic.com>. AGENTS.md says not to mention Claude or AI in commits. The squash title, body and author should be checked before merge. The body is also much longer than the PR template's summary. - P3: This is a fix PR with no
browser_tests/change, and the description does not say why, which.coderabbit.yaml's "End-to-end regression coverage for fixes" check asks for. I agree a deterministic Playwright regression is impractical here: the race needs a read inside thesetup()/configure()window, and the fixtures have no seam to force that order. The unit tests are the lowest level that proves it, once the inline test findings are fixed. One sentence in the description saying so would close this.
Earlier findings: my dispositions (8)
- christian-byrne, early return latches
isReady: addressed for the undefined-graph case. A request on the installed-but-empty graph still latches; I posted that variant as a question onuseWorkflowPacks.ts:144-145, with a reproducing unit test. - christian-byrne, mock uses
null: addressed. The mock is backed byundefined, and with the guard reverted the guard test fails withCannot read properties of undefined (reading 'nodes'). The separate "pins the … failure the alert reported" test only exercises the file's mock, so I suggested deleting it. - Cursor panel, retry gated on
isGraphReadyruns on the empty graph: addressed. The retry listens forconfigured. Evaluating the listener target eagerly fails two tests. - Cursor panel,
missingCoreNodesfreezes at{}: addressed. Removingvoid graphConfiguredCount.valuefails the recompute test. That test still installs the graph before the composable exists; see my inline comment onuseMissingNodes.test.ts:458. - Cursor panel, unhandled retry rejection and
isCoreNodenil dereference: addressed. Reverting the?.fails two tests, and removing the.catchfails one with an unhandled rejection. The error routing is now inconsistent across triggers; see my inline comment onuseWorkflowPacks.ts:228-233. - Cursor panel, overlapping fetches are last-writer-wins: addressed for
workflowPacks. The residual race the author acknowledged inuseNodePacksdoes not exist: vueuse 14.4'suseAsyncStatedrops stale results by execution ID. The test does not pin either generation check on its own; see my inline comment onuseWorkflowPacks.test.ts:309-314. - Cursor panel, retry test seeded a non-empty graph: addressed. The retry test starts from an empty graph and resolves only after
configured. Its sibling "nothing was deferred" test is vacuous; see my inline comment onuseWorkflowPacks.test.ts:171-177. - Cursor panel, no concurrency cap on the registry fan-out: I agree with declining it.
useCachedRequestdedupes lookups per node name, and the retry only replaces a request that was deferred, so startup issues no more lookups than before the PR.
Unverified (1)
- P3: Making
isGraphReadyreactive also activatesappModeStore's existingconfiguredlistener (src/stores/appModeStore.ts:226-230) whenever the store is created beforesetup(). Before this PR that listener never attached in that case. On a workflow switch,configuredfires beforeafterLoadNewGraphupdatesactiveWorkflow(app.ts:1646). SoresetSelectedToWorkflowmay load the previous workflow'slinearDatain builder mode. The PR description flags this class of blast radius in general. The experiment that settles it: anappModeStoretest that creates the store before installing the graph, switches workflows in builder mode, and checks the new graph's selections, run at base and at this head.
Checked and cleared (8)
- The two
configuredlisteners are not duplicate triggers. They have different owners and effects, andappModeStore.ts:227uses the same pattern. - The
activeWorkflowwatch and the new retry are not redundant. The retry covers a workflow known before the graph exists. void graphConfiguredCount.valueis an established repo idiom (usePartnerNodesInGraph.ts,useMoreOptionsMenu.ts).unresolvedis never pushed to, sounresolvedNodeNamesis always[]. Base has the same code, so this PR did not introduce it.- The
isGraphReadydocblock (app.ts:382-385) stays. It documents reactivity on an exported getter, and a type cannot express that. - The double cast in
app.graphReadiness.test.ts'ssetGraphdoes not hide a rename. A renamed field leaves the watcher seeing nothing, and the test fails. - No open PR conflicts with this contract. Of the open PRs touching these files, only #19127 and #19299 touch
src/scripts/__mocks__/app.ts; neither reads the mock's root-graph state, andgit merge-treewith each is clean. - The description's counts hold: 127 reads across 58 files reproduces when
comfyApp.reads are counted, and thelitegraphUtil.ts:327-330andapp.ts:367/371references match the head.
Coverage
- Depth standard. I reviewed five lanes over all nine changed files: correctness, maintainability (including a no-comments inventory of all 49 added or changed comment blocks), idiomaticity, tests and documentation. No lanes were skipped.
- Checks at this head: the four changed test files pass (55 tests);
pnpm typecheckexits 0; eslint has 0 errors, and its three warnings are pre-existing inapp.ts; oxfmt and oxlint (type-aware, plus the vitest-cleanup audit config) are clean;git merge-treewith currentorigin/mainis clean; CI is green, and Fallow reported no new findings. - Mutations behind the test findings, each reverted:
- Removing the deferred-flag guard keeps 7/7 passing.
- Removing either generation check alone keeps 7/7.
- A deep
reactive(graph)setter keeps 2/2. - An eager listener target keeps
useMissingNodes.test.tsat 25/25. - Removing the GraphCanvas guard fails 2 of 3 tests.
- A scratch unit test reproduces the empty-installed-graph latch.
- I did not run Playwright, and I did not run the
appModeStoreexperiment above.
| /** | ||
| * Holds the root graph in a ref so its arrival can be watched. | ||
| * | ||
| * As a plain field it could not be: a watcher over any getter reading it | ||
| * never fired, so callers that had to react to the graph appearing watched an | ||
| * unrelated reactive value set at the same moment instead. `shallowRef` keeps | ||
| * the graph itself non-reactive, and the slot is written once per page load, | ||
| * so nothing recomputes more often than before — it just stops missing the | ||
| * one transition that matters. | ||
| */ |
There was a problem hiding this comment.
P3: This docblock records the history of the change (what the plain field could not do) rather than something a reader of the field needs. shallowRef and the isGraphReady docblock below already say the slot is reactive and the graph is not. The rationale fits the PR description better.
| /** | |
| * Holds the root graph in a ref so its arrival can be watched. | |
| * | |
| * As a plain field it could not be: a watcher over any getter reading it | |
| * never fired, so callers that had to react to the graph appearing watched an | |
| * unrelated reactive value set at the same moment instead. `shallowRef` keeps | |
| * the graph itself non-reactive, and the slot is written once per page load, | |
| * so nothing recomputes more often than before — it just stops missing the | |
| * one transition that matters. | |
| */ |
| private readonly rootGraphRef = shallowRef<LGraph | undefined>(undefined) | ||
|
|
||
| private get rootGraphInternal(): LGraph | undefined { | ||
| return this.rootGraphRef.value | ||
| } | ||
|
|
||
| private set rootGraphInternal(graph: LGraph | undefined) { | ||
| this.rootGraphRef.value = graph | ||
| } |
There was a problem hiding this comment.
Nit (P3): the private get/set pair only forwards to rootGraphRef.value, which is the alias-helper pattern engineering.md #11 asks to avoid. Declaring private readonly rootGraphInternal = shallowRef<LGraph>() and reading .value at the six sites (368, 372, 375, 379, 387, 1038) leaves one name for one slot. shallowRef<LGraph>() already infers ShallowRef<LGraph | undefined>, so the explicit | undefined and (undefined) are not needed either. No suggestion block because the change also touches those six lines.
| /** | ||
| * A ref, mirroring the real `isGraphReady`'s reactivity, so a test can stand | ||
| * in for `ComfyApp.setup()` and have readiness watchers fire. | ||
| */ |
There was a problem hiding this comment.
P3: The ShallowRef type on the next line says this.
| /** | |
| * A ref, mirroring the real `isGraphReady`'s reactivity, so a test can stand | |
| * in for `ComfyApp.setup()` and have readiness watchers fire. | |
| */ |
| /** | ||
| * Bumped whenever the root graph's nodes are (re)configured. `LGraph.nodes` | ||
| * isn't reactive on its own, and `rootGraphOrUndefined`'s underlying | ||
| * `shallowRef` only changes identity once per page load (when | ||
| * `ComfyApp.setup()` installs the graph), so without a dependency that | ||
| * changes once the workflow's nodes actually arrive, the early return | ||
| * below would make this computed's result freeze at `{}` after the single | ||
| * recompute `setup()` triggers — the empty-graph snapshot — and never | ||
| * report real missing core nodes for the session. | ||
| */ |
There was a problem hiding this comment.
P3: The name graphConfiguredCount, the 'configured' listener, and the void graphConfiguredCount.value read in the computed already say this. A counter read with void as a dependency is an established idiom in this repo (usePartnerNodesInGraph.ts, useMoreOptionsMenu.ts), so it does not need a ten-line explanation.
| /** | |
| * Bumped whenever the root graph's nodes are (re)configured. `LGraph.nodes` | |
| * isn't reactive on its own, and `rootGraphOrUndefined`'s underlying | |
| * `shallowRef` only changes identity once per page load (when | |
| * `ComfyApp.setup()` installs the graph), so without a dependency that | |
| * changes once the workflow's nodes actually arrive, the early return | |
| * below would make this computed's result freeze at `{}` after the single | |
| * recompute `setup()` triggers — the empty-graph snapshot — and never | |
| * report real missing core nodes for the session. | |
| */ |
| */ | ||
| const graphConfiguredCount = ref(0) | ||
| useEventListener( | ||
| () => (app.isGraphReady ? app.rootGraph.events : undefined), |
There was a problem hiding this comment.
P3: rootGraphOrUndefined reads the same shallowRef as isGraphReady, so it is just as reactive. The optional chain narrows in one read instead of pairing a boolean with the force-cast rootGraph getter, which logs console.error whenever the graph is missing. The computed below already asks the same question through rootGraphOrUndefined. I applied this change at both listener sites (here and useWorkflowPacks.ts:226) and the useMissingNodes, useWorkflowPacks and app.graphReadiness tests still pass (32/32), including the configured-retry and recompute cases.
| () => (app.isGraphReady ? app.rootGraph.events : undefined), | |
| () => app.rootGraphOrUndefined?.events, |
| // Finding #5 on PR #19736's Cursor review: `getWorkflowPacks` awaits a | ||
| // per-node registry lookup, then unconditionally overwrote `workflowPacks` | ||
| // with no in-flight guard, so an older, slower call finishing after a | ||
| // newer one could publish a stale result over it. |
There was a problem hiding this comment.
P3: This is review history ("Finding #5 on PR #19736's Cursor review"); the test name says what is checked.
| // Finding #5 on PR #19736's Cursor review: `getWorkflowPacks` awaits a | |
| // per-node registry lookup, then unconditionally overwrote `workflowPacks` | |
| // with no in-flight guard, so an older, slower call finishing after a | |
| // newer one could publish a stale result over it. |
| // Call A starts resolving the slow node and is left awaiting the | ||
| // registry lookup below. |
There was a problem hiding this comment.
P3: This narrates the next line.
| // Call A starts resolving the slow node and is left awaiting the | |
| // registry lookup below. |
| // The workflow switches before call A resolves (e.g. the manager tab | ||
| // trigger and this retry racing), and a newer call B starts and | ||
| // finishes first. |
There was a problem hiding this comment.
P3: This narrates the next lines.
| // The workflow switches before call A resolves (e.g. the manager tab | |
| // trigger and this retry racing), and a newer call B starts and | |
| // finishes first. |
| // Call A's slow registry lookup finally resolves. Its stale result must | ||
| // not overwrite call B's fresher one. |
There was a problem hiding this comment.
P3: This narrates the assertion; the test name says it.
| // Call A's slow registry lookup finally resolves. Its stale result must | |
| // not overwrite call B's fresher one. |
| await callA | ||
| await flushPromises() | ||
|
|
||
| expect(workflowPacks.value).toEqual([ | ||
| fromPartial<NodePack>({ id: 'pack-fast', name: 'pack-fast' }) | ||
| ]) |
There was a problem hiding this comment.
P2: This test fails only when both generation checks are removed. I removed each one alone and all seven tests still pass:
- The check at useWorkflowPacks.ts:161 protects the raw
workflowPacksref andunresolvedNodeNames.filterWorkflowPackreads those, and this test never checks it. - The check at :204 stops a superseded call from setting the deferred flag. Without it, the next
configuredevent refetches, and this test never dispatchesconfiguredafter call A.
Adding the outcome each guard owns, with filterWorkflowPack added to the destructure at 279, makes the :161 mutation fail; I ran that. The second block targets the :204 mutation; I have not run it.
expect(
filterWorkflowPack([
fromPartial<NodePack>({ id: 'pack-fast' }),
fromPartial<NodePack>({ id: 'pack-slow' })
])
).toEqual([fromPartial<NodePack>({ id: 'pack-fast' })])
mockListAllPacks.mockClear()
app.rootGraph.events.dispatch('configured')
await flushPromises()
expect(mockListAllPacks).not.toHaveBeenCalled()Prose because it spans 279 and the end of the test.
There was a problem hiding this comment.
Addressed in dec2a21: with the generation checks collapsed into one, removing that check fails this test, and the new filterWorkflowPack assertion covers the raw pack IDs.
Fix the tests the review found unable to fail: the "nothing was deferred" test now attaches its listener before `configured` fires, and useMissingNodes gets a test for the production order (composable created first, `setup()` installs the graph later). Collapse getWorkflowPacks to a parse-only helper that returns undefined without a graph, so startFetchWorkflowPacks owns a single generation check and each guard is proven by its own test. Drop the history and causation comments this branch added, and document the GraphCanvas control-mode guard as defensive.
There was a problem hiding this comment.
Verdict: ready for human review. All four round-1 P2s are fixed at dec2a21, and every open item that remains is P3 or a nit.
Fixed at this head: the "nothing was deferred" test now fails when its guard is removed; the stale-fetch test fails when the single generation check is removed; a new test covers the composable-first, graph-later order; and getWorkflowPacks is parse-only. The commit also deletes most of the comment blocks I flagged, and the PR description now covers the defensive GraphCanvas guard, the accurate configured triggers and the missing E2E test. I replied in each of the 42 threads this head addressed.
28 round-1 items are still open without a reply. Each is listed below with a link to its original thread and suggestion. The most substantive is the open question on useWorkflowPacks.ts:144-145 (now 123-124): a fetch on the installed-but-empty graph still latches isReady. I posted five new P3 comments, all on comment blocks or a cast added in dec2a21.
There are no pre-merge blockers.
Still open from round 1 (28)
- P3: Question: the empty installed graph still latches
isReady. Unchanged atuseWorkflowPacks.ts:123-124, which guards only a missing graph object, and the PR description still says the tabs "populate once the nodes actually land". I am still waiting on which of the two options you intend. - P3: Only the retry routes a rejection into
error, and the write ignores the generation. Unchanged atuseWorkflowPacks.ts:181-183. - P3: Use
toErrorinstead of hand-rolled normalization. Unchanged atuseWorkflowPacks.ts:182. - P3: Use
() => app.rootGraphOrUndefined?.eventsas the listener target. Unchanged atuseMissingNodes.ts:68anduseWorkflowPacks.ts:177(the second thread). - P3: Nit: private get/set pair aliases
rootGraphRef.value. Unchanged atapp.ts:345-353. - P3: The two readiness tests share one falsifier and miss deep proxying. Unchanged at
app.graphReadiness.test.ts:20-56. - P3: Nit:
setGraphas a function declaration. Unchanged atapp.graphReadiness.test.ts:7. - P3: The "pins…" test exercises only the file's mock. Renamed to "hands an undefined root graph to a traversal like the real getter", with a new comment (
GraphCanvas.test.ts:517-519) saying it "exercises this file's app mock, not GraphCanvas". That confirms the finding instead of answering it. The test, its comment, and theforEachNodeimport (thread) can still go. - P3: The "skips" test duplicates the first half of "still syncs" and builds an unreachable state. Renamed to "defensively skips…", with a new comment (
GraphCanvas.test.ts:537-539) saying the state "is not reachable in production". The PR description now calls the guard defensive, which I accept for the guard. A test of a state production never reaches still adds no falsifier that "still syncs…" lacks; with the guard removed both fail at the same call. - P3:
expect(controlWidget.label).toBeUndefined()cannot fail. Unchanged atGraphCanvas.test.ts:556. - P3: Exact label strings instead of truthy/not-equal. Unchanged at
GraphCanvas.test.ts:563-569. - P3:
setRootGraphdouble cast exists only because of the local mock's setter. Unchanged atGraphCanvas.test.ts:173-180. - P3: Nit:
fromPartial<IBaseWidget>for the control-widget fixture. Unchanged atGraphCanvas.test.ts:502-509. - P3: Hand-written app mock in useMissingNodes.test.ts. Partly addressed: the mock is now reactive, which made the late-install test possible. It is still a third hand-written copy of the accessors, now with an async
vi.hoistedimport ofvue; the sharedsrc/scripts/__mocks__/app.tsalready provides the reactive slot. - P3: Unneeded double cast and redundant assertions in the unready-graph test. Unchanged at
useMissingNodes.test.ts:412-422, including the "Stands in for…" comment. - P3: Nit:
fromPartial<LGraph>instead ofas unknown as LGraph. Unchanged atuseMissingNodes.test.ts:459-463, and the new test repeats the cast at 488-492 (new inline comment). - P3: Exact
toEqual({})instead of a key count. Unchanged atuseMissingNodes.test.ts:470. - P3: One exact
toEqualinstead of two count checks. Unchanged atuseMissingNodes.test.ts:476-477. The new test already uses the exact form. - P3: Derive the registry mock types from the service. Unchanged at
useWorkflowPacks.test.ts:24-26. - P3:
flushPromisesrelies onshouldAdvanceTime; doubled flushes are a magic count. Unchanged atuseWorkflowPacks.test.ts:34. - P3: Nit:
makePackedNodeas a function declaration. Unchanged atuseWorkflowPacks.test.ts:36-40. - P3: Use
createMockLGraphinstead of four hand-built graphs. Unchanged. - P3: Nit: explicit
mockReset()repeats the config. Unchanged atuseWorkflowPacks.test.ts:64-65. - P3: Assert the outcome instead of the
listAllPacksargument. Unchanged atuseWorkflowPacks.test.ts:90-93and 139-142. - P3: The "skips the registry fetch" test is the first half of the retry test. Unchanged at
useWorkflowPacks.test.ts:96-109. Its six-line comment is the one history comment in this file that this head kept. - P3: Assert the resolved pack instead of the
inferPackFromNodeNamecall. Unchanged atuseWorkflowPacks.test.ts:175-182. - P3: Trailing comment on
await nextTick(). Unchanged atuseWorkflowPacks.test.ts:196. - P3: Assert the injected error instead of
toBeInstanceOf(Error). Unchanged atuseWorkflowPacks.test.ts:205.
Round-1 body items
- P3, GraphCanvas guard unreachable in production: addressed in the PR description, which now calls the guard defensive and explains why.
- P3,
AgentPanelRoot.vue:825-827comment saysisGraphReadyis a plain getter: still open; the file is unchanged atdec2a21. - P3, description claims not in the net diff: addressed. The
rootGraphOrUndefined, eslint-disable and subgraph statements are corrected. - P3, AI attribution in the PR body and Claude-authored commits: still open.
dec2a21is also authored asClaude <noreply@anthropic.com>. - P3, no stated reason for skipping E2E: addressed by the new "Why there is no
browser_tests/regression" section. - Unverified P3,
appModeStore'sconfiguredlistener now attaches when the store predatessetup(): still unverified; the experiment from round 1 stands.
Checked and cleared this round
- The older "recomputes once the graph is configured" test is not made redundant by the new late-install test. It covers the composable created after the graph exists, which is the usual production order when the manager dialog opens later. A listener that attaches only on graph change would fail it and pass the new test.
- The reads of
missingCoreNodesbefore the graph arrives in the new test (lines 486 and 495) are load-bearing. They force the computed to cache the empty result, and without them the eager-target mutation would pass. - Earlier reviewers' threads (christian-byrne's two and the six from the Cursor panel) keep the dispositions from round 1. This head changes none of them.
Review record
- P3 History docblock on
rootGraphRef: round 1 thread; addressed atdec2a21, reply. - P3 Nit: private get/set pair aliases
rootGraphRef.value: round 1 thread; open, no author reply. - P3 Docblock restating
ShallowRef: round 1 thread; addressed atdec2a21, reply. - P3 Docblock on
graphConfiguredCount: round 1 thread; addressed atdec2a21, reply. - P3 Use
() => app.rootGraphOrUndefined?.eventsas the listener target: round 1 thread; open, no author reply. - P3 Comments in
missingCoreNodes, including the 1YN causation claim: round 1 thread; addressed atdec2a21, reply. - P3 Stale
fetchDeferredUntilGraphReadyname; ref never read reactively: round 1 thread; addressed atdec2a21, reply. - P3 Docblock on
fetchGeneration: round 1 thread; addressed atdec2a21, reply. - P3 Comment narrating the
?.isCoreNodecheck: round 1 thread; addressed atdec2a21, reply. - P2
getWorkflowPacksboolean with two meanings: round 1 thread; addressed atdec2a21, reply. - P3 Question: the empty installed graph still latches
isReady: round 1 thread; open, no author reply. - P3 Docblock overstating the deferral and citing 1YN: round 1 thread; addressed at
dec2a21, reply. - P3 Comment restating the generation check: round 1 thread; addressed at
dec2a21, reply. - P3 Retry comment claimed subgraph enter/exit dispatches
configured: round 1 thread; addressed atdec2a21, reply. - P3 Listener target in useWorkflowPacks (second site of
rootGraphOrUndefined?.events): round 1 thread; open, no author reply. - P3 Only the retry routes a rejection into
error, and the write ignores the generation: round 1 thread; open, no author reply. - P3 Use
toErrorinstead of hand-rolled normalization: round 1 thread; open, no author reply. - P3 Helper docblock in app.graphReadiness.test.ts: round 1 thread; addressed at
dec2a21, reply. - P3 Nit:
setGraphas a function declaration: round 1 thread; open, no author reply. - P3 The two readiness tests share one falsifier and miss deep proxying: round 1 thread; open, no author reply.
- P3
forEachNodeimport used only by the mock-only test: round 1 thread; open, no author reply. - P3 Mock history comment with Sentry ID: round 1 thread; addressed at
dec2a21, reply. - P3 Setter docblock: round 1 thread; addressed at
dec2a21, reply. - P3
setRootGraphdouble cast exists only because of the local mock's setter: round 1 thread; open, no author reply. - P3 Comment restating
setRootGraph(undefined): round 1 thread; addressed atdec2a21, reply. - P3 Helper docblock: round 1 thread; addressed at
dec2a21, reply. - P3 Nit:
fromPartial<IBaseWidget>for the control-widget fixture: round 1 thread; open, no author reply. - P3 The "pins…" test exercises only the file's mock: round 1 thread; open, no author reply.
- P3 The "skips" test duplicates the first half of "still syncs" and builds an unreachable state: round 1 thread; open, no author reply.
- P3 Comment restating the test name: round 1 thread; addressed at
dec2a21, reply. - P3
expect(controlWidget.label).toBeUndefined()cannot fail: round 1 thread; open, no author reply. - P3 Exact label strings instead of truthy/not-equal: round 1 thread; open, no author reply.
- P3 Mock comment with Sentry ID: round 1 thread; addressed at
dec2a21, reply. - P3 Hand-written app mock in useMissingNodes.test.ts: round 1 thread; open, no author reply.
- P3 Test comment with Sentry ID and stack text: round 1 thread; addressed at
dec2a21, reply. - P3 Unneeded double cast and redundant assertions in the unready-graph test: round 1 thread; open, no author reply.
- P3 "Finding #1" review-history comment: round 1 thread; addressed at
dec2a21, reply. - P2 No test for composable-first, graph-later order: round 1 thread; addressed at
dec2a21, reply. - P3 Nit:
fromPartial<LGraph>instead ofas unknown as LGraph: round 1 thread; open, no author reply. - P3 Narration comment: round 1 thread; addressed at
dec2a21, reply. - P3 Exact
toEqual({})instead of a key count: round 1 thread; open, no author reply. - P3 Narration comment: round 1 thread; addressed at
dec2a21, reply. - P3 One exact
toEqualinstead of two count checks: round 1 thread; open, no author reply. - P3 Derive the registry mock types from the service: round 1 thread; open, no author reply.
- P3
flushPromisesrelies onshouldAdvanceTime; doubled flushes are a magic count: round 1 thread; open, no author reply. - P3 Nit:
makePackedNodeas a function declaration: round 1 thread; open, no author reply. - P3 Helper docblock: round 1 thread; addressed at
dec2a21, reply. - P3 Use
createMockLGraphinstead of four hand-built graphs: round 1 thread; open, no author reply. - P3 Helper docblock: round 1 thread; addressed at
dec2a21, reply. - P3 Helper docblock: round 1 thread; addressed at
dec2a21, reply. - P3 Nit: explicit
mockReset()repeats the config: round 1 thread; open, no author reply. - P3 Sentry comment in
beforeEach: round 1 thread; addressed atdec2a21, reply. - P3 Assert the outcome instead of the
listAllPacksargument: round 1 thread; open, no author reply. - P3 The "skips the registry fetch" test is the first half of the retry test: round 1 thread; open, no author reply.
- P3 Narration comment: round 1 thread; addressed at
dec2a21, reply. - P3 "finding #2" review-history comment: round 1 thread; addressed at
dec2a21, reply. - P3 Narration comment: round 1 thread; addressed at
dec2a21, reply. - P3 Comment restating the test name: round 1 thread; addressed at
dec2a21, reply. - P2 "nothing was deferred" test passed with its guard deleted: round 1 thread; addressed at
dec2a21, reply. - P3 "Finding #3" review-history comment: round 1 thread; addressed at
dec2a21, reply. - P3 Fixture narration comment: round 1 thread; addressed at
dec2a21, reply. - P3 Assert the resolved pack instead of the
inferPackFromNodeNamecall: round 1 thread; open, no author reply. - P3 "Finding #3" comment on the rejection test: round 1 thread; addressed at
dec2a21, reply. - P3 Narration comment: round 1 thread; addressed at
dec2a21, reply. - P3 Narration comment: round 1 thread; addressed at
dec2a21, reply. - P3 Trailing comment on
await nextTick(): round 1 thread; open, no author reply. - P3 Assert the injected error instead of
toBeInstanceOf(Error): round 1 thread; open, no author reply. - P3 "Finding #5" review-history comment: round 1 thread; addressed at
dec2a21, reply. - P3 Narration comment: round 1 thread; addressed at
dec2a21, reply. - P3 Narration comment: round 1 thread; addressed at
dec2a21, reply. - P3 Narration comment: round 1 thread; addressed at
dec2a21, reply. - P2 Stale-fetch test did not pin either generation check alone: round 1 thread; addressed at
dec2a21, reply. - P3 GraphCanvas guard unreachable (body): addressed in the PR description.
- P3 AgentPanelRoot stale comment (body): open.
- P3 Description claims not in net diff (body): addressed in the PR description.
- P3 AI attribution (body): open.
- P3 E2E rationale (body): addressed in the PR description.
- Unverified appModeStore listener activation (body): still unverified.
- Earlier reviewers: christian-byrne x2 and Cursor panel x6, dispositioned in round 1; unchanged.
Checks at dec2a21: the four changed test files pass (56 tests); pnpm typecheck exits 0; eslint has 0 errors (three warnings, pre-existing in app.ts); oxfmt and type-aware oxlint are clean on the changed files; CI is green (105 success, 21 skipped). Mutations, each reverted: removing the deferred-flag guard fails 1 of 7; removing the generation check fails 1 of 7; an eager listener target fails the new late-install test; removing void graphConfiguredCount.value fails 2 tests.
| // Every other test mocks `@/scripts/app`, so this is the only place the real | ||
| // `shallowRef` seam is asserted. |
There was a problem hiding this comment.
P3: This new comment says where the test sits rather than what it checks. The test name and the unmocked @/scripts/app import already say it.
| // Every other test mocks `@/scripts/app`, so this is the only place the real | |
| // `shallowRef` seam is asserted. |
| // Backed by a `shallowRef`, like the real `ComfyApp`, so a test can install the | ||
| // graph after the composable exists and have its watchers see it. |
There was a problem hiding this comment.
P3: The shallowRef below says this. The shared src/scripts/__mocks__/app.ts already has a reactive slot; see my earlier thread on this mock.
| // Backed by a `shallowRef`, like the real `ComfyApp`, so a test can install the | |
| // graph after the composable exists and have its watchers see it. |
| const graph = { | ||
| nodes: [], | ||
| subgraphs: new Map(), | ||
| events: new CustomEventTarget<LGraphEventMap>() | ||
| } as unknown as LGraph |
There was a problem hiding this comment.
Nit (P3): this new test repeats the as unknown as LGraph cast from the older test at 459-463. fromPartial<LGraph>({ nodes: [], subgraphs: new Map(), events: new CustomEventTarget<LGraphEventMap>() }) types the same fixture without it. Prose because it also needs the @total-typescript/shoehorn import, which is outside this hunk.
| const workflowPacks = ref<WorkflowPack[]>([]) | ||
| const unresolvedNodeNames = ref<string[]>([]) | ||
|
|
||
| /** A fetch asked for before the graph existed, owed a retry on `configured`. */ |
There was a problem hiding this comment.
P3: The new name fetchDeferredUntilConfigured says this.
| /** A fetch asked for before the graph existed, owed a retry on `configured`. */ |
| * | ||
| * @returns `undefined` when the root graph does not exist yet. |
There was a problem hiding this comment.
P3: Line 124 says this, and the inferred return type already includes undefined.
| * | |
| * @returns `undefined` when the root graph does not exist yet. |
This test called forEachNode directly on the mock's rootGraph getter; it never exercised GraphCanvas.vue's watcher, which already early-returns before reaching that call. Per the PR body's own analysis, the watcher can only run after setup() has installed the root graph, so pinning the alert's exact TypeError here asserted a path that cannot occur in production. The crash this PR demonstrably fixes (the isCoreNode nil-deref in useWorkflowPacks' inferPack, firing 25-50/day per the alert thread) is already covered: useWorkflowPacks.test.ts's "falls back to the registry instead of throwing when the node has no local def" and "does not let a stale, slower fetch overwrite..." tests both fail with `TypeError: Cannot read properties of undefined (reading 'isCoreNode')` when the optional chaining in inferPack is reverted.
|
🔗 Commit SHA: 77c631f | Docs | View more details | Give us feedback! |
main moved IS_CONTROL_WIDGET from src/scripts/controlWidgetMarker to src/core/graph/widgets/controlWidgetMarker (see GraphCanvas.vue's own import) while this branch was in review. The merge didn't touch this import line, since the test file doesn't exist in that shape on main, so it silently pointed at a path that no longer exists and broke typecheck.
|
Re-stating this plainly so an open PR doesn't read as the alert being handled: What's known:
So this PR does not close 1YN. It guards those three call sites anyway (defensive, and makes the deferred work recover instead of latching empty) and it fixes a separate, measured crash: a nil-deref in If 1YN needs its own investigation, it needs real Sentry access to pull the actual stack trace — static analysis from this sandbox can't go further. Flagging that as a separate open item rather than something this PR resolves. |
The project's vitest setup now resets and restores every mock before each test, so these were flagged as redundant by the lint-pr / lint oxlint check on main.
christian-byrne
left a comment
There was a problem hiding this comment.
Exact-head review at 77c631ff881ac3fc1ef1c7cb8fce8b54d266add0, independently re-verified rather than re-reading the prior (now-dismissed) review.
Claim matches evidence. Title/body now lead with the measured fix (the inferPack nodeDefsByName[...]?.isCoreNode nil-check for the Node Manager crash firing 25-50/day) and explicitly disclaim CLOUD-FRONTEND-PROD-1YN causation, which is correct per the thread.
Verified locally, not just read:
src/workbench/extensions/manager/composables/nodePack/useWorkflowPacks.test.ts,useMissingNodes.test.ts,app.graphReadiness.test.ts,GraphCanvas.test.ts— 3 files / 31 tests green viaNODE_OPTIONS=--no-experimental-webstorage vitest run, plususeMissingNodes.test.tsseparately (26/26 green).- Mutation check: reverting the
inferPacknil-check (?.isCoreNode→.isCoreNode) makesuseWorkflowPacks.test.tsfail with the exact productionTypeError: Cannot read properties of undefined (reading 'isCoreNode')— the regression coverage is real, not vacuous. Reverted the change back afterward. - The removed
GraphCanvas.test.tscase (e3040905) correctly stopped pinning a shape that callsforEachNodedirectly on the mock rather than exercising the watcher, which already early-returns before that call per the watcher's own first guard — consistent withop414's boot-path measurement that this call site is unreachable in production. - Diff is narrowly scoped to the claimed fix plus defensive guards (
app.tsshallowRef seam,GraphCanvas.vue,useMissingNodes.ts); no unrelated changes.
1YN disposition is correctly stated as unexplained, both in the PR body and in a separate PR comment/Slack thread update — not something this review needs to re-litigate.
Approving.
Requested via Slack thread
Summary
Fixes a measured production crash: a nil-check on
inferPack'snodeDefsByNamelookup in the Node Manager's workflow-pack resolution. The unguarded lookup throwsTypeError: Cannot read properties of undefined (reading 'isCoreNode')for any node whose type isn't in the local def cache, which per#alert-frontend-issues-prodis still firing in Datadog RUM at roughly 25-50/day. This is this PR's defensible, evidence-backed fix.Alongside that, it guards three graph traversals that can run before
ComfyApp.setup()installs the root graph, and makes the work those guards defer recover instead of latching into a permanently-empty state. This part is caller guards plus recovery, not a root fix — see What this does not do.This PR does not establish a fix for
CLOUD-FRONTEND-PROD-1YN, the alert it was originally opened against. See below; this claim was walked back twice during review and the title/description previously still implied otherwise.Changes
useWorkflowPacks.ts— the production fix: a nil-check on thenodeDefsByNamelookup ininferPack(nodeDefStore.nodeDefsByName[nodeName]?.isCoreNode). Also: defers the registry fetch rather than publishing an empty list as the workflow's answer, retries it on the graph'sconfiguredevent, a generation guard so an older slower fetch cannot overwrite a newer one, and the retry's rejection surfaced into the composable'serrorstate instead of becoming an unhandled rejection.app.ts— back the root-graph slot with ashallowRefso the unready→ready transition is observable for the first time (rootGraphOrUndefinedalready exists at base; it becomes reactive as a result). This is load-bearing rather than cosmetic: theuseEventListenersources added below are() => (app.isGraphReady ? app.rootGraph.events : undefined)and can only re-evaluate becauseisGraphReadybecame reactive.useMissingNodes.ts— guard themissingCoreNodestraversal, and give it a dependency that changes when the workflow's nodes actually land (the graph'sconfiguredevent, read before the early return) so it stops freezing at the empty-graph snapshotsetup()produces.GraphCanvas.vue— skip the Widget Control Mode sync while the graph is unavailable. This guard is defensive: the watcher already returns early unlesscanvasStore.canvasis set, and the app's only write to it (canvasStore.canvas = comfyApp.canvasinGraphCanvas.vue's startup) comes aftercomfyApp.setup()has installed the root graph, so this call site cannot run before the graph exists today. It is kept for consistency with the sibling guards.Why the retry is gated on
configured, not on readinessapp.isGraphReadyflips true whensetup()installs a brand-new emptyLGraph, well before the workflow is deserialized into it. An earlier revision of this branch gated the retry onisGraphReadyand therefore retried on an empty graph — reproducing the exact terminal-empty-state bug the retry exists to prevent.LGraph.configure()dispatchesconfiguredfrom afinallyblock, so it fires after everyconfigure()call on the root graph (first load, workflow switch, undo), including one that throws partway, and not on subgraph enter/exit (that only callscanvas.setGraph(...)). A still-deferred fetch therefore keeps getting retried rather than being owed to a single possibly-empty transition. The retry test asserts the empty graph does not resolve.What this does not do
CLOUD-FRONTEND-PROD-1YN, the alert this PR was originally opened against. Stating this plainly because an open PR otherwise implies the alert is handled, and it is not:setup(). None of the three guarded callers can actually run before setup installs the root graph.ComfyAppstill exposes a nullable slot through non-nullable types:get graph()returnsthis.rootGraphInternal!andget rootGraph(): LGraphlogs then returnsthis.rootGraphInternal!(src/scripts/app.ts:367,:371). The pre-setup()window still exists, and because both getters are typed non-nullable the compiler still cannot catch a new unguarded caller. The three guards here were found by inspection; nothing prevents the fourth. At this head there are 127 reads ofapp.rootGraph/app.graphacross 58 non-test files outsideapp.ts. Tracked separately in ComfyApp.rootGraph / .graph are typed non-nullable but are undefined before setup(), so the compiler cannot find unguarded callers #20059, which proposes making the getters honest so the compiler enumerates the remaining callers. That is a type-level change across 58 files and does not belong in this bugfix.resolveNodeWidget(src/utils/litegraphUtil.ts:327-330) declaresgraph: LGraph = app.rootGraphand then dereferences it. It would throwreading 'getNodeById', notreading 'nodes', so it cannot be the 1YN source. Its siblingresolveNodeis already honest and guarded.p-limit/batching primitive exists in this codebase to reuse, and inventing one is out of scope for a bugfix.Why there is no
browser_tests/regressionThe race needs a read inside the
setup()/configure()window, and the Playwright fixtures have no seam to force that order deterministically. The unit tests are the lowest level that proves it: they drive the real composables through the undefined → empty graph → configured sequence.useWorkflowPacks.test.ts's "falls back to the registry instead of throwing when the node has no local def" and "does not let a stale, slower fetch overwrite a newer fetch that already resolved" tests are the regression coverage for the actual production fix: both fail withTypeError: Cannot read properties of undefined (reading 'isCoreNode')if the optional chaining ininferPackis reverted.An earlier revision of this PR also had a
GraphCanvas.test.tscase that calledforEachNodedirectly on the app mock'srootGraphgetter to pin the 1YN alert's exactTypeErrorshape. It never exercisedGraphCanvas.vueitself — the watcher it was meant to protect already early-returns before that call — so it asserted a path that cannot occur in production. Removed; see "What this does not do" above for why 1YN isn't this PR's claim to make.User-visible effect
The startup race no longer crashes graph traversal at these three call sites. If workflow-pack discovery runs before the workflow's nodes exist, the Workflow/Missing tabs populate once the nodes actually land rather than remaining empty until another trigger. The
isCoreNodenil-deref crash in Node Manager pack resolution no longer happens.Review focus
src/workbench/extensions/manager/composables/nodePack/useWorkflowPacks.ts— theinferPacknil-check (the actual production fix) and the defer/retry state machine.src/scripts/app.tsandsrc/scripts/app.graphReadiness.test.ts— theshallowRefseam. The graph itself stays unproxied and the slot is written once per page load, but existing reactive reads ofapp.isGraphReadycan now observe the setup transition. This activates previously inert early reads such as event-listener targets gated on readiness, so it is the main blast radius.src/components/graph/GraphCanvas.vueanduseMissingNodes.ts— traversal is skipped only while the graph is unavailable.