Repository navigation
refactor: share selection intent and report selection changes once - #20757
Conversation
Resolve click and marquee selection through one pure intent module used by the classic canvas and the Vue node adapter, emit onSelectionChange once per operation that actually changed selection, cascade modifier-click group deselection to its children, deprecate LGraphCanvas.selected_nodes behind selectedCanvasNodes(), and accept ADRs 0028, 0029, and 0031. Part of FE-2040. Amp-Thread-ID: https://ampcode.com/threads/T-01a06d2f-2dce-700c-925b-4453696769e4
📦 Bundle: 9.49 MB gzip 🔴 +3.17 kBDetailsSummary
Category Glance App Entry Points — 6.62 kB (baseline 6.68 kB) • 🟢 -65 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 3.47 MB (baseline 3.47 MB) • 🔴 +4.81 kBGraph editor runtime, canvas, workflow orchestration
Status: 3 added / 3 removed / 1 unchanged Views & Navigation — 147 kB (baseline 147 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 12 added / 12 removed / 6 unchanged Panels & Settings — 670 kB (baseline 674 kB) • 🟢 -3.95 kBConfiguration panels, inspectors, and settings screens
Status: 11 added / 12 removed / 18 unchanged User & Accounts — 151 kB (baseline 150 kB) • 🔴 +1.3 kBAuthentication, profile, and account management bundles
Status: 10 added / 10 removed / 7 unchanged Editors & Dialogs — 359 kB (baseline 359 kB) • 🔴 +248 BModals, dialogs, drawers, and in-app editors
Status: 9 added / 9 removed / 3 unchanged UI Components — 212 kB (baseline 213 kB) • 🟢 -26 BReusable component library chunks
Status: 8 added / 8 removed / 16 unchanged Data & Services — 1.11 MB (baseline 1.11 MB) • 🟢 -251 BStores, services, APIs, and repositories
Status: 31 added / 31 removed / 6 unchanged Utilities & Hooks — 998 kB (baseline 997 kB) • 🔴 +460 BHelpers, composables, and utility bundles
Status: 37 added / 37 removed / 35 unchanged Vendor & Third-Party — 13.9 MB (baseline 13.9 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 17 unchanged Other — 19.7 MB (baseline 19.7 MB) • 🔴 +7.47 kBBundles that do not match a named category
Status: 100 added / 101 removed / 266 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-10-16T16:09:30.398Z",
"gitSha": "2a21429416592af0ea9b1a097af58851f73baeda",
"branch": "drjkl/fe-2040-selection-intent",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2017.7710000000388,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.509,
"layouts": 8,
"layoutDurationMs": 2.3539999999999996,
"taskDurationMs": 418.79299999999995,
"heapDeltaBytes": -6348596,
"heapUsedBytes": 57036828,
"domNodes": -163,
"jsHeapTotalBytes": 2359296,
"scriptDurationMs": 11.691999999999998,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "canvas-idle",
"durationMs": 2009.0400000000272,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.1270000000000002,
"layouts": 10,
"layoutDurationMs": 2.929,
"taskDurationMs": 442.934,
"heapDeltaBytes": -19450304,
"heapUsedBytes": 59294572,
"domNodes": -162,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 11.388,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1678.2269999999926,
"styleRecalcs": 71,
"styleRecalcDurationMs": 14.247000000000002,
"layouts": 11,
"layoutDurationMs": 2.8130000000000006,
"taskDurationMs": 612.6519999999999,
"heapDeltaBytes": -23400948,
"heapUsedBytes": 55314620,
"domNodes": -162,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 121.90200000000002,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66534653465347,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1678.623000000016,
"styleRecalcs": 71,
"styleRecalcDurationMs": 12.473999999999998,
"layouts": 9,
"layoutDurationMs": 2.182,
"taskDurationMs": 661.0899999999999,
"heapDeltaBytes": 15273716,
"heapUsedBytes": 79826828,
"domNodes": -162,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 114.42399999999999,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666336633663363,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1702.7050000000372,
"styleRecalcs": 19,
"styleRecalcDurationMs": 5.020000000000001,
"layouts": 11,
"layoutDurationMs": 2.8139999999999996,
"taskDurationMs": 298.985,
"heapDeltaBytes": 20225328,
"heapUsedBytes": 83635032,
"domNodes": 47,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 13.166,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665686274509806,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1710.2520000000823,
"styleRecalcs": 18,
"styleRecalcDurationMs": 4.599000000000001,
"layouts": 12,
"layoutDurationMs": 2.777,
"taskDurationMs": 263.201,
"heapDeltaBytes": -258364,
"heapUsedBytes": 78620756,
"domNodes": 47,
"jsHeapTotalBytes": 7864320,
"scriptDurationMs": 10.652999999999999,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666019417475727,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 566.1230000000046,
"styleRecalcs": 15,
"styleRecalcDurationMs": 3.3599999999999994,
"layouts": 11,
"layoutDurationMs": 3.2249999999999996,
"taskDurationMs": 393.00600000000003,
"heapDeltaBytes": 3665748,
"heapUsedBytes": 68043548,
"domNodes": 0,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 123.009,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664705882352937,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 514.4159999999829,
"styleRecalcs": 14,
"styleRecalcDurationMs": 3.671,
"layouts": 10,
"layoutDurationMs": 2.6969999999999996,
"taskDurationMs": 343.417,
"heapDeltaBytes": 6700028,
"heapUsedBytes": 85360272,
"domNodes": 0,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 110.71600000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664516129032254,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 923.5820000000103,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 531.574,
"heapDeltaBytes": 17070680,
"heapUsedBytes": 97132668,
"domNodes": 0,
"jsHeapTotalBytes": 16678912,
"scriptDurationMs": 41.293000000000006,
"eventListeners": 0,
"totalBlockingTimeMs": 297,
"frameDurationMs": 26.96176470588235,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 907.2830000000067,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 523.6899999999999,
"heapDeltaBytes": 19439024,
"heapUsedBytes": 99541716,
"domNodes": 0,
"jsHeapTotalBytes": 18776064,
"scriptDurationMs": 38.824000000000005,
"eventListeners": 0,
"totalBlockingTimeMs": 306,
"frameDurationMs": 27.778787878787888,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 715.0359999999978,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 331.1220000000001,
"heapDeltaBytes": -4985280,
"heapUsedBytes": 74657200,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 98.39600000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 96,
"frameDurationMs": 21.079411764705878,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 699.1780000000745,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 308.31500000000034,
"heapDeltaBytes": -5249020,
"heapUsedBytes": 74377188,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 96.387,
"eventListeners": 0,
"totalBlockingTimeMs": 94,
"frameDurationMs": 21.21212121212121,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6610.911999999985,
"styleRecalcs": 2,
"styleRecalcDurationMs": 0.366,
"layouts": 2,
"layoutDurationMs": 0.5470000000000002,
"taskDurationMs": 5618.186,
"heapDeltaBytes": -7686972,
"heapUsedBytes": 76128940,
"domNodes": 0,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 4208.581999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 1,
"frameDurationMs": 20.296012269938654,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6557.174000000032,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.2520000000000005,
"layouts": 1,
"layoutDurationMs": 0.24299999999999972,
"taskDurationMs": 5545.93,
"heapDeltaBytes": -8613320,
"heapUsedBytes": 75268976,
"domNodes": 0,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 4239.763,
"eventListeners": 0,
"totalBlockingTimeMs": 7,
"frameDurationMs": 20.714195583596215,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 6647.064,
"styleRecalcs": 2,
"styleRecalcDurationMs": 0.6310000000000004,
"layouts": 2,
"layoutDurationMs": 0.5519999999999999,
"taskDurationMs": 5564.081000000001,
"heapDeltaBytes": -5177156,
"heapUsedBytes": 78267056,
"domNodes": 0,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 4205.451,
"eventListeners": 0,
"totalBlockingTimeMs": 11,
"frameDurationMs": 19.978915662650603,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 6371.890000000008,
"styleRecalcs": 3,
"styleRecalcDurationMs": 0.804,
"layouts": 3,
"layoutDurationMs": 0.7419999999999995,
"taskDurationMs": 5200.843,
"heapDeltaBytes": 8826004,
"heapUsedBytes": 92553436,
"domNodes": 0,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 3962.377,
"eventListeners": 0,
"totalBlockingTimeMs": 5,
"frameDurationMs": 19.52883435582822,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "large-combo-open",
"durationMs": 156.32700000003297,
"styleRecalcs": 21,
"styleRecalcDurationMs": 11.815999999999999,
"layouts": 10,
"layoutDurationMs": 2.622,
"taskDurationMs": 112.62899999999998,
"heapDeltaBytes": 13352096,
"heapUsedBytes": 77566952,
"domNodes": 917,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 6.31,
"eventListeners": 196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.428571428571427,
"p95FrameDurationMs": 50.09999999999991
},
{
"name": "large-combo-open",
"durationMs": 145.76499999998305,
"styleRecalcs": 21,
"styleRecalcDurationMs": 11.703,
"layouts": 10,
"layoutDurationMs": 2.5390000000000006,
"taskDurationMs": 108.33700000000002,
"heapDeltaBytes": 13358340,
"heapUsedBytes": 77954476,
"domNodes": 917,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 6.319999999999999,
"eventListeners": 196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.428571428571427,
"p95FrameDurationMs": 50
},
{
"name": "large-graph-idle",
"durationMs": 2040.311000000031,
"styleRecalcs": 8,
"styleRecalcDurationMs": 4.2459999999999996,
"layouts": 8,
"layoutDurationMs": 2.387,
"taskDurationMs": 368.094,
"heapDeltaBytes": -10342888,
"heapUsedBytes": 74432632,
"domNodes": -258,
"jsHeapTotalBytes": -262144,
"scriptDurationMs": 29.779,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66639344262295,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "large-graph-idle",
"durationMs": 2031.9450000000643,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.248999999999999,
"layouts": 7,
"layoutDurationMs": 1.8739999999999999,
"taskDurationMs": 380.0810000000001,
"heapDeltaBytes": -29374992,
"heapUsedBytes": 73530204,
"domNodes": -259,
"jsHeapTotalBytes": 299008,
"scriptDurationMs": 27.719,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666393442622947,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2835.1030000000037,
"styleRecalcs": 68,
"styleRecalcDurationMs": 7.2909999999999995,
"layouts": 6,
"layoutDurationMs": 1.3709999999999998,
"taskDurationMs": 1212.252,
"heapDeltaBytes": 16717680,
"heapUsedBytes": 81762896,
"domNodes": 0,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 585.375,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66588235294118,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2321.770000000015,
"styleRecalcs": 67,
"styleRecalcDurationMs": 7.316999999999999,
"layouts": 6,
"layoutDurationMs": 1.3030000000000004,
"taskDurationMs": 1132.988,
"heapDeltaBytes": 15316572,
"heapUsedBytes": 81152808,
"domNodes": 0,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 560.969,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66618705035971,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "large-graph-zoom",
"durationMs": 3653.5789999999793,
"styleRecalcs": 71,
"styleRecalcDurationMs": 8.417,
"layouts": 65,
"layoutDurationMs": 11.349,
"taskDurationMs": 1223.528,
"heapDeltaBytes": -422288,
"heapUsedBytes": 66684688,
"domNodes": 24,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 527.98,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665753424657535,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3299.6089999999185,
"styleRecalcs": 71,
"styleRecalcDurationMs": 7.596,
"layouts": 64,
"layoutDurationMs": 10.632,
"taskDurationMs": 1122.432,
"heapDeltaBytes": 24151752,
"heapUsedBytes": 90665644,
"domNodes": 24,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 495.93399999999997,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666161616161617,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2299.2160000000013,
"styleRecalcs": 44,
"styleRecalcDurationMs": 5.239000000000001,
"layouts": 5,
"layoutDurationMs": 1.294,
"taskDurationMs": 1308.068,
"heapDeltaBytes": 5395200,
"heapUsedBytes": 72459472,
"domNodes": 0,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 698.5640000000001,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66594202898551,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2190.0699999999915,
"styleRecalcs": 45,
"styleRecalcDurationMs": 4.9030000000000005,
"layouts": 6,
"layoutDurationMs": 1.1540000000000001,
"taskDurationMs": 1173.4,
"heapDeltaBytes": 3871224,
"heapUsedBytes": 72363984,
"domNodes": 0,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 603.3459999999999,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66564885496183,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "minimap-idle",
"durationMs": 2017.577000000017,
"styleRecalcs": 7,
"styleRecalcDurationMs": 2.0219999999999994,
"layouts": 7,
"layoutDurationMs": 1.743,
"taskDurationMs": 429.27,
"heapDeltaBytes": 10077044,
"heapUsedBytes": 75099308,
"domNodes": -258,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 29.109,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198342,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2019.1180000000486,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.287,
"layouts": 8,
"layoutDurationMs": 2.0930000000000004,
"taskDurationMs": 385.00800000000004,
"heapDeltaBytes": -18175968,
"heapUsedBytes": 74576848,
"domNodes": -258,
"jsHeapTotalBytes": 561152,
"scriptDurationMs": 25.658,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66611570247934,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 464.5650000000501,
"styleRecalcs": 47,
"styleRecalcDurationMs": 5.283,
"layouts": 9,
"layoutDurationMs": 2.323,
"taskDurationMs": 297.93600000000004,
"heapDeltaBytes": 20401300,
"heapUsedBytes": 85284960,
"domNodes": 0,
"jsHeapTotalBytes": 3407872,
"scriptDurationMs": 97.513,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66428571428571,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 446.2189999999282,
"styleRecalcs": 46,
"styleRecalcDurationMs": 4.864,
"layouts": 9,
"layoutDurationMs": 2.431,
"taskDurationMs": 290.416,
"heapDeltaBytes": -2057772,
"heapUsedBytes": 63975212,
"domNodes": 0,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 96.423,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2010.3770000000054,
"styleRecalcs": 11,
"styleRecalcDurationMs": 3.0679999999999996,
"layouts": 10,
"layoutDurationMs": 2.681,
"taskDurationMs": 319.44399999999996,
"heapDeltaBytes": -3778200,
"heapUsedBytes": 61596492,
"domNodes": -180,
"jsHeapTotalBytes": 6815744,
"scriptDurationMs": 10.982000000000003,
"eventListeners": -114,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-idle",
"durationMs": 2031.8679999999176,
"styleRecalcs": 9,
"styleRecalcDurationMs": 3.7549999999999994,
"layouts": 8,
"layoutDurationMs": 3.1519999999999997,
"taskDurationMs": 299.58799999999997,
"heapDeltaBytes": -545796,
"heapUsedBytes": 64975984,
"domNodes": -180,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 9.298999999999998,
"eventListeners": -114,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66475409836066,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1693.9270000000306,
"styleRecalcs": 75,
"styleRecalcDurationMs": 14.528,
"layouts": 9,
"layoutDurationMs": 2.233,
"taskDurationMs": 678.406,
"heapDeltaBytes": 14465464,
"heapUsedBytes": 79893948,
"domNodes": -180,
"jsHeapTotalBytes": 6815744,
"scriptDurationMs": 100.233,
"eventListeners": -114,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665686274509806,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1677.808999999911,
"styleRecalcs": 76,
"styleRecalcDurationMs": 13.221,
"layouts": 10,
"layoutDurationMs": 2.2230000000000003,
"taskDurationMs": 575.699,
"heapDeltaBytes": 15564424,
"heapUsedBytes": 81541580,
"domNodes": -180,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 84.768,
"eventListeners": -114,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665346534653462,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-transition-enter",
"durationMs": 816.6159999999536,
"styleRecalcs": 20,
"styleRecalcDurationMs": 17.577,
"layouts": 5,
"layoutDurationMs": 9.899000000000001,
"taskDurationMs": 583.885,
"heapDeltaBytes": 11884144,
"heapUsedBytes": 110562504,
"domNodes": 15950,
"jsHeapTotalBytes": 16916480,
"scriptDurationMs": 20.387999999999998,
"eventListeners": 3244,
"totalBlockingTimeMs": 72,
"frameDurationMs": 19.445238095238114,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8829.034999999976,
"styleRecalcs": 250,
"styleRecalcDurationMs": 24.538,
"layouts": 8,
"layoutDurationMs": 1.935,
"taskDurationMs": 4245.877,
"heapDeltaBytes": -21550652,
"heapUsedBytes": 77620272,
"domNodes": -258,
"jsHeapTotalBytes": -1048576,
"scriptDurationMs": 1928.6760000000002,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665849056603772,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8594.371000000025,
"styleRecalcs": 251,
"styleRecalcDurationMs": 24.736,
"layouts": 8,
"layoutDurationMs": 1.9329999999999998,
"taskDurationMs": 4220.1050000000005,
"heapDeltaBytes": -22257380,
"heapUsedBytes": 76678836,
"domNodes": -258,
"jsHeapTotalBytes": -524288,
"scriptDurationMs": 2012.3360000000002,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665891472868214,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 12839.275000000043,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11879.645999999999,
"heapDeltaBytes": 4973344,
"heapUsedBytes": 285261488,
"domNodes": -3330,
"jsHeapTotalBytes": 23842816,
"scriptDurationMs": 188.44299999999998,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.70523648648649,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "vue-large-graph-idle",
"durationMs": 15396.417000000041,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14830.127,
"heapDeltaBytes": -15568668,
"heapUsedBytes": 283656896,
"domNodes": -3330,
"jsHeapTotalBytes": 17027072,
"scriptDurationMs": 231.54400000000004,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 26.028426395939086,
"p95FrameDurationMs": 50
},
{
"name": "vue-large-graph-pan",
"durationMs": 17849.365999999976,
"styleRecalcs": 150,
"styleRecalcDurationMs": 13.609999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17423.259,
"heapDeltaBytes": -43611112,
"heapUsedBytes": 266357792,
"domNodes": -3330,
"jsHeapTotalBytes": 17285120,
"scriptDurationMs": 608.998,
"eventListeners": -651,
"totalBlockingTimeMs": 0,
"frameDurationMs": 32.69102564102563,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-large-graph-pan",
"durationMs": 17932.305000000044,
"styleRecalcs": 153,
"styleRecalcDurationMs": 15.388000000000012,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17521.475,
"heapDeltaBytes": -11237440,
"heapUsedBytes": 288137516,
"domNodes": -3330,
"jsHeapTotalBytes": 15122432,
"scriptDurationMs": 673.775,
"eventListeners": -651,
"totalBlockingTimeMs": 0,
"frameDurationMs": 32.63490909090909,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-node-resize-workload",
"durationMs": 5668.729999999982,
"styleRecalcs": 20,
"styleRecalcDurationMs": 45.75600000000002,
"layouts": 20,
"layoutDurationMs": 20.391000000000005,
"taskDurationMs": 5509.396,
"heapDeltaBytes": -29476372,
"heapUsedBytes": 278565648,
"domNodes": -3330,
"jsHeapTotalBytes": 24363008,
"scriptDurationMs": 82.30399999999999,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 32.37942857142857,
"p95FrameDurationMs": 66.69999999999982
},
{
"name": "vue-node-resize-workload",
"durationMs": 5715.921999999978,
"styleRecalcs": 20,
"styleRecalcDurationMs": 46.23199999999999,
"layouts": 20,
"layoutDurationMs": 20.852999999999998,
"taskDurationMs": 5544.128,
"heapDeltaBytes": -17270588,
"heapUsedBytes": 272433104,
"domNodes": -3330,
"jsHeapTotalBytes": 35115008,
"scriptDurationMs": 85.38900000000002,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 33.235465116279066,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8218.485999999984,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7698.844000000001,
"heapDeltaBytes": 6091016,
"heapUsedBytes": 255801644,
"domNodes": 0,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 107.881,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 27.852203389830514,
"p95FrameDurationMs": 50.099999999998545
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8098.285000000033,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7584.106999999998,
"heapDeltaBytes": -8439248,
"heapUsedBytes": 258582304,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 105.14100000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 27.493197278911566,
"p95FrameDurationMs": 50.099999999998545
},
{
"name": "workflow-execution",
"durationMs": 105.22200000002613,
"styleRecalcs": 7,
"styleRecalcDurationMs": 7.906,
"layouts": 7,
"layoutDurationMs": 2.5269999999999997,
"taskDurationMs": 77.549,
"heapDeltaBytes": -10324892,
"heapUsedBytes": 65764256,
"domNodes": 97,
"jsHeapTotalBytes": 9961472,
"scriptDurationMs": 8.726999999999999,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 94.70100000010007,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.980000000000001,
"layouts": 7,
"layoutDurationMs": 2.34,
"taskDurationMs": 56.425000000000004,
"heapDeltaBytes": 4600920,
"heapUsedBytes": 80924104,
"domNodes": 94,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 4.922,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 217.21100000002025,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.6769999999999999,
"layouts": 76,
"layoutDurationMs": 10.588999999999999,
"taskDurationMs": 168.991,
"heapDeltaBytes": 8946056,
"heapUsedBytes": 93468048,
"domNodes": 4,
"jsHeapTotalBytes": 8650752,
"scriptDurationMs": 72.30700000000002,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66923076923079,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 191.76499999991847,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.6449999999999999,
"layouts": 76,
"layoutDurationMs": 9.427,
"taskDurationMs": 153.25,
"heapDeltaBytes": 8780952,
"heapUsedBytes": 91081640,
"domNodes": 4,
"jsHeapTotalBytes": 8388608,
"scriptDurationMs": 63.818,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 239.69900000008693,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.3259999999999998,
"layouts": 76,
"layoutDurationMs": 9.73,
"taskDurationMs": 208.063,
"heapDeltaBytes": -2499100,
"heapUsedBytes": 114559548,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 67.634,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000007,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 252.7820000000247,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.315,
"layouts": 76,
"layoutDurationMs": 10.576,
"taskDurationMs": 212.959,
"heapDeltaBytes": -7282328,
"heapUsedBytes": 105273864,
"domNodes": 4,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 68.93100000000001,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666636,
"p95FrameDurationMs": 16.800000000000182
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🎭 Playwright: ✅ 2282 passed, 0 failed · 2 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 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 🌾 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 59965ddd23c100bae4aa35309dc7a7d0b28b3eb4
Full docs: ADR-DEVEX-LINT-0015 |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #20757 +/- ##
==========================================
+ Coverage 86.54% 87.37% +0.82%
==========================================
Files 3736 2662 -1074
Lines 177012 148393 -28619
Branches 46811 41789 -5022
==========================================
- Hits 153197 129654 -23543
+ Misses 21752 18347 -3405
+ Partials 2063 392 -1671
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1080 files with indirect coverage changes 🚀 New features to boost your workflow:
|
dante01yoon
left a comment
There was a problem hiding this comment.
Reviewed ec3a72f1abf16beced81b53cee5ba6b5e019726e against merge base 35d80236.
The decomposition is good: resolveClickSelection is a faithful translation of the old branch cascade (I walked every arm — the !item/selectOnly, not-selected, modifier-toggle, sticky and replace paths all map one-to-one), the marquee intent unification is correct in both live and classic modes, and routing applyClickSelection around select()/deselect() is exactly the right way to stop the double-emit. The selectedItems-vs-initialSelection comparison in finalizeLiveSelect is a proper set equality, and initialSelection is a real snapshot (new Set(...)), so it survives the revision-keyed view cache. The test-expectation changes I checked are all consequences of the intended new emit rather than weakened assertions — hookCount.single going 2→3 is precisely the onSelectionChange that deselect() now adds.
One blocking defect, and one question I would like answered before this lands.
1. deleteSelected() now emits onSelectionChange N+1 times (blocking). This contradicts the invariant the PR is built around and the ADR amendment it adds. LGraph.remove() calls canvas.deselect(node) once per node, and deselect() now emits, so deleting a 5-node selection fires 6 times where main fires 1. Measured on both sides with the same probe:
merge base 35d80236 : 1 emission (passes)
head ec3a72f1 : 6 emissions (expected { emissions: 1 }, got { emissions: 6 })
Detail and the probe are inline on deselect().
2. The group carve-out removal (question). This reverses a deliberate decision rather than an oversight: #9149 replaced a plain this.deselect(item) with an explicit group-only path, a three-line rationale comment, and two named tests, all of which this PR removes. The rationale given there was that cascading on deselect "would remove the user's ability to keep children selected (e.g. for deletion) after toggling the group off" — and neither the description nor the ADR amendment engages with it. The test.fail this un-fails cites #7454, but that issue is a feature request about copying a group including its nodes — the select direction — so it does not settle the deselect direction. Inline on processSelect.
I am deliberately not treating 2 as blocking on its own: it is disclosed in the description and the ADR, and FE-2040 may well supersede #9149. I just cannot see that decision from here, and the tests that guarded it are going away in the same commit.
Verified at this head: the 7 touched suites pass (395 passed, 1 expected fail, 1 skipped); pnpm typecheck exits 0. All first-party selected_nodes readers are migrated, so the new warnDeprecated should only fire for extensions — the only survivor is src/scripts/__mocks__/app.ts. I also confirmed the removed delete canvas.selected_nodes[node.id] in LGraph.ts was already a no-op against the computed snapshot. NOT RUN: Playwright (CI), and the full unit suite — I scoped to the touched suites plus the probes above. Probes removed, working tree clean.
| if (!isCanvasItemSelected(this, item)) return | ||
| changeCanvasSelection(this, [item], false) | ||
| if (!changeCanvasSelection(this, [item], false)) return | ||
| this.onSelectionChange?.(this.selectionView.selectedNodes) |
There was a problem hiding this comment.
issue: making deselect() emit is right on its own, but it turns deleteSelected() into an N+1 emitter, which breaks the invariant this PR adds to ADR 0028 ("emits onSelectionChange exactly once, after the batch is applied").
The path: deleteSelected() loops graph.remove(node) over the selection (LGraphCanvas.ts:4752-4760), and LGraph.remove() calls canvas.deselect(node) for every canvas in list_of_graphcanvas (LGraph.ts:1616). Each of those now reaches this line, then deleteSelected() emits once more at the end.
Measured with the same throwaway spec on both sides (createCanvas harness, 5 nodes, canvas.selectItems(nodes), spy on onSelectionChange, then canvas.deleteSelected()):
merge base 35d80236 : Tests 1 passed -> 1 emission
head ec3a72f1 : AssertionError: expected { emissions: 6 } to deeply equal { emissions: 1 }
So main is already once-per-operation here and this change regresses it to N+1. There are no first-party onSelectionChange consumers, so nothing visibly breaks today — but it is a public extension hook, and an extension doing real work on selection change now gets 51 callbacks for a 50-node delete instead of 1.
The cleanest fix is probably to keep the per-node teardown in LGraph.remove() silent and let deleteSelected() own the single emit — e.g. a non-emitting internal deselect for that path, since deleteSelected() already clears and emits afterwards. Whatever shape you prefer, could we pin it with a test? deleteSelected() is the obvious gap in the "exactly once" set the ADR enumerates, and the enumeration in the amendment doesn't currently mention it either way.
There was a problem hiding this comment.
Fixed in 7097816: graph removal (LGraph.remove for nodes and groups, and removeReroute) now drops the item with the non-emitting changeCanvasSelection(canvas, [item], false) instead of canvas.deselect(). That is what deselect() did on main, so deleteSelected() emits once again. The existing deleteSelected() test now selects two nodes, a group, and a reroute, then asserts one emission. At ec3a72f it saw 5 calls; it passes now. The ADR 0028 amendment now says graph removal is silent and deleteSelected emits once for the batch. Direct graph.remove() calls outside deleteSelected() stay silent, as on main.
| selectOnly: this.selectOnly, | ||
| sticky | ||
| }) | ||
| if (!applyClickSelection(this, intent, item ?? undefined)) return |
There was a problem hiding this comment.
question: could you point at the decision that supersedes #9149 here?
Dropping the LGraphGroup && groupSelectChildren arm is what changes modifier-click on a selected group from "deselect the group, keep its children" to "deselect both". That arm wasn't incidental — #9149 (e119383072) introduced it in place of a plain this.deselect(item), with a rationale comment and two tests named modifier-click deselects only the group, not its children and ctrl-click deselects only the group, not its children, both removed here. Its stated reason was:
Cascade on select is a convenience; cascade on deselect would remove the user's ability to keep children selected (e.g. for deletion) after toggling the group off.
That workflow — select a group so the cascade picks up its children, then toggle the group itself off and delete the children — stops working after this change, and I can't find anywhere in the PR, the ADR amendment, or the linked issue that addresses it.
The test.fail being un-failed in selection.spec.ts cites FE-2040 / #7454, but #7454 is "Moving a Group selects nodes inside, but copying does not" — a feature request about copy/select cascading, not deselect. And that annotation was added in your own earlier characterization PR (#17087), so it records the intent rather than independently establishing it.
If FE-2040 settled this, a line in the ADR amendment saying so (and ideally a nod from @christian-byrne, who wrote the carve-out) would be enough for me. Behind groupSelectChildren, which is opt-in, so the blast radius is limited — but it's a real workflow for the users who turned it on, and the tests that protected it are going away in the same commit.
There was a problem hiding this comment.
Left for DrJKL: I confirmed each point. The carve-out came from #9149 (e119383). This PR removes its rationale comment and both deselects only the group, not its children tests. #7454 is about copy and select cascading, so it does not decide the deselect direction. The ADR 0028 amendment records the new behavior but does not say why it supersedes the keep-children-for-deletion workflow from #9149. Whether FE-2040 overrides that decision, and whether to ask christian-byrne for sign-off, is DrJKL's call. No code changed for this thread.
| ) | ||
|
|
||
| if (clearCanvasSelection(this, keepSelected)) | ||
| this.onSelectionChange?.(this.selectionView.selectedNodes) |
There was a problem hiding this comment.
nit-pick (non-blocking): setDirty(true) is now unconditional, where the old deselectAll returned early on an empty selection (if (!selected.size) return) and never reached it. clearCanvasSelection keeps that early return internally, so the guard still exists for the store work — it just no longer covers the redraw.
No correctness impact, and the click path is unaffected (processSelect bails before setDirty when applyClickSelection reports no change). It only means direct deselectAll() calls on an already-empty selection request a repaint they previously skipped. Moving setDirty inside the if would restore the old shape if you think it's worth the line.
There was a problem hiding this comment.
Fixed in a582e0b: deselectAll() now returns before the emit and setDirty(true) when clearCanvasSelection() reports no change, the same shape as processSelect. No test added, since the only observable difference is a skipped repaint request.
deleteSelected() reported one change per removed node, group, or reroute plus its own, because graph removal now reached the emitting deselect(). Graph removal drops the item from selection silently, so deleteSelected() emits once for the batch. Amp-Thread-ID: https://ampcode.com/threads/T-320964fa-ebc6-478d-a9e5-583b4bf47851
|
Feedback round on review 5495487589:
Commits pushed:
Checks at a582e0b: Vitest across litegraph, renderer/core/canvas, vueNodes, composables/graph, components/graph, extensions/core, and scripts: 5898 passed, 1 expected fail. |
Amp-Thread-ID: https://ampcode.com/threads/T-320964fa-ebc6-478d-a9e5-583b4bf47851 # Conflicts: # docs/adr/README.md
|
Feedback round on CodeRabbit review 5538431815 at f1c15d1:
Commits pushed:
Checks at 58220fe: Vitest across litegraph, renderer/core/canvas, vueNodes, composables/graph, components/graph, extensions/core, and scripts: 5919 passed, 1 expected fail. Lint and format ran in the pre-commit hook; knip ran on push. |
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed 58220fe2d35842889f8bb975cd2c224b4fd2cd4e against the two commits since my last review.
The ADR now explicitly explains why the group-only carve-out from #9149 is superseded. I verified the documented alternative in Chrome against this head's production build and an isolated real local ComfyUI backend: marquee-selecting the two children and pressing Delete removes them while preserving the group. This addresses my policy question.
The new no-op selectItems() regression passes, fails with exactly one unexpected notification when only the production fix is removed, and passes again after restoration (90 selection tests). Own validation on the exact head: frozen install, 404 unit tests across eight files, app/browser type checks, production build, changed-file checks and ADR validation. The unit run retains one pre-existing expected failure and one localhost/Cloud skip. Oxlint has 15 existing import-boundary warnings; ESLint ignores the selection test under the repository configuration. Seven targeted Chrome scenarios passed, including reselect notification counts, group toggle-off, child-only deletion, and group-menu focus/Escape. The temporary browser probe initially expected a numeric node ID; correcting it to the fixture's string ID passed without a product change. These are local fixture-backed selection checks, not Cloud account or generation validation.
Approval is pending CI completion. The live main-branch rules require test, lint-and-format, e2e-status, website-e2e, and cla-assistant. At this check only the last two have reported successful results on this head; the first three are not reported yet, and the core test workflow is still running. I am not treating the partial gh pr checks --required output as a complete green gate. No new inline defect or repeated question; the existing thread is left unresolved.
dante01yoon
left a comment
There was a problem hiding this comment.
Approving 58220fe2d35842889f8bb975cd2c224b4fd2cd4e: all five required contexts now report success, and I verified their completed runs belong to this exact head. This clears the CI hold in my previous review.
The earlier exact-head own validation remains the basis: 404 unit tests, app/browser type checks, production build, seven targeted Chrome scenarios, and the no-op regression failing with the production fix removed and passing after restoration. Those checks were executed in the previous review, not rerun for this CI-only update. The documented group-selection rationale and verified child-only deletion alternative address the prior policy question. No new actionable author/thread change or code revision was found.
… (DES-1236) (Comfy-Org#20837) ## Summary https://github.com/user-attachments/assets/651154fc-7f44-4e5a-b815-b5069c0c91cf A marquee that captures no nodes, groups or reroutes now selects the visible links it crosses. The selected links are highlighted, and the selection toolbox shows two buttons: Hide (`lucide--eye-off`) and Delete (`lucide--trash-2`). Each action is one undo step. The Delete key also deletes a link selection. Closes DES-1236 - **Hit-test:** the link adapter records, for each drawn `LLink` or `Reroute` segment, how to compute its polyline (`linkPolylines.ts`, a `WeakMap`). The polyline is computed only when read, so drawing a frame does no extra work. Spline links give 17 points sampled along the curve; linear and straight links give their exact vertices. The canvas runs its link adapter with layout-store writes off, so `layoutStore` link geometry is empty and cannot be used. Selection walks the segments drawn in the last frame (`renderedPaths`) and runs a Liang–Barsky segment/rect test. A link is selected only when its drawn path crosses the marquee; its bounding box alone does not count. - **State:** a separate `linkSelectionStore` holds `{ links: LLink[], marquee, anchorX }`. `LLink` is not `Positionable`, and canvas selection state is unchanged. **Open question:** should links instead be a `SelectableKey` kind in `selectionStore` (ADR-CANVAS-SELECTION-0028)? This is being asked of the Comfy-Org#20757 owner. The plan is to land after Comfy-Org#20757 and rebase onto it. The merge touches seven hunks in `LGraphCanvas.ts`. The link-selection call must stay above Comfy-Org#20757's early returns in `_handleMultiSelect` and `processSelect`, and the canvas-level marquee and clearing tables here fail if it doesn't. - **Clearing:** any click, `select`, `selectItems`, `deselectAll`, Escape, `setGraph`, or a marquee that leaves items selected clears the link selection. Hiding all links clears it too. The store holds `LLink` objects, so a link that is hidden, removed, undone or replaced drops out. Shift and Alt marquees and select-only mode never select links; that gate sits in the canvas (`marqueeSelectsLinks`). Switching links to hidden mode clears the selection where the setting is applied. - **Subgraphs:** deleting a link into a subgraph output goes through `SubgraphOutput.disconnect()`, so the slot does not keep a dangling id. - **Commands:** `Comfy.Canvas.HideSelectedLinks` and `Comfy.Canvas.DeleteSelectedLinks`. `Comfy.Canvas.DeleteSelectedItems` falls back to the link selection when no items are selected, so Delete and Backspace work. - **Toolbox:** `SelectionToolbox.vue` renders `LinkSelectionActions.vue` in place of the item buttons. `useSelectionToolboxPosition` puts it at the x where the marquee was released, just above the topmost selected link at that x. A selection of only reroutes or subgraph IO nodes now hides the toolbox instead of leaving it at a stale position. ## Verification - Unit tests (Vitest): 105 files and 1,314 tests across the touched areas pass. The tests cover: - `polylineIntersectsBounds`; - linear, straight and spline polylines; - link selection, hide and delete against a real `LGraph`, including reroute segments, reloads and subgraph outputs; - a canvas-level marquee over a drawn link, in live and classic modes, with modifiers and select-only; - every path that clears the link selection; - the hidden-mode clear; - the Delete fallback against a real graph. - The pre-commit typecheck, oxlint and oxfmt pass on the touched files. - E2E: `browser_tests/tests/links/linkMarqueeSelection.spec.ts`. It marquees over the two KSampler conditioning links, clicks Hide and checks exactly those two are hidden, then undoes. It marquees again and clicks Delete, checks that exactly those two are gone, and checks that one undo restores them. A final step deletes them with the Delete key. It runs in standard navigation mode, where a left-drag draws a marquee. Look hardest at the marquee hooks in `LGraphCanvas.ts`, and at how they will merge with Comfy-Org#20757.
Amp-Thread-ID: https://ampcode.com/threads/T-320964fa-ebc6-478d-a9e5-583b4bf47851 # Conflicts: # src/lib/litegraph/src/LGraphCanvas.selection.test.ts # src/lib/litegraph/src/LGraphCanvas.ts
1958457
|
Merged
Checks on the merge: Vitest across litegraph, renderer/core/canvas, vueNodes, composables, components/graph, extensions/core, and scripts: 8123 passed, 1 expected fail. |
🔧 Auto-fixes AppliedThis PR has been automatically updated to fix linting and formatting issues.
Changes made:
|
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed the merge with main and its marquee-link conflict resolution at cd6f55f. No new blocking findings.
Own verification on an isolated checkout with its own frozen install: 236 unit tests passed (1 existing expected failure); app/browser type checks and production build passed; 17 Chrome scenarios passed against that build and an isolated real ComfyUI backend, including classic/live link hide/delete/undo, node/group selection and subgraph boundaries. Scoped formatting/lint checks exited 0, with existing layer warnings and one ESLint-ignored test file.
Disposable-copy checks: restoring the classic early return fails the link-selection row; removing live link selection fails both live rows; making final live notification unconditional fails the independent no-op probe. Restoring the original head passes each. Latest five required contexts are successful on this exact SHA. Scope is the merge integration; no Cloud authentication, generation or comparative performance claim.
Comfy-Org#20757 made select() and deselect() report and made graph removal silent. Hooks that change selection from inside a selection operation still publish their own reports, so one operation can report two or three times. Run selection hooks inside a suppression scope so the outer select, deselect, deselectAll, selectItems or processSelect reports the final selection once. Ghost placement now replaces the selection through selectItems(), and the group context menu clears and selects silently before reporting once. Add a deselectAll({ keepSelected, notify }) overload and a notify option on select() and deselect(); the positional keepSelected form stays as a deprecated overload. Part of Comfy-Org#19707.
## Summary Keep each selection operation to one `onSelectionChange` report, even when a selection hook changes the selection while that operation is running. ## Rebased onto Comfy-Org#20757 (2026-10-22) Comfy-Org#20757 landed most of what this PR originally carried: direct `select()` and `deselect()` now report, graph removal is silent, and the plain replacing click reports once in both renderers. This branch was rebuilt on current `main` as one commit and now carries only what `main` still lacks: - A hook that changes selection inside `select`, `deselect`, `deselectAll`, `selectItems` or `processSelect` no longer publishes its own report; the outer operation reports the final selection once. On `main` these cases report two or three times. - Ghost placement replaces the selection through `selectItems()`, so it reports once with the placed node instead of an empty selection followed by the node. - The Nodes 2.0 group context menu clears and selects silently and reports once, including when a deselection hook selects the group. - `deselectAll({ keepSelected, notify })` overload and a `notify` option on `select()`/`deselect()`; positional `deselectAll(keepSelected)` stays as a deprecated overload. Each of the eight new or tightened tests fails on `main` and passes here. ## Breaking changes - `onSelectionChange` listeners whose selection hooks call `select()`/`deselect()`/`selectItems()`/`deselectAll()` now receive one report per outer operation instead of one per nested call. - Ghost placement and the group context menu report once instead of twice. - New public surface: the `notify` option on `select()`, `deselect()` and `deselectAll()`. It suppresses only the report; selection hooks still run. ## Review focus Selection hooks run inside a private suppression scope in `LGraphCanvas`; only the outermost operation reports. Graph removal and the `node:before-removed` listener in `canvasStore` are unchanged from `main`. Part of Comfy-Org#19707. ## Screenshots Not applicable. Unit regressions cover the selection event contract.
Summary
Click and marquee selection intent now resolves through one pure module, and
onSelectionChangefires exactly once per public operation that changed selection. Part of FE-2040 (Linear).src/core/selection/selectionIntent.ts: one pure resolver for click and marquee intent, used by the classic canvas and by the Vue node adapter throughprocessSelect. Shift and ctrl/meta both toggle; a shift+alt marquee adds, matching the classic canvas.onSelectionChangeis emitted once, after the batch is applied, and not at all when selection is unchanged.select/deselectnow emit (previously silent);processSelect/selectItemsno longer double-emit when clearing the prior selection.LGraphCanvas.selected_nodesis deprecated viawarnDeprecated(warns once per session, kept for extensions); first-party readers migrated toselectedCanvasNodes().it.failsselection harness tests now pass.Verification
typecheck,typecheck:browser,knip,adr:check, oxfmt: pass.