Repository navigation
refactor(agent): create agent nodes through loadSerialisedNode - #21753
Conversation
LiveGraphApplier.createNode now builds its document payload and hands it to loadSerialisedNode, so agent-created nodes get the same id/add/configure, missing-node placeholder, snap and size floor, widget migrations and loadedGraphNode hook as a workflow load. The applier keeps only its document widget projection, passed as the configure step. Created nodes and their incident links run inside withGraphConfiguring, and onGraphConfigured/onAfterGraphConfigured fire for them once the frame's links are in place (load semantics). Link edits to existing nodes stay interactive, so growAutogrowInput stays in resolveTargetSlot. Removes the applier-local missingNode and floorSizeToContent. Amp-Thread-ID: https://ampcode.com/threads/T-01a165f2-96fd-72e9-a637-82d4cb4487e5
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
📦 Bundle: ⏳ Size data collection in progress…⚡ Performance: ❌ 7 below 52 FPS target · ℹ️ No baseline — significance unavailable
DetailsScenario timings
Absolute values
Raw data{
"timestamp": "2026-11-02T01:02:38.078Z",
"gitSha": "83c4bdb0450ddf5f247311f4540605e2cdec3eb7",
"branch": "drjkl/fe-3397-9-extract-one-per-node-load-unit-shared-by-loadgraphdata-and",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2026.3080000000002,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.8130000000000006,
"layouts": 9,
"layoutDurationMs": 2.5940000000000003,
"taskDurationMs": 457.2,
"heapDeltaBytes": -1117332,
"heapUsedBytes": 60906992,
"domNodes": -178,
"jsHeapTotalBytes": 9437184,
"scriptDurationMs": 11.431999999999999,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667213114754095,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "canvas-idle",
"durationMs": 2009.91700000003,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.9219999999999997,
"layouts": 10,
"layoutDurationMs": 2.764,
"taskDurationMs": 426.213,
"heapDeltaBytes": 3653956,
"heapUsedBytes": 64482796,
"domNodes": -178,
"jsHeapTotalBytes": 2883584,
"scriptDurationMs": 10.771,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66611570247934,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1726.078000000001,
"styleRecalcs": 72,
"styleRecalcDurationMs": 14.158999999999997,
"layouts": 9,
"layoutDurationMs": 3.05,
"taskDurationMs": 731.821,
"heapDeltaBytes": 1112568,
"heapUsedBytes": 62190432,
"domNodes": 0,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 130.363,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846153,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1678.5350000000108,
"styleRecalcs": 72,
"styleRecalcDurationMs": 12.198,
"layouts": 10,
"layoutDurationMs": 2.391,
"taskDurationMs": 585.986,
"heapDeltaBytes": -3320872,
"heapUsedBytes": 65894076,
"domNodes": -178,
"jsHeapTotalBytes": 9175040,
"scriptDurationMs": 102.309,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665346534653462,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1719.645000000014,
"styleRecalcs": 19,
"styleRecalcDurationMs": 6.106999999999999,
"layouts": 11,
"layoutDurationMs": 3.497,
"taskDurationMs": 338.63100000000003,
"heapDeltaBytes": 7285140,
"heapUsedBytes": 84554432,
"domNodes": 57,
"jsHeapTotalBytes": 9961472,
"scriptDurationMs": 13.777,
"eventListeners": 43,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666019417475727,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1708.7760000000003,
"styleRecalcs": 18,
"styleRecalcDurationMs": 5.079000000000001,
"layouts": 12,
"layoutDurationMs": 2.933,
"taskDurationMs": 290.35299999999995,
"heapDeltaBytes": 6327884,
"heapUsedBytes": 84154300,
"domNodes": 57,
"jsHeapTotalBytes": 9175040,
"scriptDurationMs": 11.491000000000001,
"eventListeners": 43,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66601941747573,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 496.1129999999798,
"styleRecalcs": 13,
"styleRecalcDurationMs": 3.112,
"layouts": 9,
"layoutDurationMs": 2.4189999999999996,
"taskDurationMs": 340.29699999999997,
"heapDeltaBytes": 4119408,
"heapUsedBytes": 65321308,
"domNodes": 0,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 112.535,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.669999999999998,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 533.5709999999949,
"styleRecalcs": 15,
"styleRecalcDurationMs": 3.271,
"layouts": 10,
"layoutDurationMs": 2.359,
"taskDurationMs": 336.188,
"heapDeltaBytes": 9422316,
"heapUsedBytes": 86234460,
"domNodes": 0,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 108.67,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665625000000006,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 935.2800000000059,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 564.2200000000001,
"heapDeltaBytes": -10798720,
"heapUsedBytes": 77352516,
"domNodes": -208,
"jsHeapTotalBytes": 21766144,
"scriptDurationMs": 40.101,
"eventListeners": -106,
"totalBlockingTimeMs": 273,
"frameDurationMs": 25.927777777777766,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 943.443000000002,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 590.4780000000001,
"heapDeltaBytes": -7529220,
"heapUsedBytes": 77293340,
"domNodes": -208,
"jsHeapTotalBytes": 16785408,
"scriptDurationMs": 40.498,
"eventListeners": -106,
"totalBlockingTimeMs": 290,
"frameDurationMs": 26.66285714285715,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 749.9800000000221,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 392.41400000000004,
"heapDeltaBytes": -2112860,
"heapUsedBytes": 84945012,
"domNodes": -208,
"jsHeapTotalBytes": 3801088,
"scriptDurationMs": 109.23000000000002,
"eventListeners": -106,
"totalBlockingTimeMs": 103,
"frameDurationMs": 20.833333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 712.6389999999674,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 358.74300000000005,
"heapDeltaBytes": -1830856,
"heapUsedBytes": 84431032,
"domNodes": -208,
"jsHeapTotalBytes": 4587520,
"scriptDurationMs": 99.36699999999999,
"eventListeners": -106,
"totalBlockingTimeMs": 93,
"frameDurationMs": 20.477142857142876,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6956.942999999996,
"styleRecalcs": 3,
"styleRecalcDurationMs": 0.8279999999999997,
"layouts": 3,
"layoutDurationMs": 0.7009999999999998,
"taskDurationMs": 6003.376,
"heapDeltaBytes": 56188940,
"heapUsedBytes": 133192500,
"domNodes": -274,
"jsHeapTotalBytes": 64876544,
"scriptDurationMs": 4493.553999999999,
"eventListeners": -68,
"totalBlockingTimeMs": 32,
"frameDurationMs": 21.976025236593063,
"p95FrameDurationMs": 33.40000000000009
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6721.961000000021,
"styleRecalcs": 4,
"styleRecalcDurationMs": 1.0879999999999996,
"layouts": 4,
"layoutDurationMs": 0.9550000000000001,
"taskDurationMs": 5780.385,
"heapDeltaBytes": 46520784,
"heapUsedBytes": 121435816,
"domNodes": -274,
"jsHeapTotalBytes": 53080064,
"scriptDurationMs": 4314.977,
"eventListeners": -68,
"totalBlockingTimeMs": 36,
"frameDurationMs": 21.877524429967426,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 6602.486999999996,
"styleRecalcs": 4,
"styleRecalcDurationMs": 1.2800000000000007,
"layouts": 4,
"layoutDurationMs": 1.1339999999999997,
"taskDurationMs": 5589.747,
"heapDeltaBytes": 52114192,
"heapUsedBytes": 128073908,
"domNodes": -274,
"jsHeapTotalBytes": 60157952,
"scriptDurationMs": 4209.4169999999995,
"eventListeners": -68,
"totalBlockingTimeMs": 23,
"frameDurationMs": 20.496273291925466,
"p95FrameDurationMs": 33.40000000000009
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 6103.420000000028,
"styleRecalcs": 4,
"styleRecalcDurationMs": 1.2349999999999999,
"layouts": 4,
"layoutDurationMs": 1.107,
"taskDurationMs": 5123.911999999999,
"heapDeltaBytes": 67710436,
"heapUsedBytes": 142345720,
"domNodes": -274,
"jsHeapTotalBytes": 50720768,
"scriptDurationMs": 3839.493,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.540121580547112,
"p95FrameDurationMs": 33.30000000000018
},
{
"name": "large-combo-open",
"durationMs": 159.18300000001295,
"styleRecalcs": 21,
"styleRecalcDurationMs": 12.625,
"layouts": 11,
"layoutDurationMs": 3.0140000000000002,
"taskDurationMs": 114.285,
"heapDeltaBytes": 14836556,
"heapUsedBytes": 92466644,
"domNodes": 936,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 6.368,
"eventListeners": 205,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.428571428571427,
"p95FrameDurationMs": 50
},
{
"name": "large-combo-open",
"durationMs": 152.4750000000381,
"styleRecalcs": 22,
"styleRecalcDurationMs": 11.215000000000002,
"layouts": 12,
"layoutDurationMs": 2.9180000000000006,
"taskDurationMs": 106.19800000000001,
"heapDeltaBytes": 14714704,
"heapUsedBytes": 92076484,
"domNodes": 936,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 6.089,
"eventListeners": 205,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.428571428571427,
"p95FrameDurationMs": 50
},
{
"name": "large-graph-idle",
"durationMs": 2025.6669999999986,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.948,
"layouts": 10,
"layoutDurationMs": 2.649,
"taskDurationMs": 485.627,
"heapDeltaBytes": -28066764,
"heapUsedBytes": 60936676,
"domNodes": -274,
"jsHeapTotalBytes": 3309568,
"scriptDurationMs": 31.39,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6655737704918,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "large-graph-idle",
"durationMs": 2026.6469999999686,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.941,
"layouts": 9,
"layoutDurationMs": 2.4270000000000005,
"taskDurationMs": 452.43699999999995,
"heapDeltaBytes": -20188524,
"heapUsedBytes": 61097600,
"domNodes": -274,
"jsHeapTotalBytes": 3534848,
"scriptDurationMs": 31.890000000000008,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6655737704918,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2800.6839999999897,
"styleRecalcs": 69,
"styleRecalcDurationMs": 11.209,
"layouts": 8,
"layoutDurationMs": 1.9820000000000002,
"taskDurationMs": 1293.431,
"heapDeltaBytes": -11373624,
"heapUsedBytes": 72444144,
"domNodes": -274,
"jsHeapTotalBytes": 4284416,
"scriptDurationMs": 602.275,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666071428571428,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2984.577999999999,
"styleRecalcs": 70,
"styleRecalcDurationMs": 11.415,
"layouts": 8,
"layoutDurationMs": 2.047,
"taskDurationMs": 1302.025,
"heapDeltaBytes": -373000,
"heapUsedBytes": 78260576,
"domNodes": -274,
"jsHeapTotalBytes": 3760128,
"scriptDurationMs": 609.032,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66536312849162,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3818.5060000000135,
"styleRecalcs": 72,
"styleRecalcDurationMs": 12.613999999999999,
"layouts": 66,
"layoutDurationMs": 12.391,
"taskDurationMs": 1397.608,
"heapDeltaBytes": -10646820,
"heapUsedBytes": 81066676,
"domNodes": -250,
"jsHeapTotalBytes": 4882432,
"scriptDurationMs": 582.0609999999999,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66593886462882,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "large-graph-zoom",
"durationMs": 3670.2099999999973,
"styleRecalcs": 74,
"styleRecalcDurationMs": 12.525000000000002,
"layouts": 67,
"layoutDurationMs": 12.396,
"taskDurationMs": 1367.927,
"heapDeltaBytes": -8341084,
"heapUsedBytes": 75982612,
"domNodes": -250,
"jsHeapTotalBytes": 4583424,
"scriptDurationMs": 566.653,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665909090909093,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3092.802000000006,
"styleRecalcs": 45,
"styleRecalcDurationMs": 6.639,
"layouts": 6,
"layoutDurationMs": 1.5879999999999996,
"taskDurationMs": 1621.3999999999999,
"heapDeltaBytes": -10000084,
"heapUsedBytes": 76096948,
"domNodes": 0,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 798.379,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.755675675675676,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2439.0359999999873,
"styleRecalcs": 46,
"styleRecalcDurationMs": 6.464999999999999,
"layouts": 7,
"layoutDurationMs": 1.6530000000000005,
"taskDurationMs": 1362.655,
"heapDeltaBytes": -5217000,
"heapUsedBytes": 74174008,
"domNodes": 0,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 670.709,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665986394557823,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-geometry-cadence",
"durationMs": 2853.2089999999926,
"styleRecalcs": 8,
"styleRecalcDurationMs": 1.9619999999999993,
"layouts": 8,
"layoutDurationMs": 1.739,
"taskDurationMs": 529.478,
"heapDeltaBytes": -3177888,
"heapUsedBytes": 82032824,
"domNodes": -274,
"jsHeapTotalBytes": 5107712,
"scriptDurationMs": 247.15800000000002,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66608187134503,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-geometry-cadence",
"durationMs": 2823.48300000001,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.262,
"layouts": 8,
"layoutDurationMs": 1.8419999999999999,
"taskDurationMs": 507.4989999999999,
"heapDeltaBytes": -19785688,
"heapUsedBytes": 72109128,
"domNodes": 0,
"jsHeapTotalBytes": 5279744,
"scriptDurationMs": 255.08700000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66627218934911,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2037.3129999999833,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.6570000000000005,
"layouts": 9,
"layoutDurationMs": 2.3040000000000003,
"taskDurationMs": 504.246,
"heapDeltaBytes": -6742812,
"heapUsedBytes": 78512960,
"domNodes": -274,
"jsHeapTotalBytes": 3272704,
"scriptDurationMs": 30.722000000000005,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666393442622947,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "minimap-idle",
"durationMs": 2037.9369999999994,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.92,
"layouts": 10,
"layoutDurationMs": 2.5640000000000005,
"taskDurationMs": 515.432,
"heapDeltaBytes": -24138948,
"heapUsedBytes": 68199152,
"domNodes": -274,
"jsHeapTotalBytes": 4096000,
"scriptDurationMs": 33.245999999999995,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66639344262295,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-progress-execution-cadence",
"durationMs": 2675.7029999999986,
"styleRecalcs": 28,
"styleRecalcDurationMs": 11.404000000000002,
"layouts": 9,
"layoutDurationMs": 2.2489999999999997,
"taskDurationMs": 389.551,
"heapDeltaBytes": -18715048,
"heapUsedBytes": 71987368,
"domNodes": 19,
"jsHeapTotalBytes": 4231168,
"scriptDurationMs": 134.30800000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66645962732919,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-progress-execution-cadence",
"durationMs": 2694.1380000000095,
"styleRecalcs": 28,
"styleRecalcDurationMs": 12.310999999999998,
"layouts": 8,
"layoutDurationMs": 2.3499999999999996,
"taskDurationMs": 453.99699999999996,
"heapDeltaBytes": -4178464,
"heapUsedBytes": 81919484,
"domNodes": -268,
"jsHeapTotalBytes": 4321280,
"scriptDurationMs": 144.292,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666049382716054,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "minimap-topology-cadence",
"durationMs": 2929.126999999994,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.5260000000000007,
"layouts": 8,
"layoutDurationMs": 2.04,
"taskDurationMs": 611.315,
"heapDeltaBytes": -11254120,
"heapUsedBytes": 79881056,
"domNodes": 0,
"jsHeapTotalBytes": 6328320,
"scriptDurationMs": 245.76500000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665909090909093,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-topology-cadence",
"durationMs": 2875.3719999999703,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.038,
"layouts": 9,
"layoutDurationMs": 1.887,
"taskDurationMs": 620.1139999999998,
"heapDeltaBytes": -5950804,
"heapUsedBytes": 79088112,
"domNodes": -274,
"jsHeapTotalBytes": 4059136,
"scriptDurationMs": 237.83599999999998,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665697674418606,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 543.4260000000108,
"styleRecalcs": 48,
"styleRecalcDurationMs": 6.644999999999999,
"layouts": 11,
"layoutDurationMs": 3.1310000000000002,
"taskDurationMs": 350.89,
"heapDeltaBytes": 4066048,
"heapUsedBytes": 83170300,
"domNodes": 0,
"jsHeapTotalBytes": 9175040,
"scriptDurationMs": 109.67200000000001,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 562.0809999999778,
"styleRecalcs": 48,
"styleRecalcDurationMs": 6.332000000000001,
"layouts": 10,
"layoutDurationMs": 2.8019999999999996,
"taskDurationMs": 380.358,
"heapDeltaBytes": -2360812,
"heapUsedBytes": 67210284,
"domNodes": 0,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 115.37299999999999,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667647058823523,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2019.3529999999953,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.869999999999999,
"layouts": 10,
"layoutDurationMs": 2.179,
"taskDurationMs": 300.83000000000004,
"heapDeltaBytes": 4615988,
"heapUsedBytes": 65809352,
"domNodes": 0,
"jsHeapTotalBytes": 2883584,
"scriptDurationMs": 5.951,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66611570247934,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-idle",
"durationMs": 2017.89100000002,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.6039999999999996,
"layouts": 8,
"layoutDurationMs": 2.2269999999999994,
"taskDurationMs": 374.7819999999999,
"heapDeltaBytes": 4634240,
"heapUsedBytes": 65312636,
"domNodes": 0,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 8.868,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66611570247934,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1711.084999999997,
"styleRecalcs": 75,
"styleRecalcDurationMs": 13.911,
"layouts": 9,
"layoutDurationMs": 1.9929999999999999,
"taskDurationMs": 615.834,
"heapDeltaBytes": 1803352,
"heapUsedBytes": 63072772,
"domNodes": -192,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 84.895,
"eventListeners": -113,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666019417475727,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1719.947999999988,
"styleRecalcs": 78,
"styleRecalcDurationMs": 20.758,
"layouts": 11,
"layoutDurationMs": 3.041,
"taskDurationMs": 682.135,
"heapDeltaBytes": 19564784,
"heapUsedBytes": 80826104,
"domNodes": 0,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 97.738,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665686274509806,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-transition-enter",
"durationMs": 884.8189999999931,
"styleRecalcs": 19,
"styleRecalcDurationMs": 15.911999999999999,
"layouts": 5,
"layoutDurationMs": 9.357,
"taskDurationMs": 681.821,
"heapDeltaBytes": 11195204,
"heapUsedBytes": 87061124,
"domNodes": 15869,
"jsHeapTotalBytes": 7213056,
"scriptDurationMs": 22.633999999999993,
"eventListeners": 3246,
"totalBlockingTimeMs": 123,
"frameDurationMs": 20.541860465116272,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 10940.604000000007,
"styleRecalcs": 250,
"styleRecalcDurationMs": 38.775000000000006,
"layouts": 9,
"layoutDurationMs": 2.221,
"taskDurationMs": 4790.887000000001,
"heapDeltaBytes": -20252528,
"heapUsedBytes": 61918952,
"domNodes": -274,
"jsHeapTotalBytes": 3534848,
"scriptDurationMs": 2166.3129999999996,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665905631659058,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 9985.394999999982,
"styleRecalcs": 250,
"styleRecalcDurationMs": 38.40200000000001,
"layouts": 9,
"layoutDurationMs": 2.225,
"taskDurationMs": 4543.649,
"heapDeltaBytes": 409804,
"heapUsedBytes": 83708764,
"domNodes": -274,
"jsHeapTotalBytes": 4022272,
"scriptDurationMs": 2065.325,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665943238731217,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17019.262999999966,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16367.021999999999,
"heapDeltaBytes": -5283228,
"heapUsedBytes": 269526012,
"domNodes": -3329,
"jsHeapTotalBytes": 19914752,
"scriptDurationMs": 222.77299999999997,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 29.115555555555552,
"p95FrameDurationMs": 66.5
},
{
"name": "vue-large-graph-idle",
"durationMs": 17161.299000000043,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16366.698,
"heapDeltaBytes": 2937140,
"heapUsedBytes": 287795096,
"domNodes": -3329,
"jsHeapTotalBytes": 10997760,
"scriptDurationMs": 239.14799999999997,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 29.193877551020407,
"p95FrameDurationMs": 50.10000000000218
},
{
"name": "vue-large-graph-pan",
"durationMs": 19417.272000000026,
"styleRecalcs": 150,
"styleRecalcDurationMs": 20.003999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 19039.327,
"heapDeltaBytes": -44596132,
"heapUsedBytes": 259152336,
"domNodes": -3329,
"jsHeapTotalBytes": 18857984,
"scriptDurationMs": 729.829,
"eventListeners": -651,
"totalBlockingTimeMs": 60,
"frameDurationMs": 35.30181818181819,
"p95FrameDurationMs": 66.79999999999927
},
{
"name": "vue-large-graph-pan",
"durationMs": 19159.98099999996,
"styleRecalcs": 156,
"styleRecalcDurationMs": 20.098999999999993,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 18790.090000000004,
"heapDeltaBytes": -15750616,
"heapUsedBytes": 258693904,
"domNodes": -3329,
"jsHeapTotalBytes": 19910656,
"scriptDurationMs": 716.398,
"eventListeners": -651,
"totalBlockingTimeMs": 39,
"frameDurationMs": 35.958724202626634,
"p95FrameDurationMs": 66.79999999999927
},
{
"name": "vue-node-resize-workload",
"durationMs": 6289.985999999999,
"styleRecalcs": 20,
"styleRecalcDurationMs": 43.241000000000014,
"layouts": 20,
"layoutDurationMs": 23.936,
"taskDurationMs": 6169.314,
"heapDeltaBytes": -15671552,
"heapUsedBytes": 259436828,
"domNodes": -3329,
"jsHeapTotalBytes": 25681920,
"scriptDurationMs": 96.07099999999998,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 35.29831460674158,
"p95FrameDurationMs": 66.80000000000018
},
{
"name": "vue-node-resize-workload",
"durationMs": 6008.664000000067,
"styleRecalcs": 20,
"styleRecalcDurationMs": 42.88499999999999,
"layouts": 20,
"layoutDurationMs": 23.74899999999999,
"taskDurationMs": 5890.173,
"heapDeltaBytes": -43064764,
"heapUsedBytes": 265077528,
"domNodes": -3329,
"jsHeapTotalBytes": 28303360,
"scriptDurationMs": 94.94800000000001,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 33.61061452513967,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-zoom-out-idle",
"durationMs": 7731.082000000015,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7258.179999999999,
"heapDeltaBytes": -8644736,
"heapUsedBytes": 264680640,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 91.20700000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 26.03703703703704,
"p95FrameDurationMs": 50
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8263.832999999977,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7729.794999999999,
"heapDeltaBytes": -18582620,
"heapUsedBytes": 262857420,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 106.18099999999997,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 27.832659932659936,
"p95FrameDurationMs": 50.099999999998545
},
{
"name": "workflow-execution",
"durationMs": 96.14899999996851,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.2749999999999995,
"layouts": 7,
"layoutDurationMs": 1.933,
"taskDurationMs": 67.07800000000002,
"heapDeltaBytes": -12742868,
"heapUsedBytes": 62088936,
"domNodes": 101,
"jsHeapTotalBytes": 7864320,
"scriptDurationMs": 6.369,
"eventListeners": 3,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "workflow-execution",
"durationMs": 456.59500000010667,
"styleRecalcs": 14,
"styleRecalcDurationMs": 8.206000000000001,
"layouts": 13,
"layoutDurationMs": 3.536,
"taskDurationMs": 89.91600000000001,
"heapDeltaBytes": 7118284,
"heapUsedBytes": 68205044,
"domNodes": 99,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 9.077000000000002,
"eventListeners": 3,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.671428571428578,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 255.86700000008022,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.627,
"layouts": 76,
"layoutDurationMs": 12.352,
"taskDurationMs": 202.889,
"heapDeltaBytes": 10074516,
"heapUsedBytes": 48421660,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 88.33000000000001,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 247.96100000003207,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.642,
"layouts": 76,
"layoutDurationMs": 12.116,
"taskDurationMs": 198.25199999999998,
"heapDeltaBytes": 10010732,
"heapUsedBytes": 51871656,
"domNodes": 4,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 83.538,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.659999999999975,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 441.4249999999811,
"styleRecalcs": 5,
"styleRecalcDurationMs": 10.41,
"layouts": 76,
"layoutDurationMs": 14.66,
"taskDurationMs": 410.397,
"heapDeltaBytes": -1356132,
"heapUsedBytes": 88873600,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 112.962,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.362499999999994,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 404.53600000000733,
"styleRecalcs": 5,
"styleRecalcDurationMs": 2.648,
"layouts": 76,
"layoutDurationMs": 18.308999999999997,
"taskDurationMs": 363.39899999999994,
"heapDeltaBytes": 258344,
"heapUsedBytes": 94397400,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 133.808,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664000000000016,
"p95FrameDurationMs": 16.700000000000728
}
]
}🔬 E2E Coverage: 🟡 59.8% of linesCoverage totals
Top 10 files by uncovered lines
🎭 Playwright: ✅ 3179 passed, 0 failed · 2 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measureExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
Findings and check detailsThe matrix runs on same-repository version-bump PRs with relevant changes, main-branch pushes, and manual dispatches. This candidate does not qualify, so every expensive stage was 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 🌾 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. Findings and check detailsNo new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since cfbe8880a95f547e0dadae8eb6f700e5bac6fa30
Full docs: ADR-DEVEX-LINT-0015 🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (275)
Reproduce locallypnpm architecture:checkFull docs: Frontend domain catalog |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## drjkl/fe-3412-9a-extract-loadserialisednode-and-withgraphconfiguring-from #21753 +/- ##
============================================================================================================
Coverage 87.46% 87.47%
============================================================================================================
Files 2845 2844 -1
Lines 157331 157301 -30
Branches 44820 42726 -2094
============================================================================================================
- Hits 137614 137592 -22
+ Misses 18962 18954 -8
Partials 755 755
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 16 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…hconfiguring-from into FE-3397 agent node loading Amp-Thread-ID: https://ampcode.com/threads/T-01a165f2-96fd-72e9-a637-82d4cb4487e5
|
Merged base How the conflicts were resolved:
Verification on the merge commit: |
dante01yoon
left a comment
There was a problem hiding this comment.
Reviewed against the stacked base (drjkl/fe-3412-9a-…, 6ef4fbb). Routing agent creation through loadSerialisedNode is a clear win: migrations, size floor, missing-node placeholder and loadedGraphNode now match a load, and the tests prove those rows. One blocking regression is inline. It comes from the configuring bracket reaching nodes that already exist.
Unanchored: none.
| this.createNode(graph, docNode, mode) | ||
| withGraphConfiguring(() => { | ||
| this.createNode(graph, docNode, mode) | ||
| for (const link of docLinksIncident(doc, id)) { |
There was a problem hiding this comment.
issue: This can regress existing nodes that are linked to a newly created one. docLinksIncident includes links whose other endpoint already exists in the live graph, and those links are now connected inside withGraphConfiguring. Example: the live graph has an unconnected PrimitiveNode (no widgets), and the agent adds a KSampler with a doc link from that primitive. PrimitiveNode.onConnectionsChange (src/extensions/core/widgetInputs.ts:170) sees app.configuringGraph === true and returns early, expecting onAfterGraphConfigured to catch up. notifyGraphConfigured only visits loaded (the created ids), so the primitive never gets that call. applyLinks then sees the link as present, so _onFirstConnection never runs and the primitive stays widgetless. Before this PR the connection was interactive and the widget was created. This also conflicts with the description's claim that link edits to existing nodes stay interactive. Could we connect only created↔created links inside the bracket and leave links to existing nodes interactive? Or include the existing endpoints in the configured-callback pass. A test with an existing primitive origin would pin it down.
There was a problem hiding this comment.
Fixed in 1d141db: confirmed with a test first. An existing LifecycleSource linked to a newly created KSampler saw its connection with configuringGraph === true and never got a graph-configured callback afterwards. upsertNode now wraps only createNode in withGraphConfiguring. After all nodes in the frame are created, connectLoadedLinks connects links between two nodes created in this frame inside the bracket, and connects links to nodes that already existed as ordinary interactive edits, so PrimitiveNode.onConnectionsChange runs its first-connection setup as before. The new row connects a created node to an existing one interactively in liveGraphApplier.load.test.ts fails on 900caab and passes here.
| this.applyInteriors(graph, doc, changes, context, mode) | ||
|
|
||
| this.applyLinks(graph, doc, [...changes.links], context) | ||
| this.try(context, () => notifyGraphConfigured(graph, loaded)) |
There was a problem hiding this comment.
nit-pick (non-blocking): notifyGraphConfigured runs every node under one this.try. If one created node's onGraphConfigured throws, every node after it misses both callbacks. A try per node would keep one bad extension from affecting its neighbours in the same frame.
There was a problem hiding this comment.
Fixed in 1d141db: notifyGraphConfigured is now a method that runs each node's onGraphConfigured and onAfterGraphConfigured in its own this.try, so a throwing extension on one node is reported once and the others still get both callbacks.
…cope A created node's document links to nodes that already existed were connected inside withGraphConfiguring, but only created nodes receive the graph-configured callbacks afterwards. An existing PrimitiveNode skipped its first-connection setup and never caught up. Only links between nodes created in the same frame now connect while configuring; the rest connect as interactive edits. Each created node's onGraphConfigured/onAfterGraphConfigured now runs in its own failure scope, so one throwing extension does not skip the others. Amp-Thread-ID: https://ampcode.com/threads/T-01a165f2-96fd-72e9-a637-82d4cb4487e5
|
Feedback round for review 5726003567 by @dante01yoon:
Commits pushed: 1d141db Checks: |
…ialisednode-and-withgraphconfiguring-from' into drjkl/fe-3397-9-extract-one-per-node-load-unit-shared-by-loadgraphdata-and
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed 1d141db. The regression I flagged is fixed. connectLoadedLinks connects only links where both endpoints were created in this frame inside withGraphConfiguring, and links to nodes that already existed connect interactively, so an existing PrimitiveNode gets its first-connection setup again. connectLink returns present for the second visit of a created↔created link, so it does not double-connect. The new row connects a created node to an existing one interactively pins the case, and the per-node try in notifyGraphConfigured addresses my nit. liveGraphApplier.load.test.ts and liveGraphApplier.test.ts pass locally (78/78).
One blocker is left. CI is red (lint-pr / typecheck, which also fails lint-and-format, preflight and test) because the stacked base has moved on. See the inline comment. After you rebase onto the current base and fix the import, I am happy to approve.
Unanchored: none.
| import { LGraph, LGraphNode, LiteGraph } from '@/lib/litegraph/src/litegraph' | ||
| import type { ISerialisedNode } from '@comfyorg/graph-model/serialisation' | ||
| import { useApp } from '@/scripts/appInstance' | ||
| import { useExtensionStore } from '@/stores/extensionStore' |
There was a problem hiding this comment.
issue: This import breaks typecheck on the merge ref: TS2307: Cannot find module '@/stores/extensionStore' (job). The base branch drjkl/fe-3412-9a-… has since merged main, and #22156 moved the store to @/platform/extensions/stores/extensionStore. Could you rebase onto the current base and point this import at the new path? The base also gained cfbe888 fix: cover configured peers in loaded-node callbacks, so it is worth re-running the load tests after the rebase to make sure the existing-node row still holds.
There was a problem hiding this comment.
Fixed in d6154fe: the test now imports @/platform/extensions/stores/extensionStore, which is where the store lives on the current base. That path only exists on the base, so b726cb3 first merges the current base (cfbe888) into this branch. It merged with no conflicts, and nothing was rebased or force-pushed. On the merged tree, pnpm test:unit src/workbench/extensions/agent/crdt src/scripts/app.test.ts src/core/graph/loadSerialisedNode passes 78 files (1463 tests), the pre-commit typecheck passes, and the pre-push knip and fallow audit are clean.
|
Feedback round for review 5726221609 by @dante01yoon:
Commits pushed: b726cb3 (merge of base cfbe888), d6154fe Checks on the merged tree: 78 test files (1463 tests) pass, |
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed 1d141db..36bb0ba. The blocker is fixed: b726cb3 merges the current stacked base (cfbe888) with no conflict resolution, d6154fe points liveGraphApplier.load.test.ts at @/platform/extensions/stores/extensionStore, and 36bb0ba lists the test in boundaries.json. The base's cfbe888 only touches src/scripts/app.test.ts, so the applier's created↔created / existing-node link split is unaffected. All required checks are green now, including typecheck, lint-and-format and test. I did not run the tests locally this round. Thanks!
Unanchored: none.
christian-byrne
left a comment
There was a problem hiding this comment.
Requesting changes for one regression.
- Node creation now runs inside the configuring scope, so widget inputs on new nodes have no GET_CONFIG until notifyGraphConfigured. PrimitiveNode links to those inputs can be refused and silently dropped (inline at liveGraphApplier.ts:977).
- loadedGraphNode fires earlier than on a workflow load: inside the scope, before links and graph-configured callbacks (non-blocking).
- Two small test gaps (non-blocking).
Found by static trace (three reviewers plus a blind verifier), not executed. A PrimitiveNode case in liveGraphApplier.load.test.ts would confirm or refute the first point.
| } | ||
| if (live) graph.remove(live) | ||
| this.createNode(graph, docNode, mode) | ||
| withGraphConfiguring(() => this.createNode(graph, docNode, mode)) |
There was a problem hiding this comment.
issue: Wrapping createNode in withGraphConfiguring makes the widgetInputs onConfigure hook skip restoring input.widget[GET_CONFIG] on the new node. That config only comes back in onGraphConfigured, which runs in notifyGraphConfigured after connectLoadedLinks and applyLinks. Until then, a PrimitiveNode that already has a link fails PrimitiveNode._isValidConnection when it connects to a widget input on the new node, so the connection is refused. connectLink returns 'refused', and applyLinks neither retries nor reports that result, so the link is dropped silently and the live graph no longer matches the doc. Three cases: an existing linked primitive wired to a newly created sampler is refused; a new primitive fanned out to two or more new nodes keeps only its first link; an existing unlinked primitive connects but its _onFirstConnection exits early and it never gets a widget, because it is not in loaded. Fix: run the interactive toExisting connections, plus a retry of refused amongLoaded links, after notifyGraphConfigured. Report links that are still refused. Add a PrimitiveNode test.
There was a problem hiding this comment.
Fixed in 9f9297f: reproduced first. A created PrimitiveNode fanned out to two created Seeded widget inputs kept only link 1, because the second connect failed _isValidConnection when input.widget[GET_CONFIG] was unset. applyChanges now fires onGraphConfigured on the created nodes before connectLoadedLinks, and onAfterGraphConfigured after applyLinks as before. That way, every link to or from a created node, both among created nodes and to existing ones, sees the restored configs. onAfterGraphConfigured still sees the links, which PrimitiveNode needs to build its widget. The new row connects a created primitive to every created widget input fails on 36bb0ba with expected null to be 2. Scratch rows (not committed) also confirmed the unlinked-existing-primitive case now gets its widget. The already-linked-existing case gets past validation; in unit tests it then reaches applyToGraph, which needs app.canvas, so it is not kept as a row. I did not add retry or reporting for refused links: the first pass of applyLinks already drops a refused result silently on main, so that is a separate change.
| detachSerialisedLinks(info) | ||
| node.pos = [info.pos[0], info.pos[1]] | ||
| graph.add(node) | ||
| const node = loadSerialisedNode(graph, info, { |
There was a problem hiding this comment.
suggestion: (non-blocking) loadedGraphNode now fires for each node right after that node is configured. It runs inside the configuring scope, before the frame's later nodes exist, before connectLoadedLinks and before notifyGraphConfigured. A workflow load runs nodeCreated for every node, then the links and the graph-configured callbacks, and only then loadedGraphNode for each node. An extension whose loadedGraphNode reads input links, or reads widgets that PrimitiveNode builds in onAfterGraphConfigured, sees a disconnected node when the agent creates it. The same early timing makes the PrimitiveNode boolean control_after_generate migration in loadSerialisedNode run before that node has widgets. Smallest fix (M): createNode only creates, adds, configures and snaps the node. After notifyGraphConfigured, call loadSerialisedNode(graph, { configuredNode }) for each loaded node, the way app.ts loadGraphData does.
There was a problem hiding this comment.
Left for DrJKL: confirmed. loadedGraphNode and the legacy-value migration run inside createNode, before links and onAfterGraphConfigured, so an agent-created PrimitiveNode has no widgets yet when the control_after_generate migration runs. Moving the tail after the callbacks means splitting the creation head out of #20886's loadSerialisedNode. Its info form exists only for this caller. The applier would then call the { configuredNode } form after onAfterGraphConfigured, as loadGraphData does. That changes the base PR's exported unit, so it needs a call on whether to do it in #20886, here, or in a follow-up.
| } | ||
| if (live) graph.remove(live) | ||
| this.createNode(graph, docNode, mode) | ||
| withGraphConfiguring(() => this.createNode(graph, docNode, mode)) |
There was a problem hiding this comment.
suggestion: (non-blocking) No test fails if the configuring bracket around createNode is removed. The lifecycle test sees configuring=true only because connectLoadedLinks has its own bracket, and LifecycleSource and KSampler have no hook that runs during creation. Dropping this wrapper would bring back the old behavior. One example: CustomCombo's onAdded and option setters call updateCombo, which only skips the reset of the selected value when app.configuringGraph is true. Add one row in which a node's onAdded or configure-time hook records app.configuringGraph, and assert it is true.
There was a problem hiding this comment.
Fixed in 70c668b: LifecycleSource now records app.configuringGraph from onConfigure, and the lifecycle row expects configure configuring=true first. With the withGraphConfiguring around createNode removed, that row fails.
| const info = sampler(7, ['sample_heun', true, 'karras']) | ||
| const graph = applyWorkflow({ nodes: [info], links: [] }) | ||
| const loaded = withGraphConfiguring(() => | ||
| loadSerialisedNode(new LGraph(), structuredClone(info) as ISerialisedNode) |
There was a problem hiding this comment.
nitpick: structuredClone(info) as ISerialisedNode casts the fixture to the domain type. That cast hides the fact that sampler() omits the required fields flags, order and mode. Type sampler() as a builder that returns a complete ISerialisedNode and drop the cast.
There was a problem hiding this comment.
Fixed in 70c668b: sampler() now returns ISerialisedNode & WorkflowNode with flags, order and mode, and the cast is gone. The intersection is needed because ISerialisedNode has no index signature, so on its own it is not assignable to the WorkflowNode that applyWorkflow takes.
Created nodes configure inside the graph-configuring scope, so the widgetInputs onConfigure hook leaves input.widget[GET_CONFIG] unset until onGraphConfigured. Connecting links first made PrimitiveNode reject a second link and skip widget creation. Fire onGraphConfigured before the created nodes' links connect and onAfterGraphConfigured after.
Record app.configuringGraph from a created node's onConfigure so removing the scope fails, and type the sampler fixture as both a workflow node and a complete ISerialisedNode instead of casting it.
|
Review round for christian-byrne's review 5731020569:
Commits pushed: 9f9297f ( |
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed at 70c668b. Two commits landed since my approval at 36bb0ba. They answer christian-byrne's review:
9f9297ffixes theGET_CONFIGregression.applyChangesnow firesonGraphConfiguredon created and recreated nodes beforeconnectLoadedLinks, and keepsonAfterGraphConfiguredafterapplyLinks. The widgetInputsonGraphConfiguredhook restoresinput.widget[GET_CONFIG]before any link to a created node connects, whether amongLoaded, toExisting, or inapplyLinks. That meansPrimitiveNode._isValidConnectionno longer refuses the second leg of a fan-out.onAfterGraphConfiguredstill runs after the links are in place, whichPrimitiveNodeneeds to build its widget. The new rowconnects a created primitive to every created widget inputpins this. The author reports it fails on 36bb0ba withexpected null to be 2. I did not re-run it.70c668bmakesLifecycleSource.onConfigurerecordapp.configuringGraph. The row now fails if thewithGraphConfiguringaroundcreateNodeis removed, because the bracket inconnectLoadedLinksdoes not coverconfigure.sampler()now returns a completeISerialisedNode & WorkflowNode, and the cast is gone. The intersection is fine.
My own earlier findings were already resolved at 36bb0ba, and nothing in this delta reopens them. The created↔created / existing-node link split in connectLoadedLinks is unchanged.
christian-byrne's loadedGraphNode timing point is still open in that thread, left for DrJKL. It was raised as non-blocking, and fixing it means changing #20886's loadSerialisedNode. A follow-up looks right to me. Silently dropping refused link results is pre-existing behaviour in applyLinks, so I agree it belongs in a separate change.
Gates: no API types, no server-derived facts, and the fix is backed by a regression row. No added comments, any or casts in the delta.
CI: all checks on 70c668b are green (the rest are skipped).
I didn't run the tests; this review comes from reading the diff.
Unanchored: none.
| if (result === 'created' || result === 'recreated') loaded.push(id) | ||
| }) | ||
| } | ||
| this.notifyLoaded(graph, loaded, context, 'onGraphConfigured') |
There was a problem hiding this comment.
suggestion: (non-blocking) This makes created nodes' onGraphConfigured run before any of their links exist. Both a workflow load (graph.onConfigure inside LGraph.configure) and paste (LGraphCanvas clipboard) fire it after the links are in place. The in-tree handlers don't read links: widgetInputs restores GET_CONFIG and drops inputs that have no widget, and uploadAudio refreshes its preview. So this is fine today. A third-party onGraphConfigured that inspects inputs[i].link would see an unconnected node only on the agent path, though. A one-line note in the PR body (or on FE-3387) recording that agent-created nodes get onGraphConfigured before links would make the deliberate divergence easier to find later.
There was a problem hiding this comment.
Left for DrJKL: the divergence is real and deliberate. The applier checks every link it connects, so widget configs have to be restored before any link exists. Workflow load and paste instead fire onGraphConfigured after the links are in place. The only onGraphConfigured handlers in src are in widgetInputs (restores GET_CONFIG and drops inputs that have no widget) and uploadAudio (refreshes the preview), and neither reads links, so nothing in-tree is affected. Repository rules rule out a code comment, and this round does not allow editing PR metadata, so the note needs to go into the PR body or onto FE-3387 by you. Suggested wording: "Agent-created nodes get onGraphConfigured before their links connect and onAfterGraphConfigured after; load and paste fire both after links. Handlers that read inputs[i].link in onGraphConfigured see an unconnected node on the agent path."
|
Review round for dante01yoon's comment r4442781968:
Commits pushed: none. |
Summary
Part of FE-3387, implements FE-3397; stacked on #20886.
LiveGraphApplier.createNodeno longer builds nodes itself. It passes its document payload to #20886'sloadSerialisedNode, so agent-created nodes get the same placeholder, snap and size floor, widget migrations (sample_prefix, booleancontrol_after_generate, empty combo) andloadedGraphNodehook as a workflow load. The applier keeps only its document widget projection, passed toloadSerialisedNodeas a newconfigureoption. The applier-localmissingNodeandfloorSizeToContentare gone.Stacked because this needs
loadSerialisedNode/withGraphConfiguring, which only exist in #20886.Load vs paste (open question on FE-3387): load. A created node and its incident links run inside
withGraphConfiguring.onGraphConfigured/onAfterGraphConfiguredfire for created nodes after the frame's links are in place, so aPrimitiveNodesees its link the same way it does on load. Link edits to nodes that already exist stay interactive, like a user connecting a wire. No flag was added because no caller needs paste semantics. Paste keeps its ownLGraphCanvaspath.Differences from the original issue scope:
growAutogrowInputstays inresolveTargetSlot. Inside the configuring bracket, autogrow already grows slots for created nodes. A document link to an autogrow slot on an existing node is an interactive edit, and the node may not have that slot yet, so the applier still has to grow it (fix(agent): project a link onto a dynamic input slot the host grew #19715).afterConfigureGraphis not called. It is a whole-graph load hook that takes missing node types, and an agent frame is not a graph load.alwaysSnapToGrid, created nodes snap like a load.placeBatchstill moves the batch by one unsnapped offset, as CRDT-PLACEMENT-0035 specifies. Name-first slot resolution (CRDT-INPUTS-0030) is unchanged.toMatchObject, because agent nodes still serialize the document's__incarnationbookkeeping. FE-3391 / fix: filter agent document bookkeeping before node configuration #20874 removes that, after which the assertion can tighten totoEqual.Verification
liveGraphApplier.load.test.ts: migration rows, parity withloadSerialisedNode,loadedGraphNodehook, and configuring state plus callback order with links. All 5 tests fail on the parent branch and pass here.pnpm test:unit src/workbench/extensions/agent src/scripts/app.test.ts src/core/graph: 206 files, 4607 passed (1 expected fail, 1 skipped, both pre-existing). One earlier run of the same set had a single failure that did not reproduce. The agent suite alone also passes.typecheck:apppass.