Repository navigation
fix: keep a new agent chat from inheriting a stale canvas (binding adoption, op coalescing) + contract e2e - #18064
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎭 Playwright: ✅ 2073 passed, 0 failed📊 Browser Reports
📦 Bundle: 9.95 MB gzip 🔴 +255 kBDetailsSummary
Category Glance App Entry Points — 3.81 kB (baseline 3.73 kB) • 🔴 +80 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.46 MB (baseline 1.43 MB) • 🔴 +32.3 kBGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 132 kB (baseline 124 kB) • 🔴 +7.83 kBTop-level views, pages, and routed surfaces
Status: 17 added / 16 removed / 1 unchanged Panels & Settings — 638 kB (baseline 621 kB) • 🔴 +17.3 kBConfiguration panels, inspectors, and settings screens
Status: 28 added / 27 removed User & Accounts — 37.9 kB (baseline 27.8 kB) • 🔴 +10.1 kBAuthentication, profile, and account management bundles
Status: 8 added / 8 removed / 3 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • 🔴 +740 BModals, dialogs, drawers, and in-app editors
Status: 8 added / 8 removed UI Components — 124 kB (baseline 117 kB) • 🔴 +7.2 kBReusable component library chunks
Status: 16 added / 15 removed Data & Services — 3.87 MB (baseline 3.6 MB) • 🔴 +267 kBStores, services, APIs, and repositories
Status: 16 added / 16 removed Utilities & Hooks — 566 kB (baseline 559 kB) • 🔴 +7.28 kBHelpers, composables, and utility bundles
Status: 30 added / 28 removed / 8 unchanged Vendor & Third-Party — 17.4 MB (baseline 18.1 MB) • 🟢 -665 kBExternal libraries and shared vendor chunks
Status: 10 added / 10 removed / 8 unchanged Other — 17.8 MB (baseline 16.4 MB) • 🔴 +1.39 MBBundles that do not match a named category
Status: 177 added / 172 removed / 124 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-21T09:22:57.405Z",
"gitSha": "8a2f14c3684ad1c0a7c1d2f04e38800583d76b5c",
"branch": "test/agent-new-chat-stale-canvas-repro",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2018.0119999999988,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.903999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 496.26899999999995,
"heapDeltaBytes": 10886016,
"heapUsedBytes": 73068552,
"domNodes": -264,
"jsHeapTotalBytes": 3923968,
"scriptDurationMs": 10.759999999999998,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2023.2829999999922,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.208,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 513.1269999999998,
"heapDeltaBytes": -1006432,
"heapUsedBytes": 61074616,
"domNodes": -262,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 11.032,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1857.4280000000272,
"styleRecalcs": 78,
"styleRecalcDurationMs": 33.065999999999995,
"layouts": 14,
"layoutDurationMs": 4.508,
"taskDurationMs": 900.0189999999999,
"heapDeltaBytes": 18938544,
"heapUsedBytes": 80872052,
"domNodes": -263,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 171.732,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1817.3880000000509,
"styleRecalcs": 75,
"styleRecalcDurationMs": 29.538999999999998,
"layouts": 14,
"layoutDurationMs": 4.224,
"taskDurationMs": 913.112,
"heapDeltaBytes": -2706104,
"heapUsedBytes": 64650444,
"domNodes": -263,
"jsHeapTotalBytes": 6807552,
"scriptDurationMs": 173.105,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1738.31899999999,
"styleRecalcs": 32,
"styleRecalcDurationMs": 20.125999999999998,
"layouts": 6,
"layoutDurationMs": 1.4359999999999997,
"taskDurationMs": 378.29400000000004,
"heapDeltaBytes": 2142664,
"heapUsedBytes": 64508456,
"domNodes": 76,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 14.124,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1739.7270000000162,
"styleRecalcs": 31,
"styleRecalcDurationMs": 18.619000000000003,
"layouts": 6,
"layoutDurationMs": 1.5219999999999998,
"taskDurationMs": 375.251,
"heapDeltaBytes": 2174040,
"heapUsedBytes": 64286416,
"domNodes": 76,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 13.674999999999999,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 680.1960000000236,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.585999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 462.58,
"heapDeltaBytes": 18208500,
"heapUsedBytes": 80368640,
"domNodes": 18,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 168.857,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-clipping",
"durationMs": 647.3690000000261,
"styleRecalcs": 13,
"styleRecalcDurationMs": 9.637999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 457.36599999999993,
"heapDeltaBytes": 18672060,
"heapUsedBytes": 80183020,
"domNodes": 22,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 168.39100000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1254.1410000000042,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 916.3449999999999,
"heapDeltaBytes": 34474772,
"heapUsedBytes": 101151904,
"domNodes": 0,
"jsHeapTotalBytes": 19296256,
"scriptDurationMs": 72.41599999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 631,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1173.0019999999968,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 851.457,
"heapDeltaBytes": 31315340,
"heapUsedBytes": 100407392,
"domNodes": 0,
"jsHeapTotalBytes": 18509824,
"scriptDurationMs": 73.16300000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 562,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 856.3480000000254,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 483.962,
"heapDeltaBytes": 14539224,
"heapUsedBytes": 91042136,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 167.05400000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 236,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 844.9709999999868,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 480.0629999999995,
"heapDeltaBytes": 14281836,
"heapUsedBytes": 90574292,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 161.99,
"eventListeners": 0,
"totalBlockingTimeMs": 232,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11744.914999999992,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10802.765000000001,
"heapDeltaBytes": 4159264,
"heapUsedBytes": 85908516,
"domNodes": -12,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 8903.523,
"eventListeners": 0,
"totalBlockingTimeMs": 1710,
"frameDurationMs": 18.886666666666617,
"p95FrameDurationMs": 50
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10110.842999999932,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9181.628,
"heapDeltaBytes": -1153404,
"heapUsedBytes": 80757392,
"domNodes": -14,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 7782.418,
"eventListeners": 0,
"totalBlockingTimeMs": 1068,
"frameDurationMs": 18.890000000000025,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10941.644999999993,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10032.805,
"heapDeltaBytes": 11568992,
"heapUsedBytes": 93128304,
"domNodes": -10,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 8226.62,
"eventListeners": 0,
"totalBlockingTimeMs": 1427,
"frameDurationMs": 19.996666666666595,
"p95FrameDurationMs": 50
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 12156.410999999935,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11357.548999999999,
"heapDeltaBytes": 20248256,
"heapUsedBytes": 96623868,
"domNodes": -10,
"jsHeapTotalBytes": 13631488,
"scriptDurationMs": 9534.761,
"eventListeners": 0,
"totalBlockingTimeMs": 2108,
"frameDurationMs": 18.89333333333331,
"p95FrameDurationMs": 50
},
{
"name": "large-graph-idle",
"durationMs": 2052.1640000000048,
"styleRecalcs": 5,
"styleRecalcDurationMs": 6.682999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 647.1780000000001,
"heapDeltaBytes": 3659084,
"heapUsedBytes": 83713524,
"domNodes": -252,
"jsHeapTotalBytes": -1056768,
"scriptDurationMs": 37.986000000000004,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2028.2159999999294,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.710000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 598.808,
"heapDeltaBytes": 1611580,
"heapUsedBytes": 83000672,
"domNodes": -250,
"jsHeapTotalBytes": -1282048,
"scriptDurationMs": 35.71300000000001,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2430.386999999996,
"styleRecalcs": 68,
"styleRecalcDurationMs": 13.393000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1720.7330000000002,
"heapDeltaBytes": 20189664,
"heapUsedBytes": 84097344,
"domNodes": -248,
"jsHeapTotalBytes": 1798144,
"scriptDurationMs": 879.9939999999999,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2443.724999999972,
"styleRecalcs": 64,
"styleRecalcDurationMs": 10.186999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1706.535,
"heapDeltaBytes": 19346360,
"heapUsedBytes": 83910528,
"domNodes": 4,
"jsHeapTotalBytes": 1536000,
"scriptDurationMs": 875.69,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3591.171000000031,
"styleRecalcs": 61,
"styleRecalcDurationMs": 10.961000000000002,
"layouts": 60,
"layoutDurationMs": 13.690000000000001,
"taskDurationMs": 1751.6000000000004,
"heapDeltaBytes": 9408788,
"heapUsedBytes": 75050708,
"domNodes": 2,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 819.4870000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3587.350000000015,
"styleRecalcs": 62,
"styleRecalcDurationMs": 13.512000000000004,
"layouts": 60,
"layoutDurationMs": 13.612999999999998,
"taskDurationMs": 1784.589,
"heapDeltaBytes": -8218564,
"heapUsedBytes": 74108004,
"domNodes": -256,
"jsHeapTotalBytes": -794624,
"scriptDurationMs": 815.0469999999999,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3184.7869999999716,
"styleRecalcs": 40,
"styleRecalcDurationMs": 5.455999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2028.035,
"heapDeltaBytes": 23546160,
"heapUsedBytes": 89130508,
"domNodes": 0,
"jsHeapTotalBytes": 942080,
"scriptDurationMs": 1035.084,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3143.7049999999545,
"styleRecalcs": 40,
"styleRecalcDurationMs": 5.240000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1972.2050000000002,
"heapDeltaBytes": 25032124,
"heapUsedBytes": 91084912,
"domNodes": 0,
"jsHeapTotalBytes": 679936,
"scriptDurationMs": 1004.7330000000001,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2019.7140000000218,
"styleRecalcs": 4,
"styleRecalcDurationMs": 4.433999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 616.942,
"heapDeltaBytes": 20198104,
"heapUsedBytes": 84449076,
"domNodes": -254,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 40.218999999999994,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2028.5590000000866,
"styleRecalcs": 4,
"styleRecalcDurationMs": 3.678000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 607.714,
"heapDeltaBytes": -4688796,
"heapUsedBytes": 83963532,
"domNodes": -254,
"jsHeapTotalBytes": -495616,
"scriptDurationMs": 36.267999999999994,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 586.6199999999822,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.352999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 411.98699999999997,
"heapDeltaBytes": 14553324,
"heapUsedBytes": 78050468,
"domNodes": 20,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 144.624,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 599.7409999999945,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10.141000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 420.34200000000004,
"heapDeltaBytes": 13899428,
"heapUsedBytes": 77396060,
"domNodes": 18,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 145.93200000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2018.4859999999958,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.427,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 513.329,
"heapDeltaBytes": 18251724,
"heapUsedBytes": 81567232,
"domNodes": -277,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 9.507000000000001,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2021.3059999999814,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.644000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 501.87199999999996,
"heapDeltaBytes": 17675852,
"heapUsedBytes": 81074488,
"domNodes": -278,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 9.843000000000002,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1706.4809999999966,
"styleRecalcs": 77,
"styleRecalcDurationMs": 30.824,
"layouts": 18,
"layoutDurationMs": 6.225,
"taskDurationMs": 838.3950000000001,
"heapDeltaBytes": 1592824,
"heapUsedBytes": 64786724,
"domNodes": -276,
"jsHeapTotalBytes": 6545408,
"scriptDurationMs": 116.262,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1689.1170000000102,
"styleRecalcs": 77,
"styleRecalcDurationMs": 28.02,
"layouts": 18,
"layoutDurationMs": 4.720000000000001,
"taskDurationMs": 805.0529999999999,
"heapDeltaBytes": -8313512,
"heapUsedBytes": 55149412,
"domNodes": -275,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 111.31599999999999,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1401.3720000000376,
"styleRecalcs": 16,
"styleRecalcDurationMs": 31.128999999999998,
"layouts": 5,
"layoutDurationMs": 14.114999999999998,
"taskDurationMs": 992.0469999999999,
"heapDeltaBytes": 20236108,
"heapUsedBytes": 103474300,
"domNodes": 13667,
"jsHeapTotalBytes": 10747904,
"scriptDurationMs": 34.257999999999996,
"eventListeners": 2383,
"totalBlockingTimeMs": 148,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8686.748000000023,
"styleRecalcs": 247,
"styleRecalcDurationMs": 37.498000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6071.938,
"heapDeltaBytes": -1059876,
"heapUsedBytes": 80039060,
"domNodes": -254,
"jsHeapTotalBytes": -827392,
"scriptDurationMs": 2832.939,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8603.107000000022,
"styleRecalcs": 248,
"styleRecalcDurationMs": 38.102999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6077.534999999999,
"heapDeltaBytes": -4673024,
"heapUsedBytes": 76621016,
"domNodes": -246,
"jsHeapTotalBytes": -40960,
"scriptDurationMs": 2845.7219999999998,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 13586.772999999994,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12812.637999999999,
"heapDeltaBytes": -45440136,
"heapUsedBytes": 193397640,
"domNodes": -8061,
"jsHeapTotalBytes": -13078528,
"scriptDurationMs": 235.848,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17616.845000000012,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17171.922,
"heapDeltaBytes": -37667932,
"heapUsedBytes": 186847328,
"domNodes": -8061,
"jsHeapTotalBytes": -10952704,
"scriptDurationMs": 294.269,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 21444.454999999947,
"styleRecalcs": 155,
"styleRecalcDurationMs": 19.76899999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21271.605,
"heapDeltaBytes": -45696756,
"heapUsedBytes": 169343484,
"domNodes": -8061,
"jsHeapTotalBytes": -17309696,
"scriptDurationMs": 922.445,
"eventListeners": -14928,
"totalBlockingTimeMs": 53,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 20932.9459999999,
"styleRecalcs": 151,
"styleRecalcDurationMs": 18.68700000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20776.64,
"heapDeltaBytes": -34456696,
"heapUsedBytes": 180770800,
"domNodes": -8061,
"jsHeapTotalBytes": -15474688,
"scriptDurationMs": 898.056,
"eventListeners": -14928,
"totalBlockingTimeMs": 44,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 4942.632000000003,
"styleRecalcs": 20,
"styleRecalcDurationMs": 82.72100000000002,
"layouts": 20,
"layoutDurationMs": 24.425,
"taskDurationMs": 4841.344,
"heapDeltaBytes": -16827432,
"heapUsedBytes": 200404500,
"domNodes": -8061,
"jsHeapTotalBytes": 19787776,
"scriptDurationMs": 99.206,
"eventListeners": -14928,
"totalBlockingTimeMs": 176,
"frameDurationMs": 17.223333333333297,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-node-resize-workload",
"durationMs": 6318.012999999951,
"styleRecalcs": 20,
"styleRecalcDurationMs": 84.05399999999996,
"layouts": 20,
"layoutDurationMs": 26.932000000000013,
"taskDurationMs": 6250.120000000001,
"heapDeltaBytes": -42437168,
"heapUsedBytes": 175103556,
"domNodes": -8061,
"jsHeapTotalBytes": 12120064,
"scriptDurationMs": 112.422,
"eventListeners": -14928,
"totalBlockingTimeMs": 538,
"frameDurationMs": 17.77333333333336,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8698.374000000058,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8450.662999999999,
"heapDeltaBytes": 1915340,
"heapUsedBytes": 185957568,
"domNodes": 0,
"jsHeapTotalBytes": -5242880,
"scriptDurationMs": 141.75300000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8429.360999999972,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8157.153000000001,
"heapDeltaBytes": 893284,
"heapUsedBytes": 175851784,
"domNodes": 0,
"jsHeapTotalBytes": -11010048,
"scriptDurationMs": 155.19000000000005,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333237,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 131.60199999992983,
"styleRecalcs": 11,
"styleRecalcDurationMs": 24.547000000000004,
"layouts": 5,
"layoutDurationMs": 2.2659999999999996,
"taskDurationMs": 109.91399999999999,
"heapDeltaBytes": 3342896,
"heapUsedBytes": 65088316,
"domNodes": 135,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 16.209999999999997,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 468.07000000001153,
"styleRecalcs": 18,
"styleRecalcDurationMs": 21.595999999999997,
"layouts": 3,
"layoutDurationMs": 1.5320000000000003,
"taskDurationMs": 113.36299999999999,
"heapDeltaBytes": 5045792,
"heapUsedBytes": 66646280,
"domNodes": 144,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 12.149000000000001,
"eventListeners": 81,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🎨 Storybook: ✅ Built — View Storybook🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. Fallow gates on new findings in changed files only, so everything below was introduced or moved by this PR (18 changed files).
Pre-existing findings are baselined in Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 71fb867bb53e2de74147e1e0509d8d4010bc44f8
Full docs: ADR-DEVEX-LINT-0015 🧩 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 |
7feb34f to
31a865b
Compare
dcb8523 to
3ddd604
Compare
Playwright videos for new testsDownload the recorded videos and HTML report Recorded projects: cloud Recorded test titles:
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #18064 +/- ##
==========================================
+ Coverage 83.00% 83.99% +0.98%
==========================================
Files 2955 2262 -693
Lines 145855 128892 -16963
Branches 37616 32932 -4684
==========================================
- Hits 121074 108264 -12810
+ Misses 23509 20337 -3172
+ Partials 1272 291 -981
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 705 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Fix assessment: not a trivial frontend fixWhy the frontend can't fix this alone. By the time the chat runs, the tab it targets is a saved cloud workflow, not a scratch binding. Picking a tab as the agent's target saves it as a cloud workflow first ( Evidence. I prototyped the obvious frontend candidate (drop the tab-to-workflow binding on New chat when the scratch canvas is empty, about 10 lines in Where the bug actually is. The first turn already posts Options
Recommendation: 1. Do not land a frontend workaround for this case. What this spec should assertWith the agent API mocked, the e2e cannot observe the server's document content, so "the agent still sees the old nodes" is not observable here. The frontend contract for this flow is: after clear, delete chat and New chat, the first turn goes to Still open
Generated by Claude Code |
3ddd604 to
a964202
Compare
b8f0e26 to
1004c8f
Compare
1004c8f to
7be764a
Compare
|
Resolved: CI is green again on this branch. Kept for the record. The failing test is This PR touches neither that spec, the golden, nor any renderer code. I ported the refreshed golden from #18168 as a Generated by Claude Code |
…mid-turn doc reset (PM-1355-shaped) Intentionally-failing repro for the nightly bug report (Jo Zhang, 2026-09-20): asking the in-app agent to run the canvas workflow blanks the canvas the moment the agent starts working, for the whole run, with every node reappearing at once when the run finishes. No fix is attempted here. Two independently-confirmed frontend mechanisms combine to produce exactly that timeline: - A `doc_reset`/`follower_replaced` frame synchronously sweeps every live materialized node off the canvas (`AgentCrdtProjection.clearForReset`) -- the only path that actively removes already-rendered nodes. - The resubscribe that follows can be acknowledged (`doc_subscribed:ok`) without its catch-up `doc_update`. This exact anomaly is visible in the bug report's own attached debug log, on a different (later, smaller) workflow in the same session, self-healing only via the passive 30-second `STALE_AFTER_MS` stale-probe heartbeat (`agentCrdtDocLifecycle.ts`) -- there is no faster active recovery. Together, whatever triggers the reset, the canvas can sit blank for up to 30 real seconds with zero active recovery -- comfortably spanning one generation run (this report's own run + wait_for_job took 15386ms). Step 0 (existing PR check): searched open PRs across ComfyUI_frontend/cloud for "canvas blank"/"run"/"agent run"/"crdt-authority" during this run. #18099 ("repro schema-gate latch leaving canvas at zero nodes") is the closest sibling but covers a PERMANENT latch (until an explicit doc_reset) triggered by an unreadable schema_version -- not this transient, self-healing, run-duration-scoped blank. #18064 (new-chat stale canvas) is a different trigger (thread binding, not a mid-turn reset). No existing PR covers this. Open half of the RCA, stated plainly: the backend condition that would emit a doc_reset for a plain, edit-free "run the workflow" turn was NOT found. `run` / `wait_for_job` / `get_output` (cloud/services/agent/internal/loop/ tools.go) make no calls into the CRDT doc store at all, and the turn-start reconciliation that can emit a reset (`ensureDoc`/`prepareWorkflow` in cloud/services/agent/internal/loop/crdt.go) is heavily unit-tested against firing on an unmodified canvas. Which backend path actually emitted the reset in production is unconfirmed; this repro pins what the user sees once one is emitted, for whatever reason, and gives backend engineers a concrete signature (a `doc_reset` frame, or a `doc_subscribed:ok` with no following `doc_update`) to search production logs for around the incident. Verification: - pnpm exec eslint / oxlint / oxfmt --check on the new file -- clean - pnpm exec vue-tsc --project browser_tests/tsconfig.json --noEmit -- clean - pnpm exec playwright test --list -- collects the spec correctly under the cloud project with the right tags - pnpm exec vitest run src/workbench/extensions/agent/crdt/ useAgentCrdtFollower.test.ts -- 61/61 passed, no regressions - Known limitation: this sandbox's egress policy blocks cdn.playwright.dev (403), so the pinned Chromium build could not be downloaded and the spec could not be executed against a real browser here (same limitation noted on sibling repro PRs #18099/#18096 in this program). CI's Playwright run on this PR is the first real execution; treat its result, not this description, as the authoritative pass/fail signal. Related Slack thread: #comfy-agent-user-feedback, Jo Zhang's nightly report, 2026-09-20 03:24 UTC.
5d96d5d to
11c04c8
Compare
…ew agent chat After clearing every node on the canvas, deleting the chat from the history screen and starting a new chat, the new chat's first turn is still posted against the workflow document the deleted chat built its nodes in, and the canvas follower re-subscribes to that same document, so the agent keeps reasoning about nodes the user removed. The spec replays a recorded conversation through the existing agent conversation harness, drives the clear/delete/new-chat flow through the real UI, and asserts on the frontend's outgoing contract: the new thread's POST body (empty draft, workflow_id) and the follower's doc_subscribe frames. It is marked test.fail() until the behavior is fixed. The harness's record of the follower's doc frames is what the spec asserts on. Claude-Session: https://claude.ai/code/session_01LZ1S2w986aWaX4XTw2ynmo
…ests for the fix Rework the expected-failure repro into the frontend contract: after clearing a saved workflow's canvas, deleting the chat and starting a new one, the first turn posts to a new thread with the SAME workflow_id and an empty draft, every cleared node id reaches the host document as a delete_node op while the chat is still bound, and the canvas stays empty once the follower re-subscribes after the ack. The spec asserts the flattened op list, not frame count, and uses a host-side add after the re-subscribe as the readiness boundary for the catch-up. It runs as a plain test now and is red on this commit: the fake host holds human doc_ops by default and never answers them, so only the first single-op batch reaches it. Failing unit tests for the behaviors the fix adds: - eight same-tick human deletes reach the doc client as one batch - opSender.abortAll settles in-flight and queued batches undeliverable - a doc_reset for the bound doc settles pending human batches at once Pins that are green today: unbinding with queued batches settles every one undeliverable; deleting a chat issues no server request; a new chat after clearing the canvas keeps the saved target and posts the cleared draft (AgentPanelRoot). The spec reads the deleted node ids from the harness's op:node_id frame record and uses its host node ids and host-side push. Claude-Session: https://claude.ai/code/session_01LZ1S2w986aWaX4XTw2ynmo
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 9 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
| 🟡 Medium | 4 |
| 🟢 Low | 3 |
| ⚪ Nit | 1 |
Panel: 8/8 reviewers contributed findings.
| opId: `doc-reset:${detail.seq ?? 'unknown'}` | ||
| } | ||
| projection.clearForReset(detail.workflowId, context) | ||
| sender.abortAll() |
There was a problem hiding this comment.
🟠 High — sender.abortAll() fires on every doc_reset for the bound document, but its justification — the draft that caused the reset already carries these ops' effect — only holds for ops minted before this client posted that draft. A reset originating elsewhere (the agent, a collaborator, another tab; the new test dispatches one with actor: 'agent:x') or an edit made during the post-draft round trip is discarded with no retry and no user-visible surface, and the clearForReset + re-subscribe catch-up then repaints a node the user just deleted. Gate the abort on the reset's provenance (detail.actor) or on ops minted at or before the draft snapshot. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
This is the documented behaviour, not an oversight: ADR CRDT-AUTHORITY-0035 decision 4 states that a doc_reset for the bound document settles every queued human batch undeliverable and a transmitted in-flight batch unconfirmed, regardless of who authored the reset, because those ops were minted against the old lineage and re-addressing them would apply them twice. The ADR's Notes section records the assumption that the host emits a reset only for a human-authored divergence guarded by a sequence check (the backend change is marked as unreleased there), so a reset is not a routine collaborator edit. The test in useAgentCrdtFollower.test.ts that dispatches actor: 'agent:x' pins exactly that contract, and the Consequences section already lists user-facing surfacing of undeliverable/unconfirmed ops as a follow-up. Gating on provenance would reintroduce the stale-canvas replay this PR fixes. Leaving as is; if the host's reset semantics change, the ADR is the place to revisit it.
Generated by Claude Code
There was a problem hiding this comment.
Tracked as FE-2593. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| opId: `doc-reset:${detail.seq ?? 'unknown'}` | ||
| } | ||
| projection.clearForReset(detail.workflowId, context) | ||
| sender.abortAll() |
There was a problem hiding this comment.
🟡 Medium — This abort is skipped when reset reconciliation throws: projection.clearForReset() runs reconcileLiveGraph(), whose orphan sweep can invoke third-party onRemoved hooks that throw (the existing case at useAgentCrdtFollower.test.ts:923). The listener then exits before this line while native dispatchEvent lets LayoutFollowerBridge.onDocReset finish replacing and re-subscribing the document, leaving old-lineage in-flight and queued batches alive to be transmitted into the new lineage. Abort before the projection work or in a finally. Raised by 2 of 8 reviewers (gpt-5.6-sol-max edge-case, gpt-5.6-sol-max adversarial).
There was a problem hiding this comment.
Tracked as FE-2593. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
There was a problem hiding this comment.
Fixed in follow-up PR #18537 (agent op sender review follow-ups): abortAll() now runs in finally; a throwing clearForReset() is reported and no longer skips the reset bookkeeping.
Full context for agent readers
onDocReset in useAgentCrdtFollower.ts wraps the reconcile in try/catch/finally. On throw it calls reportError(error, { errorType: 'failure_clearing_agent_crdt_projection_on_reset' }), then still aborts in-flight batches, marks connected=false, clears the id sets and writes the dev-panel record. Pinned by the unit test that mounts a follower, makes the projection throw on reset, and asserts the sender state is ['unconfirmed'] with lastFrameType === 'doc_reset'.
| @@ -170,6 +188,7 @@ export function createOpSender(deps: OpSenderDeps): OpSender { | |||
|
|
|||
| function settleUnbound(batch: InFlight): void { | |||
| if (inFlight !== batch) return | |||
There was a problem hiding this comment.
🟡 Medium — batch.resent means "a resend was attempted", not "a resend reached the wire": armResultTimeout sets it before calling transmit(batch, 0), which can park while suspended, bail to settleUnbound on a binding mismatch, or exhaust the send-retry budget without a successful sendOps. Those paths reserve 2 credits for 1 transmission, and the surplus credit later swallows a successor batch's own anonymous result, costing it the full 10 s result-silence window plus a duplicate resend. Count credits from successful sendOps calls (e.g. a per-batch send counter) rather than the flag. Raised by 6 of 8 reviewers (gemini-3.1-pro edge-case, gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max edge-case, claude-opus-5-thinking-max adversarial, kimi-k3-max adversarial, kimi-k3-max edge-case).
There was a problem hiding this comment.
Tracked as FE-2593. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
There was a problem hiding this comment.
Fixed in follow-up PR #18537 (agent op sender review follow-ups): the in-flight record now counts successful sendOps calls and each retirement credits exactly that count.
Full context for agent readers
batch.resent meant "attempted", so a batch retired at its resend credited two late results for one transmission. The record now carries sentCount, incremented only when sendOps returns without throwing, and retirement drains that many credits. A unit test in opSender.test.ts retires a batch at its resend boundary and asserts a single credit.
| return | ||
| } | ||
| if (open?.workflowId !== workflowId) seal() | ||
| if (open) open.ops.push(...minted) |
There was a problem hiding this comment.
🟡 Medium — Merging independent same-tick mints into one admission group extends the host's prefix-abort semantics across ops that were previously independent: the result listener settles the whole batch acknowledged even on ok:false, and nothing re-enqueues the ops the host never reached. One rejected op (e.g. an uncatalogued_widget_write from the widget port) therefore discards every later op in that tick — unrelated node deletes and moves included — where those used to ship as separate batches that survived a sibling's rejection. The ADR names this tradeoff; consider preserving the failure boundary or requeueing the unprocessed suffix rather than only modelling it in the ledger. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial).
There was a problem hiding this comment.
Acknowledged as a tradeoff the ADR already records (Consequences, negative section): a same-tick admission group is one host frame, and the host's prefix-abort semantics apply to it as a unit, bounded by the wire-cap chunking. Per-op outcomes need the host frame upgrade noted at the top of opSender.ts; until then doc_ops_result is the binary applied/skipped split, acknowledged carries that result so only ops in applied count as confirmed, and the ledger models the boundary rather than re-splitting frames client-side. No change in this PR.
Generated by Claude Code
There was a problem hiding this comment.
Tracked as FE-2593. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| admit(operations) | ||
| if (flushScheduled) return | ||
| flushScheduled = true | ||
| void Promise.resolve().then(flushAdmitted) |
There was a problem hiding this comment.
🟡 Medium — A synchronous throw out of flush() becomes an unhandled rejection here, where the old synchronous enqueue path surfaced it to the caller — pump() installs inFlight and transmit() then calls the real client.sendOps, so serialization or WebSocket.send can throw after the batch is in flight but before a result timer is armed. inFlight stays non-null with no timer, so pump() early-returns forever and every later coalesced group queues indefinitely. Catch at the sender's transport boundary, report via reportError(), and treat the failure like sendOps() === false. Raised by 2 of 8 reviewers (gpt-5.6-sol-max edge-case, kimi-k3-max adversarial).
There was a problem hiding this comment.
Tracked as FE-2593. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
There was a problem hiding this comment.
Fixed in follow-up PR #18537 (agent op sender review follow-ups): a synchronous throw from flush()/sendOps is now handled like a refused send instead of escaping as an unhandled rejection.
Full context for agent readers
The send runs inside the sender's own boundary in opSender.ts. A throw is reported once per send cycle (throwReported flag, reset at attempt 0 so a new enqueue after settlement reports again), retried within the existing budget, then settled undeliverable. The in-flight slot is released, so later batches are no longer queued forever. Tests: "a transport that keeps throwing is reported once per send cycle, not once per retry" and the undeliverable-settlement case.
| if (!identified.some((opId) => inFlight!.opIds.has(opId))) { | ||
| // Names ops that are not in flight: a retired batch's own result, if | ||
| // a credit is outstanding for one. | ||
| if (staleAnonymousBudget > 0) staleAnonymousBudget-- |
There was a problem hiding this comment.
🟢 Low — This drains a credit for any identified result whose op ids miss the in-flight batch, without verifying the named ops belong to a retired batch that still holds a credit — the sender keeps no record of retired op ids. A host retransmission of an already-settled result, or another tab's result on the same workflow, consumes it; the aborted batch's real anonymous result then finds a zero budget and settles the current batch acknowledged, the exact mis-attribution the budget exists to prevent (with wrong confirmedDeletes bookkeeping downstream). Retain the aborted batch's op ids and drain only when a result names them. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, kimi-k3-max adversarial, claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Tracked as FE-2593. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
There was a problem hiding this comment.
Fixed in follow-up PR #18537 (agent op sender review follow-ups): a credit is drained only when an identified result names an op id this sender actually transmitted.
Full context for agent readers
The sender keeps the op ids of retired transmitted batches. A late or foreign identified result that does not match one of those ids no longer drains a credit. Unit test in opSender.test.ts sends a result for an op id the sender never minted and asserts the credit count is unchanged.
| !MESSAGES_PATH.test(new URL(response.url()).pathname) | ||
| ) | ||
| return | ||
| const accepted = zAgentTurnAccepted.parse(await response.json()) |
There was a problem hiding this comment.
🟢 Low — recordAccepted runs from a page.on('response') handler whose promise is never awaited, so a non-2xx or non-JSON response on a thread-messages URL makes response.json() or this parse reject unhandled — an ack-shape regression surfaces as a swallowed rejection or an opaque Zod error instead of a failing assertion. It also skews threadList(), which pairs acceptedThreadIds[index] positionally with posted[index]: one unrecorded response shifts every title, preview and workflow_id by one and can empty the history screen, failing the delete step for the wrong reason. Guard on response.ok() and use safeParse, recording the failure so the test can assert on it. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max edge-case, claude-opus-5-thinking-max adversarial).
There was a problem hiding this comment.
Tracked as FE-2593. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
There was a problem hiding this comment.
Fixed in follow-up PR #18537 (agent op sender review follow-ups): the fixture now guards on response.ok(), safe-parses the ack, records failures, and asserts at teardown that no ack failed.
Full context for agent readers
recordAccepted in browser_tests/fixtures/agentNewChatFixture.ts ran unawaited from page.on('response'); a non-2xx or non-JSON ack shifted the accepted list by one. The handler now checks response.ok(), safeParses both the ack and the body, pushes failures to a list, and the fixture teardown fails the test if that list is non-empty.
| void Promise.resolve().then(flushAdmitted) | ||
| }, | ||
| detach() { | ||
| detached = true |
There was a problem hiding this comment.
🟢 Low — detach() abandons operations already admitted this tick without flushing them, and the follower's teardown runs sender.detach() first, which clears the sender's open group without an onBatchSettled. An edit made in the same tick as unmount (or a productGate.enabled flip, which stops the scope synchronously) is therefore never sent and never reported as settled, where the previous enqueue path transmitted it synchronously. Flushing on detach, or settling the open group undeliverable, keeps the loss observable. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Same as before this PR: detach() already dropped queued batches without an onBatchSettled callback (see the pre-PR detach() in opSender.ts), and the open admission group follows that contract. The coalescer test 'sends nothing and settles nothing when detached before the flush' pins that best-effort teardown, matching ADR decision 3 (operations are best-effort delivery; the posted draft is the reconciliation primitive). Flushing on detach would send into a subscription being torn down in the same call. Leaving as is.
Generated by Claude Code
There was a problem hiding this comment.
Tracked as FE-2593. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| }, | ||
| admit, | ||
| flush, | ||
| pending() { |
There was a problem hiding this comment.
⚪ Nit — pending() counts the open admission group as a single batch, but seal() can split it into several wire-capped batches via chunkWireOps, so the reported count can rise across a flush() with no new admissions (the new coalescer test shows exactly that, 1 before the flush and 2 after). The docstring "In-flight + queued batch count" also no longer describes the open group it now includes. Raised by 1 of 8 reviewers (kimi-k3-max edge-case).
There was a problem hiding this comment.
Tracked as FE-2593. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
There was a problem hiding this comment.
Fixed in follow-up PR #18537 (agent op sender review follow-ups): the pending() doc comment now states that the open admission group counts as one batch.
Full context for agent readers
Doc-only change in opSender.ts; behaviour unchanged.
|
#18064) (#18317) ## Summary Backports source PR #18064 to Cloud 1.54 so same-tick human graph operations are coalesced and pending batches are aborted on a document reset, preventing a cleared canvas from returning in a new chat. Source: #18064, merged as `42d44cd31e56071cea90e4a5027ee1d2d7a46830`. Target: `cloud/1.54` at `19a4f18b799f228a0faf39d951c22a4fdb53daf8`. Tracking: christian-byrne/blocked-on-christian#827 ## Changes - **What**: Preserves same-tick operation coalescing, aborts admitted/in-flight human batches on `doc_reset`, and retains the saved workflow identity plus empty current draft for a new chat. - **Dependencies**: None. The release lockfile is unchanged. - **Target adaptation**: Keeps the release's `EcsFollowerAdapter`; adapts the removed conversation/socket regression to `agentConversationHostDoc` and `agentRequestResponseFixture` coverage. ## Review Focus - Coalescer admission/flush ordering around retarget and reset. - Release-specific adapter integration and target-harness regression coverage. - Backend authority behavior is not proven here; authentic served Cloud acceptance remains unavailable. Validation: focused Vitest 8 files / 355 tests; main and browser typechecks; full lint; format; ADR validation. All passed.
|
#18064) (#18317) ## Summary Backports source PR #18064 to Cloud 1.54 so same-tick human graph operations are coalesced and pending batches are aborted on a document reset, preventing a cleared canvas from returning in a new chat. Source: #18064, merged as `42d44cd31e56071cea90e4a5027ee1d2d7a46830`. Target: `cloud/1.54` at `19a4f18b799f228a0faf39d951c22a4fdb53daf8`. Tracking: https://github.com/christian-byrne/blocked-on-christian/issues/827 ## Changes - **What**: Preserves same-tick operation coalescing, aborts admitted/in-flight human batches on `doc_reset`, and retains the saved workflow identity plus empty current draft for a new chat. - **Dependencies**: None. The release lockfile is unchanged. - **Target adaptation**: Keeps the release's `EcsFollowerAdapter`; adapts the removed conversation/socket regression to `agentConversationHostDoc` and `agentRequestResponseFixture` coverage. ## Review Focus - Coalescer admission/flush ordering around retarget and reset. - Release-specific adapter integration and target-harness regression coverage. - Backend authority behavior is not proven here; authentic served Cloud acceptance remains unavailable. Validation: focused Vitest 8 files / 355 tests; main and browser typechecks; full lint; format; ADR validation. All passed. Backport note (core/1.54): two mechanical conflicts, both resolved to main's end state. - browser_tests/fixtures/agentConversationHostDoc.test.ts keeps core's file. The carrier's extra "coalesced canvas clear" test exists only on cloud (main's #18064 never added it). It also calls HostDoc.applyClient, which core and main replaced with applyWire. - useAgentCrdtFollower.test.ts keeps both imports: core's GraphOperation and the carrier's BatchOutcome. (cherry picked from commit 06068f3)
## Summary Ports to `core/1.54` every merged `main` Agent fix that `cloud/1.54` carries and core does not (the Agent UI catch-up from #18622, the cloud-only CRDT and workflow fixes, and the round-2 fixes), so both release lines are symmetric ahead of the local-agent rollout. ## Changes - **What**: `cherry-pick -x`, in three groups: - Agent UI, as in #18622: #17339, #17908, #17420, #18348, #18043, #17621 (without its two `src/lib/litegraph/` files; a 5 px HUD offset in `SideToolbar.vue` compensates), #17471, #17690. - Cloud-only fixes: #18063, #18073, #18064, #18033, #18289, #18604, #18616, #18376. - Round 2: #17568, #17628, #16491, #18453, #17767, #18431 (from #18571), #18603. - **Already on `core/1.54`**: #17439 (#18161), #17912 (#18186), #18391 (#18595). - **Excluded**: #17730 (core lacks its three files), #18421 (dead code on core builds), #16917 (conflicts with later core changes), #18066 (Christian's request), #18375 and #18251 (need their litegraph hunks). ## Review Focus - On this line the Agent panel registers only in cloud builds (`src/extensions/core/index.ts:41-44`); the shared chrome from #17621 and #17471 and the host telemetry from #18376 and #18603 ship in every build. - `HostTelemetrySink.ts` and its test equal `main`'s files (#18376, then #18603 on top). - #18064: `agentConversationHostDoc.test.ts` keeps this line's file; #18063's new test uses `main`'s version (multi-player 0.3.x stamps). - Supersedes #18571 and the closed #18637. Linear: [PM-1657](https://linear.app/comfyorg/issue/PM-1657), [PM-1656](https://linear.app/comfyorg/issue/PM-1656) ## Screenshots (if applicable) Visual changes are the ones reviewed on `main` and carried to cloud in #18622. --------- Co-authored-by: uytieu <uytieu@users.noreply.github.com> Co-authored-by: ryan-di <ryan.weihao.di@gmail.com> Co-authored-by: jaeone lee <89377375+jaeone94@users.noreply.github.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org> Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: Comfy Org PR Bot <snomiao+comfy-pr@gmail.com> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Hunter <huntcsg@users.noreply.github.com> Co-authored-by: Maanil Verma <vermaMaanil97@gmail.com>
|
1 similar comment
|
… three ways Christian, 2026-09-26: "yes we definitely want queued and replay edits. edits while connection is down should definitely still be pushed eventually. if adrs are saying otherwise, change the adrs as well." That reverses the premise of the P1 that removed these pins. Queue-and-replay is wanted product behaviour, so the `it.fails` pins are pinning a real gap, not arguing with a decision -- and the recorded clause they collide with is the thing that changes. Exactly one sentence collides: CRDT-AUTHORITY-0035 decision 3, line 67, "The frontend does not persist or re-send operations dropped as `undeliverable`". It is `Status: Proposed` and was agent-authored in #18064. An amendment is being drafted for ratification; it is not landed here. CRDT-WRITE-0035 needs no reversal and is honoured rather than amended. It already holds a delete minted before a tab switch and delivers it on return, which is the same direction. What it rejects is narrower than it reads: "a retry queue that resends undeliverable ops when the workflow rebinds", because that "duplicates the sender's ordering and never-re-mint rules outside the module that owns them". That is a placement objection protecting FORECLOSE #7 (never regenerate op_id on retry), not a product one. So the change this pins is small: the sender's five retries 500 ms apart are a DELIVERY budget where the ruling wants a RETENTION budget. Stop `undeliverable` being terminal, inside opSender. Do not add a queue beside it. Split three ways, one property per name, because `it.fails` passes on the FIRST failing assertion and abandons the body. That was DrJKL's finding 1, confirmed still open in his second pass: bundled, an implementation that delivered the op while re-minting its `op_id` reported as an expected failure and hid a FORECLOSE #7 violation. Proven fixed by mutation -- a build that retains the batch and replays it with re-minted ids flips the delivery pin and the exactly-once pin to "expected failure but passed" while the id-retention pin stays red, which is the discrimination the bundled version could not make. The same mutation correctly reddens the characterization test above them, so retention landing turns that one red and the pins green in one change; its docstring now says so, since it describes today's defect and not a desired property. Scope stated on the describe, because the pins are narrower than the product property: all three live inside one page session -- socket drop, budget exhaustion, socket return. None asserts survival across a RELOAD, which needs persistence and is what the parked human-op outbox stack was built for. That distinction is a design question, not something these pins settle. Also finding 3, fixed rather than deleted. `keeps the title across a replacement under the same id` supplied `title: 'Upscale pass'` on both the incumbent and the replacement, so it could not tell preservation from overwriting. Making the incumbent a hand-typed rename turns it red: the replacement payload's title wins and the user's name is lost. So it is restored as `it.fails`, joining the two `keeps a live rename ...` pins already in this file under different triggers -- this is the same-id replacement trigger the parked PM-1293 stack existed to fix.
… and the new-chat fixture (#18538) ## Summary Follow-up to #18064, narrowed after #18700. Fixes four defects in the agent op sender's late-result accounting and transport handling, makes the new-chat e2e fixture fail on an acknowledgement it could previously swallow, and adds an e2e that proves a human edit survives a transport throw. Each sender fix landed as a red test first. ## Changes - **What**: - Late-result credits are reserved per send that actually left the client, not per resend attempted. `batch.resent` was set before `transmit()`, so a batch retired at that resend reserved two credits for one transmission and the surplus swallowed the next batch's own result. - A credit is retired only on the aborted batch's own identified result. The sender remembers the op ids of every retired transmitted batch; a result naming ops it never minted no longer spends the credit. - An acknowledged batch reserves a credit for a send left unanswered. A batch resent after silence has two sends on the wire, so settling it on the first answer previously left the second to settle its successor. - A throwing transport is a failed send, not a stalled sender. `pump()` installs the in-flight record before `sendOps`, so a synchronous throw left the slot occupied with no timer armed and every later batch queued forever. The send now runs inside the sender's own boundary, is reported once per delivery as `failure_sending_agent_human_ops`, and is retried within the existing budget. - The new-chat fixture records a failed turn acknowledgement instead of skewing the thread list. `recordAccepted()` ran unawaited from `page.on('response')`; the handlers are now filtered to turn acks, drained before the thread list is served and before the teardown assertion, and an unreadable body is reported separately from a malformed one. - An e2e covers the throwing transport end to end: the first outbound `doc_ops` frame throws, and a renamed node survives the retry and a tab switch. The fault lives in `fixtures/utils/throwOnFirstDocOpsSend.ts` and records itself on the document, so the spec asserts the injection fired rather than passing as a plain rename test. ## Review Focus - `onOpsResult` is restructured rather than patched. It captures the addressed batch, then picks between the in-flight batch's own identified result, a retired batch's identified result (which drains its credit), and an anonymous failure (the in-flight batch's only once no credit could explain it). - **Known cost, deliberately kept.** A credit reserved for a result that never arrives is never drained, so the next batch's own answer pays for it and reserves another on its resend: once one result is lost, every later anonymous failure costs a `RESULT_TIMEOUT_MS` resend. Charging the swallow back to the batch was tried and reverted — the sender cannot tell whether an anonymous result is the retired batch's or the in-flight batch's, and charging it as both under-reserves and settles a successor on its predecessor's failure, reverting edits the host never rejected. Closing it needs a credit lifetime the result contract does not define, or a per-send id `DocFrameClient.sendOps` does not mint and `DocOpsResult` does not echo. `never settles a batch with a result whose ops it does not own` pins the invariant meanwhile. - `staleAnonymousBudget` and `retiredOpIds` model the same retired sends with separate lifetimes, and the set only sheds entries when the budget reaches zero. Per-batch `{ opIds, credits }` records would fix that and the cost above in one change; deliberately left as a follow-up. ## Verification - Every `test:` commit fails against its parent. Against current `main`'s `opSender.ts`, **nine** of this branch's sender tests fail and 40 pass. - Mutation-checked: removing the identified-branch reservation, removing the resend's re-arm of the throw report, adding a re-arm to `resume()`, and changing the telemetry slug each turn exactly one test red. - `typecheck`, `typecheck:browser`, `lint`, `format:check`, `knip` and `fallow audit` clean. - Both agent specs pass in the `cloud` project against a locally built cloud bundle on a real backend. Two negative controls: forcing the new-chat acknowledgement to a malformed 200 fails through the fixture's teardown guard as `body unreadable`, and breaking the `doc_ops` frame match fails the transport-throw spec on its injection assertion. - The new-chat fixture's failure branches are not exercised by any committed spec — its only consumer always gets a valid 2xx. They were checked by hand; a table-driven test for them needs `browser_tests/**` inside Vitest or the helper extracted, so it is worth its own change. --------- Co-authored-by: Glary-Bot <glary-bot@users.noreply.github.com>
Requested by Christian Byrne · Slack thread
Before: Clearing a saved workflow's canvas, deleting the chat and starting a new one left the agent reasoning about the removed nodes: an N-node delete went out as N serialized single-op batches and most of them were dropped when the chat unbound. The e2e for this flow was an expected-failure repro asserting the wrong contract (a fresh
workflow_id). The second door to the same symptom, a blank scratch tab opened after a reload adopting a persisted binding for the shared default path, landed separately in #18077 (document identity gates persisted tab bindings); this PR is rebased onto it and no longer carries a gate of its own for that door.After: Operations minted in one tick are coalesced into one batch, so a clear made while bound is one round trip; a
doc_resetsettles pending human batchesundeliverableat once. The e2e is a plain@cloudcontract test: the first turn of the new chat posts to a new thread with the sameworkflow_idand an empty draft, every cleared node id reaches the host document as adelete_node, and after the ack and re-subscribe the canvas stays empty.Keeps a new agent chat from inheriting a stale canvas through the clear-while-bound door and pins the client side of the contract the backend change relies on.
How.
docs/adr/CRDT-AUTHORITY-0035-human-canvas-authority-and-draft-reconciliation.mdrecords the decisions: the human-authoreddraftis the reconciliation primitive (conditional on the backend change that makes a posted human canvas authoritative, merged to the agent release branch and awaiting promotion to main), a new chat keeps the sameworkflow_id, ops are best-effort with same-tick coalescing (crdt/opCoalescer.ts, wired inuseAgentCrdtFollower),opSender.abortAll()ondoc_reset, and the blank-tab door is closed by the document-identity gate of ADR AGENT-BINDING-0035 (#18077) rather than by a second gate here. The fake host's apply mode (humanOpsHost: 'apply', from #18078) applies human ops through the real library and answersdoc_ops_resultplus thedoc_updateecho; the contract spec opts into it, and this PR adds only the relay'sok:falseanswer for adoc_opsbatch aimed at a workflow the host does not serve. Coalescing only narrows the clear-while-bound ordering; edits made while unbound reach the document only through the next turn's draft.Commits, red to green.
test:reworked spec + failing unit tests (red: one op reaches the never-answering host;abortAllmissing; eight batches instead of one; no settle ondoc_reset) →fix:coalescer,abortAll+ reset abort (units green; spec still red at the host-document outcome because all eight ops arrive but the fake host does not apply them) →docs:ADR →test:spec opts into the fake host's apply mode, host answers foreign-workflowdoc_ops(spec green;agentConversationReplay,agentTabSwitchCatchUp,load3dAgentUpdatestay green) →test:flush the coalescer before asserting in the R-73 cross-workflow tests →refactor:drop the unused coalescerpending().Verified locally on the rebased head: eslint, oxfmt check,
tsc --noEmit,vue-tscforbrowser_tests, knip,fallow audit --changed-since origin/mainpass (0 introduced),adr:check, Vitest forsrc/workbench/extensions/agentandsrc/platform/workflow/persistence(128 files, 1976 passed, 5 expected fail). Playwrightcloudproject on an earlier head of this branch: the new spec,agentConversationReplay(all recordings),agentTabSwitchCatchUp,load3dAgentUpdate, 19 passed; not re-run after the rebase. The one local failure there was the pre-existing@screenshotreplay case, identical 25279-pixel diff on the base commit (local Chromium revision drift, Linux CI owns the baseline).Still open. Backend promotion to main (until then the saved-target door still fails in production). Follow-ups: withhold
draftwhile a bound follower is disconnected or in a gap; surfaceundeliverablehuman ops to the user (detach()drops the queue with no event today); the target-keyed follower of GRAPH-DOCUMENT-0024; a server-side thread delete so the client tombstone can go; two browser tabs on one document are out of scope.🤖 Generated with Claude Code
https://claude.ai/code/session_01LZ1S2w986aWaX4XTw2ynmo