Repository navigation
fix: agent tool-call chat completion lags canvas materialization (PM-1575/PM-1576) - #18391
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 |
🌾 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 fdec8e362293f76f396a16154ed2c7a29ccaf659
Full docs: ADR-DEVEX-LINT-0015 🎭 Playwright: ✅ 2118 passed, 0 failed · 2 flaky📊 Browser Reports
🧩 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 📦 Bundle: 9.98 MB gzip 🟢 -37 BDetailsSummary
Category Glance App Entry Points — 3.87 kB (baseline 3.87 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.44 MB (baseline 1.44 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 132 kB (baseline 132 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 14 added / 14 removed / 4 unchanged Panels & Settings — 639 kB (baseline 639 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 18 unchanged User & Accounts — 37.9 kB (baseline 37.9 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 6 added / 6 removed / 5 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 124 kB (baseline 124 kB) • ⚪ 0 BReusable component library chunks
Status: 7 added / 7 removed / 9 unchanged Data & Services — 3.94 MB (baseline 3.94 MB) • 🟢 -628 BStores, services, APIs, and repositories
Status: 13 added / 13 removed / 3 unchanged Utilities & Hooks — 577 kB (baseline 577 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 19 added / 19 removed / 19 unchanged Vendor & Third-Party — 17.4 MB (baseline 17.4 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 17.8 MB (baseline 17.8 MB) • ⚪ 0 BBundles that do not match a named category
Status: 74 added / 74 removed / 228 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-23T08:51:10.589Z",
"gitSha": "8253413939cc1aaa399dd5d68c8e07fded253703",
"branch": "repro/pm-1575-materialization-lag",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2007.1420000000444,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.403999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 454.51199999999994,
"heapDeltaBytes": 9427468,
"heapUsedBytes": 76795252,
"domNodes": -261,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 8.489999999999998,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-idle",
"durationMs": 1991.720999999984,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.873,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 450.411,
"heapDeltaBytes": 6537084,
"heapUsedBytes": 74077104,
"domNodes": -261,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 7.9330000000000025,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1731.203999999991,
"styleRecalcs": 44,
"styleRecalcDurationMs": 14.533000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 799.655,
"heapDeltaBytes": 9998956,
"heapUsedBytes": 77648644,
"domNodes": -263,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 149.65800000000002,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1742.9469999999583,
"styleRecalcs": 46,
"styleRecalcDurationMs": 13.172,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 769.5790000000001,
"heapDeltaBytes": 8838520,
"heapUsedBytes": 75468732,
"domNodes": -260,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 137.06,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1723.6909999999739,
"styleRecalcs": 31,
"styleRecalcDurationMs": 15.948,
"layouts": 6,
"layoutDurationMs": 1.092,
"taskDurationMs": 335.518,
"heapDeltaBytes": 3186076,
"heapUsedBytes": 70705948,
"domNodes": 79,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 11.969000000000001,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1666.1410000000387,
"styleRecalcs": 31,
"styleRecalcDurationMs": 12.453999999999999,
"layouts": 6,
"layoutDurationMs": 1.0370000000000001,
"taskDurationMs": 323.19100000000003,
"heapDeltaBytes": 3032160,
"heapUsedBytes": 70501836,
"domNodes": 76,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 10.290000000000001,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 644.7810000000231,
"styleRecalcs": 12,
"styleRecalcDurationMs": 7.966000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 448.535,
"heapDeltaBytes": 18646736,
"heapUsedBytes": 81093696,
"domNodes": 20,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 162.98299999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 629.2779999999993,
"styleRecalcs": 12,
"styleRecalcDurationMs": 8.28,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 442.033,
"heapDeltaBytes": 18315752,
"heapUsedBytes": 80856380,
"domNodes": 20,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 165.31099999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1147.5399999999922,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 799.369,
"heapDeltaBytes": 38403680,
"heapUsedBytes": 106754732,
"domNodes": 0,
"jsHeapTotalBytes": 19820544,
"scriptDurationMs": 57.40200000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 529,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1164.9239999999281,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 816.364,
"heapDeltaBytes": 35320408,
"heapUsedBytes": 103803372,
"domNodes": 0,
"jsHeapTotalBytes": 18771968,
"scriptDurationMs": 60.36599999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 545,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 846.1200000000417,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 462.53900000000004,
"heapDeltaBytes": 14309792,
"heapUsedBytes": 90560136,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 136.29800000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 223,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 844.1510000000108,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 459.2620000000003,
"heapDeltaBytes": 14964744,
"heapUsedBytes": 91384684,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 138.89200000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 217,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-clean-combined-draw",
"durationMs": 9360.807000000023,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8388.163999999999,
"heapDeltaBytes": 1012692,
"heapUsedBytes": 83819028,
"domNodes": -20,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 6758.18,
"eventListeners": 0,
"totalBlockingTimeMs": 299,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 33.29999999999927
},
{
"name": "extension-clean-combined-draw",
"durationMs": 9559.882000000016,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8727.147,
"heapDeltaBytes": 5650756,
"heapUsedBytes": 88022396,
"domNodes": -14,
"jsHeapTotalBytes": 12320768,
"scriptDurationMs": 7120.2519999999995,
"eventListeners": 0,
"totalBlockingTimeMs": 511,
"frameDurationMs": 18.890000000000025,
"p95FrameDurationMs": 49.899999999999636
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 9543.833000000006,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8697.140000000001,
"heapDeltaBytes": 1053320,
"heapUsedBytes": 83816144,
"domNodes": -14,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 7043.109,
"eventListeners": 0,
"totalBlockingTimeMs": 275,
"frameDurationMs": 17.779999999999987,
"p95FrameDurationMs": 33.29999999999927
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 8549.362999999972,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7680.406999999999,
"heapDeltaBytes": 476776,
"heapUsedBytes": 82800236,
"domNodes": -14,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 6433.6539999999995,
"eventListeners": 0,
"totalBlockingTimeMs": 103,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "large-graph-idle",
"durationMs": 2034.2449999999985,
"styleRecalcs": 8,
"styleRecalcDurationMs": 5.458000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 598.4009999999998,
"heapDeltaBytes": -4077592,
"heapUsedBytes": 83433184,
"domNodes": -242,
"jsHeapTotalBytes": -1282048,
"scriptDurationMs": 34.492999999999995,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2036.198000000013,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.844000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 582.8009999999999,
"heapDeltaBytes": -3337984,
"heapUsedBytes": 83462028,
"domNodes": -240,
"jsHeapTotalBytes": -1282048,
"scriptDurationMs": 32.707,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2235.4080000000067,
"styleRecalcs": 69,
"styleRecalcDurationMs": 13.371,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1439.9529999999997,
"heapDeltaBytes": -7792048,
"heapUsedBytes": 79957124,
"domNodes": -243,
"jsHeapTotalBytes": -270336,
"scriptDurationMs": 806.353,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2235.198999999966,
"styleRecalcs": 66,
"styleRecalcDurationMs": 10.669999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1524.8849999999998,
"heapDeltaBytes": 19010624,
"heapUsedBytes": 83999240,
"domNodes": 8,
"jsHeapTotalBytes": 749568,
"scriptDurationMs": 808.8850000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3646.386000000007,
"styleRecalcs": 63,
"styleRecalcDurationMs": 14.220999999999998,
"layouts": 60,
"layoutDurationMs": 15.102,
"taskDurationMs": 1756.5520000000001,
"heapDeltaBytes": 8243708,
"heapUsedBytes": 74544052,
"domNodes": -250,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 802.312,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3458.843999999999,
"styleRecalcs": 63,
"styleRecalcDurationMs": 12.583000000000004,
"layouts": 60,
"layoutDurationMs": 14.029,
"taskDurationMs": 1613.634,
"heapDeltaBytes": 8207256,
"heapUsedBytes": 74123844,
"domNodes": -251,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 761.614,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3133.8079999999877,
"styleRecalcs": 41,
"styleRecalcDurationMs": 6.444000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1985.6249999999998,
"heapDeltaBytes": 25515260,
"heapUsedBytes": 89606784,
"domNodes": 2,
"jsHeapTotalBytes": 942080,
"scriptDurationMs": 1000.5279999999999,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666696,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3117.7079999999933,
"styleRecalcs": 43,
"styleRecalcDurationMs": 6.832999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1938.837,
"heapDeltaBytes": -3959640,
"heapUsedBytes": 87175660,
"domNodes": -255,
"jsHeapTotalBytes": 446464,
"scriptDurationMs": 992.094,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2059.5779999999877,
"styleRecalcs": 9,
"styleRecalcDurationMs": 11.268,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 608.209,
"heapDeltaBytes": -7365432,
"heapUsedBytes": 80157072,
"domNodes": -248,
"jsHeapTotalBytes": 552960,
"scriptDurationMs": 36.28000000000001,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2015.9800000000132,
"styleRecalcs": 6,
"styleRecalcDurationMs": 4.4270000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 539.7679999999999,
"heapDeltaBytes": -4315680,
"heapUsedBytes": 84218956,
"domNodes": -246,
"jsHeapTotalBytes": -495616,
"scriptDurationMs": 34.494,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 579.3159999999489,
"styleRecalcs": 48,
"styleRecalcDurationMs": 10.373000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 398.07,
"heapDeltaBytes": 13703044,
"heapUsedBytes": 83550292,
"domNodes": 22,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 146.38899999999998,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 577.280000000087,
"styleRecalcs": 48,
"styleRecalcDurationMs": 10.474999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 387.48499999999996,
"heapDeltaBytes": 13825508,
"heapUsedBytes": 83500864,
"domNodes": 22,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 145.757,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1997.7289999999925,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.4639999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 444.2999999999999,
"heapDeltaBytes": -10970168,
"heapUsedBytes": 58716600,
"domNodes": -278,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 7.134999999999999,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2019.73600000008,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.9529999999999985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 450.27700000000004,
"heapDeltaBytes": -5684400,
"heapUsedBytes": 64557676,
"domNodes": -275,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 7.5040000000000004,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1710.3999999999928,
"styleRecalcs": 46,
"styleRecalcDurationMs": 14.646,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 713.978,
"heapDeltaBytes": 4988464,
"heapUsedBytes": 74789036,
"domNodes": -275,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 97.056,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1692.194000000086,
"styleRecalcs": 44,
"styleRecalcDurationMs": 12.339999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 680.3240000000001,
"heapDeltaBytes": 8182912,
"heapUsedBytes": 77887872,
"domNodes": -277,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 92.074,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1368.8700000000154,
"styleRecalcs": 16,
"styleRecalcDurationMs": 26.808999999999994,
"layouts": 5,
"layoutDurationMs": 11.749,
"taskDurationMs": 908.373,
"heapDeltaBytes": 20299532,
"heapUsedBytes": 103477652,
"domNodes": 13667,
"jsHeapTotalBytes": 11796480,
"scriptDurationMs": 29.511000000000003,
"eventListeners": 2383,
"totalBlockingTimeMs": 123,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8393.116999999962,
"styleRecalcs": 252,
"styleRecalcDurationMs": 42.87200000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5876.871,
"heapDeltaBytes": -17677428,
"heapUsedBytes": 68493948,
"domNodes": -212,
"jsHeapTotalBytes": 5271552,
"scriptDurationMs": 2808.405,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8251.139999999963,
"styleRecalcs": 251,
"styleRecalcDurationMs": 39.95,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5600.545999999999,
"heapDeltaBytes": -18282252,
"heapUsedBytes": 68537552,
"domNodes": -243,
"jsHeapTotalBytes": 4222976,
"scriptDurationMs": 2722.007,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 16911.481999999978,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16531.335,
"heapDeltaBytes": -36717640,
"heapUsedBytes": 198011488,
"domNodes": -8062,
"jsHeapTotalBytes": -8138752,
"scriptDurationMs": 263,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 16805.740000000013,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16427.948999999997,
"heapDeltaBytes": -37820080,
"heapUsedBytes": 178301952,
"domNodes": -8061,
"jsHeapTotalBytes": -13217792,
"scriptDurationMs": 265.877,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.216666666666665,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 21659.479999999974,
"styleRecalcs": 153,
"styleRecalcDurationMs": 20.43499999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21484.892,
"heapDeltaBytes": -45164280,
"heapUsedBytes": 169117588,
"domNodes": -8061,
"jsHeapTotalBytes": -13643776,
"scriptDurationMs": 955.099,
"eventListeners": -14928,
"totalBlockingTimeMs": 176,
"frameDurationMs": 18.329999999999927,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 20833.07400000001,
"styleRecalcs": 154,
"styleRecalcDurationMs": 18.04,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20573.456000000002,
"heapDeltaBytes": -31355568,
"heapUsedBytes": 191715152,
"domNodes": -8062,
"jsHeapTotalBytes": -18653184,
"scriptDurationMs": 945.174,
"eventListeners": -14928,
"totalBlockingTimeMs": 155,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-node-resize-workload",
"durationMs": 6334.577999999965,
"styleRecalcs": 20,
"styleRecalcDurationMs": 75.31900000000003,
"layouts": 20,
"layoutDurationMs": 26.703000000000003,
"taskDurationMs": 6301.320000000001,
"heapDeltaBytes": -45724912,
"heapUsedBytes": 175009628,
"domNodes": -8061,
"jsHeapTotalBytes": 18309120,
"scriptDurationMs": 116.10000000000001,
"eventListeners": -14928,
"totalBlockingTimeMs": 524,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6110.431000000062,
"styleRecalcs": 20,
"styleRecalcDurationMs": 77.97799999999997,
"layouts": 20,
"layoutDurationMs": 26.280000000000012,
"taskDurationMs": 6055.335999999999,
"heapDeltaBytes": -61020552,
"heapUsedBytes": 167812464,
"domNodes": -8061,
"jsHeapTotalBytes": 2818048,
"scriptDurationMs": 120.993,
"eventListeners": -14928,
"totalBlockingTimeMs": 436,
"frameDurationMs": 17.773333333333238,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8803.936000000022,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8675.125,
"heapDeltaBytes": -10429452,
"heapUsedBytes": 171172476,
"domNodes": 0,
"jsHeapTotalBytes": -27000832,
"scriptDurationMs": 134.96600000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8581.489000000034,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8390.652999999998,
"heapDeltaBytes": -13001340,
"heapUsedBytes": 171635028,
"domNodes": 0,
"jsHeapTotalBytes": -8650752,
"scriptDurationMs": 136.18200000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 105.72700000000168,
"styleRecalcs": 9,
"styleRecalcDurationMs": 18.663,
"layouts": 2,
"layoutDurationMs": 1.2439999999999998,
"taskDurationMs": 79.55500000000002,
"heapDeltaBytes": 3100192,
"heapUsedBytes": 68974844,
"domNodes": 127,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 8.173,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "workflow-execution",
"durationMs": 115.04500000000917,
"styleRecalcs": 8,
"styleRecalcDurationMs": 21.044,
"layouts": 5,
"layoutDurationMs": 2.555,
"taskDurationMs": 90.97000000000003,
"heapDeltaBytes": 3124884,
"heapUsedBytes": 65114728,
"domNodes": 132,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 8.575999999999999,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🎨 Storybook: ✅ Built — View Storybook |
…l completion Adds a failing-only Playwright spec pinning the observable gap: the agent's tool-call-completion affordance (chat channel) settles well before the corresponding doc_update actually lands on the CRDT follower and renders on canvas. Confirmed structurally by reading agentEventTransport.ts's ingest() (flips a tool part done purely from the chat frame's status, independent of the CRDT doc/follower state) and useAgentCrdtFollower.ts (the doc-side listeners are wired separately and never consulted by the chat completion path). The ~10s magnitude itself is not confirmed as client-side (no matching timer found in agentCrdtDocLifecycle.ts/opSender.ts), so the spec pins the timing gap rather than asserting a specific backend cause. Claude-Session: https://claude.ai/code/session_01VR48ZgDstU3S7MKeC1q3bH
cd7eef2 to
93d2dd7
Compare
Playwright videos for new testsDownload the recorded videos and HTML report Recorded projects: cloud Recorded test titles:
|
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #18391 +/- ##
==========================================
+ Coverage 83.51% 84.54% +1.02%
==========================================
Files 2989 2288 -701
Lines 148031 130885 -17146
Branches 38242 33802 -4440
==========================================
- Hits 123630 110656 -12974
+ Misses 23116 19929 -3187
+ Partials 1285 300 -985
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 751 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…M-1575) agentEventTransport.ts's ingest() flipped a chat tool-call part's state to 'done' purely from the agent_tool_call frame's own status, with zero coupling to whether the corresponding CRDT doc_update had actually reached and been projected onto the canvas. createAgentEventTransport now takes an optional shouldAwaitCanvasSync gate: while it returns true, a tool call reporting done holds its part at 'streaming' (same spinner glyph as in-progress) instead of flipping straight to 'done', until notifyCanvasCaughtUp() is called or STALE_AFTER_MS elapses -- reusing the CRDT follower's own passive-heartbeat bound (agentCrdtDocLifecycle.ts) instead of a new magic number. The gate defaults to always-false, so any caller that never wires it up (including every existing unit test) keeps the pre-fix immediate-done behavior. agentConversationStore.ts threads a canvasSyncGate through to every transport it creates and exposes setCanvasSyncGate/notifyCanvasCaughtUp so a host can register the gate and forward catch-up signals to the active turn and any stashed background ones. AgentPanelRoot.vue wires the gate to agentPanelStore.enabled (the same flag that gates the CRDT follower itself) and calls notifyCanvasCaughtUp() whenever useAgentCrdtFollower's outcomes.applied counter increases for the bound workflow. Updates agentCanvasLagsToolCallCompletion.spec.ts's first test (previously test.fail()) to assert the new, correct behavior instead: the add_node tool call's row stays on the spinner glyph (not done) while the canvas has nothing yet, and flips to done in the same moment the delayed doc_update lands and the node appears. The second test (eventual node landing) is unchanged and still passes. Claude-Session: https://claude.ai/code/session_01VR48ZgDstU3S7MKeC1q3bH
|
Fix commit pushed ( Leaving this in draft rather than marking ready for review: |
…M-1575) The shouldAwaitCanvasSync gate added to createAgentEventTransport's ingest() pushed its cyclomatic complexity over fallow's audit gate (22, CRAP 126.5). Split each switch case's body into a dedicated handler (resolveToolCallState, handleToolCallEvent, handleActiveTabEvent, handleAskEvent, handleThinkingEvent, handleAskResolvedEvent, handleMessageDeltaEvent) and pulled the dispatch itself into applyChatEvent(), so ingest() is now just the settled-guard plus a single call. No behavior change: same event handling, same emit/no-emit conditions, same tests. Verified locally with `fallow audit --changed-since f433c06` that the ingest() complexity finding for this file is gone (verdict: pass), and that eslint, vue-tsc, and the agent test suite are clean. Claude-Session: https://claude.ai/code/session_01VR48ZgDstU3S7MKeC1q3bH
… (PM-1575)
playwright-video-new-tests was genuinely failing on
agentCanvasLagsToolCallCompletion.spec.ts's first test, not flaking: real CI
logs were unreachable (job logs and the playwright-report-new-tests artifact
both redirect to productionresultssa5.blob.core.windows.net, which this
session's egress proxy denies with 403 -- confirmed via the GitHub API's
/actions/jobs/{id}/logs and /actions/artifacts/{id}/zip endpoints), so this
was diagnosed by adversarial code reading plus a new unit regression test
that reproduces it deterministically outside CI.
Two compounding bugs in agentConversationStore.ts, both introduced by
PM-1575's own fix (e5b9990), account for the failure:
1. ingest()'s agent_message_done branch called clearActive() (which nulls
the `transport` slot) immediately after transport.settle(). A tool-call
part held at 'streaming' pending canvas catch-up became unreachable the
instant its turn settled, so notifyCanvasCaughtUp() could never reach it
-- it would only ever settle via its own 30s STALE_AFTER_MS fallback,
tens of seconds later than the spec's expect() timeout allows.
2. Even once reachable, replaceActive() looked up the array slot to swap via
`activeIndex.value`, which clearActive() also resets to -1. A settled
transport's later emit (from notifyCanvasCaughtUp) could no longer land
in `messages`, even though the settled message was still sitting there.
Fixes: keep the just-settled active-turn transport in a new
`settledActiveTransport` slot so notifyCanvasCaughtUp() still forwards to it
(mirroring how a stashed background turn's transport is deliberately kept
past its own settle()), and make replaceActive() find its target by message
id instead of the now-stale activeIndex.
Added a store-level regression test
('still settles a canvas-sync-pending tool call after its turn has settled')
that fails on the old code and passes with the fix. No changes needed to the
new spec file itself or to agentEventTransport.ts -- both were already
correct.
Verified: eslint, vue-tsc --noEmit, playwright test --list (cloud project),
and vitest run src/workbench/extensions/agent (125 files, 1957 passed / 8
expected-fail, 0 failed) all clean.
Claude-Session: https://claude.ai/code/session_01VR48ZgDstU3S7MKeC1q3bH
…-1575) The settledActiveTransport capture and replaceActive() findIndex changes added in 3b46fe6 pushed agentConversationStore.ts's own ingest() over fallow's audit gate (cyclomatic 12, CRAP 43.1). Split each branch into a dedicated handler (ingestActiveTurnEvent, settleActiveTurn, ingestActiveTabEvent, ingestBackgroundTurnEvent) so ingest() is now just three routing checks that delegate. No behavior change: same event routing, same settle/clear timing, same tests. Verified locally with `fallow audit --changed-since e1dc8e5` that the finding is gone (verdict: pass), and that eslint, vue-tsc, and the full agent test suite (8 files, 389 passing) are clean, including the PM-1575 regression test for canvas-sync-pending tool calls after turn settlement. Claude-Session: https://claude.ai/code/session_01VR48ZgDstU3S7MKeC1q3bH
This comment has been minimized.
This comment has been minimized.
…575) resolveToolCallState deferred every finished tool call to 'streaming' whenever shouldAwaitCanvasSync() was true, regardless of whether the call succeeded or failed. An error outcome never mutates the canvas, so there is no doc_update coming for it to wait on -- deferring it anyway strands the part at the spinner glyph for up to STALE_AFTER_MS (30s), and for a turn whose other tool calls also never touch the canvas (or also failed), notifyCanvasCaughtUp never fires to rescue it early either. This is what broke the "cloud" Playwright project on this PR: agentConversationReplay.spec.ts's recorded turns with a failed tool call (Validate, List model picks, Add node, Set widget) expect the failed-glyph (lucide--circle-x) to render once the turn settles, but it stayed hidden behind the spinner well past the test's timeout. Fix: only defer when status === 'success'. Added regression coverage in agentEventTransport.test.ts for the success/error/gate-closed paths. Verified: agentEventTransport.test.ts, agentConversationStore.test.ts, AgentMessage.test.ts (80/80), and the full agent unit suite (125 files, 1960 passing) all green; eslint clean on changed files. Claude-Session: https://claude.ai/code/session_01VR48ZgDstU3S7MKeC1q3bH
…he doc (PM-1575)
resolveToolCallState deferred every successful tool call to 'streaming'
whenever shouldAwaitCanvasSync() was true, regardless of whether that
tool ever produces a CRDT doc_update. Most agent tools are read-only or
navigational (print_workflow, list_slots, switch_tab, remember, ...)
and never touch the doc at all -- deferring them anyway strands the
part at the spinner glyph for the full STALE_AFTER_MS (30s), since a
turn with no canvas mutation never calls notifyCanvasCaughtUp to
rescue it early.
This is what broke the "cloud" Playwright project on this PR (job
106683643633, run 35708311344): agentConversationReplay.spec.ts and the
tab-switch specs replay recorded conversations whose read-only turns
(e.g. agent-rec-text-only-answer's switch_tab + print_workflow, which
carries zero graph_ops) expect the settled label ("Switched tabs") to
render -- but switch_tab is a KNOWN_TOOLS entry with a distinct
present-tense label ("Switching tabs...") while its part sits in
'streaming', so the row's exact-text assertion timed out well before
the 30s fallback. Confirmed against every recorded conversation under
browser_tests/fixtures/data/agent/conversations/: nearly every turn
ends on one or more read-only tool calls with no trailing graph_ops.
Fix: gate the defer on a small, explicit CANVAS_MUTATING_TOOLS allowlist
(add_node, delete_node, set_widget, connect, disconnect, clear_canvas,
apply_ops, insert_workflow, define_subgraph) in addition to the existing
success/gate checks. A read-only tool's successful outcome now settles
immediately regardless of the gate; a real graph edit keeps the PM-1575
deferral behavior (agentCanvasLagsToolCallCompletion.spec.ts's add_node
scenario is unaffected).
Added regression coverage in agentEventTransport.test.ts for a
read-only tool call staying immediate while the gate is open.
Verified: agentEventTransport.test.ts, agentConversationStore.test.ts,
and the full agent unit suite (125 files, 1961 passing) all green;
eslint and vue-tsc clean on changed files. The "cloud" Playwright
project itself could not be run in this sandbox (no browser runtime);
verified instead by replaying every recorded conversation's tool-name
sequence against the fix in isolation.
Claude-Session: https://claude.ai/code/session_01VR48ZgDstU3S7MKeC1q3bH
…ower (PM-1575)
setCanvasSyncGate was wired to agentPanelStore.enabled -- the agent panel
product feature flag -- instead of the CRDT follower's own `connected`
status. That flag is on in effectively every environment and test that
exercises the panel at all, whether or not a CRDT doc subscription for the
bound workflow has actually been established. Gating on it alone deferred
every mutating tool call (add_node, set_widget, ...) to 'streaming' the
instant its frame reported success, even when no `doc_subscribed` frame had
ever been received -- meaning nothing was ever going to call
notifyCanvasCaughtUp() to release it, and the row (and the composing
"Working..." status, which requires every part settled) stayed stuck until
the 30s STALE_AFTER_MS fallback.
This is what broke the "cloud" Playwright project again on this PR (job
106698477876, run 35712876712): "7 failed tests due to waiting for
locator('#agent-panel-root').getByText('Working...', { exact: true }) to be
visible." agentPanel.spec.ts's basic chat-turn test (and others like it)
mock tool-call websocket frames directly with no CRDT doc host standing
behind them at all -- set_widget resolves successfully but the panel's own
feature flag being on was enough to defer it, so "Working..." never
appeared once every visible part should have settled.
Fix: gate on `crdtStatus.value.connected`, which only flips true on a real
`doc_subscribed { ok: true }` frame -- matching the wiring code's own
existing comment ("gate ... only while the CRDT follower is actually
active"), which the previous line did not actually implement. A disabled
panel never starts the follower, so this implies `enabled` too; the actual
PM-1575 repro (agentCanvasLagsToolCallCompletion.spec.ts) still subscribes
its HostDoc and is unaffected.
Added a regression test in AgentPanelRoot.test.ts: with the panel enabled
but no doc_subscribed frame ever sent (this file's default, like most of
the suite), a mutating tool call's success now settles immediately and the
composing "Working..." status appears, instead of hanging until the stale
timeout.
Verified: AgentPanelRoot.test.ts (243/243), the full agent unit suite (125
files, 1962 passing, 8 expected-fail from pre-existing PM-1199/1200
test.fail() cases, unrelated), eslint and vue-tsc clean on changed files.
Confirmed the new test fails (times out) against the pre-fix gate and
passes against the fix.
Claude-Session: https://claude.ai/code/session_01VR48ZgDstU3S7MKeC1q3bH
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 10 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
| 🟡 Medium | 6 |
| 🟢 Low | 3 |
Panel: 8/8 reviewers contributed findings.
| transport?.notifyCanvasCaughtUp() | ||
| settledActiveTransport?.notifyCanvasCaughtUp() | ||
| for (const entry of backgroundTurns.values()) | ||
| entry.transport.notifyCanvasCaughtUp() |
There was a problem hiding this comment.
🟡 Medium — The catch-up signal is untargeted in both directions: inside a transport it settles every held part, and the store fans it out to the active turn, the settled slot and all background turns. A turn holding add_node + connect therefore settles both on the first update, a background turn bound to workflow B is settled by workflow A's update, and the local user's own echoed edit settles a held call early (outcomes.applied counts any applied frame regardless of actor) — the same chat/canvas decoupling this PR sets out to close. Key the release to the workflow (and ideally the op) the held part belongs to. Raised by 7 of 8 reviewers (gpt-5.6-sol-max edge-case, gpt-5.6-sol-max adversarial, kimi-k3-max edge-case, kimi-k3-max adversarial, claude-opus-5-thinking-max edge-case, claude-opus-5-thinking-max adversarial, gemini-3.1-pro adversarial).
There was a problem hiding this comment.
Confirmed: agent_tool_call carries no workflow_id or op-level identifier (see zAgentToolCallData in agentApiSchema.ts), so notifyCanvasCaughtUp() cannot key its release to the workflow or op a held part actually belongs to without a wire-protocol change. Filed https://linear.app/comfyorg/issue/PM-1637 to track adding workflow_id (and ideally op_id) to that frame and the follow-up client work to consume it.
Leaving this thread open rather than resolving it, since it needs that backend/schema change, not a client-side fix in this PR.
Generated by Claude Code
…nsport (PM-1575) Cursor review findings #1 (high), #6 (medium), #8 (low) on PR #18391. - #1: notifyCanvasCaughtUp() was edge-triggered. On the normal healthy-doc ordering (doc_update applies while the tool is still running, terminal frame lands after), the catch-up call fired while nothing was pending yet and was a silent no-op -- stranding the tool-call part at 'streaming' for the full 30s STALE_AFTER_MS fallback. Each tool-call part now captures the CRDT outcome counter as of its first frame and, when the terminal frame arrives, settles immediately if the counter already advanced past that baseline instead of arming a timer. - #6: a duplicate/redelivered terminal frame for the same tool_call_id overwrote the pending timer's map entry without clearing the previous handle, leaving an orphaned timer that could fire at the original, now-stale deadline and settle the part early. Timers are now always cleared before either branch of resolveToolCallState runs. - #8: CANVAS_MUTATING_TOOLS is a hand-maintained set against an unconstrained tool_name string with no canonical registry to derive from. Added a test pinning every tool name seen in the recorded conversation fixtures against a reviewed list, so an unreviewed new name fails CI. Also adds `dispose()` and `hasPendingCanvasSync()` to AgentEventTransport, used by the store-side teardown fixes in a follow-up commit. Claude-Session: https://claude.ai/code/session_01VR48ZgDstU3S7MKeC1q3bH
… paths (PM-1575) Cursor review findings #2 (medium, partial), #3 (medium), #4 (medium), #5 (medium), #7's store-side half (medium) on PR #18391. - #3: settleActiveTurn() kept only a single "settled but still holding" transport slot. A second turn settling within the 30s window overwrote it, stranding the first turn's held part. Replaced with a Set of settled transports, each pruned once it has nothing left pending. - #4/#5: abortActiveTurn(), settleBackgroundTurn(), dropBackgroundTurns(), resumeBackgroundTurn()'s settled-early-return path, reset() and hydrate() all dropped a transport out of every reachable slot without cancelling its pending canvas-sync timers -- stranding held parts at 'streaming' until their own 30s fallback, and risking an orphaned timer firing later and overwriting authoritative content hydrate() has since loaded under the same turn id. All now call the transport's new dispose(). - #7 (store side): canvasSyncGate/canvasSyncOutcomeCount are now always threaded into createAgentEventTransport() through an indirection closure rather than passed by value, so a later setCanvasSyncGate() call reaches transports created before it. setCanvasSyncGate() also now accepts the outcome-count getter finding #1's transport-level fix needs. - #2 (partial): the counter-comparison fix for finding #1 is per-transport (each transport's own canvasSyncBaseline), not a shared global flag, per that finding's "at minimum" fallback. Full per-workflow/per-op targeting of notifyCanvasCaughtUp()'s fan-out is NOT implemented -- it still broadcasts to the active, settled, and every background transport regardless of which workflow each is bound to. Follow-up recommended. Also includes the store-level regression test for finding #1/#9 (threading the outcome-count getter end to end) and a test pinning finding #10's increase-only guard against the real store. Claude-Session: https://claude.ai/code/session_01VR48ZgDstU3S7MKeC1q3bH
…1575/PM-1576) (#18391) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1790054750260419?thread_ts=1790054750.260419&cid=C0BGH348Z0C)_ Fixes PM-1575/PM-1576: the agent's chat-side tool-call-completion affordance ("done" spinner, "Worked for Xs" summary) settled well before the resulting graph change actually rendered on canvas, with nothing in the UI indicating the canvas hadn't caught up. This PR now contains both the failing repro test (red) and the minimal client-side fix (green). **Before (bug):** an agent tool call that touches the canvas (e.g. adding a node) reports done — the tool's own row flips straight to its settled icon — while the canvas itself still shows nothing for the new content, for a stretch that (per the stagingcloud report) is close to 10 real seconds. `agentEventTransport.ts`'s `ingest()` flipped a tool part's `state` to `'done'` purely from the chat-channel `agent_tool_call` frame's own `status` field, with zero coupling to whether the corresponding CRDT `doc_update` had actually reached and been projected onto the canvas (`useAgentCrdtFollower.ts` / `LayoutFollowerBridge`) — two structurally disjoint listeners, never consulting each other. **After (fixed):** `createAgentEventTransport` now takes an optional `shouldAwaitCanvasSync` gate. While it returns `true`, a tool call that reports done holds its part's displayed `state` at `'streaming'` (the same spinner glyph it showed while running) instead of flipping straight to `'done'`, until either `notifyCanvasCaughtUp()` is called or `STALE_AFTER_MS` (30s) elapses — reusing the CRDT follower's own passive-heartbeat bound (`agentCrdtDocLifecycle.ts`) rather than inventing a new magic number. The gate defaults to always-`false`, so any caller that never wires it up (including every pre-existing unit test) keeps the old immediate-done behavior unchanged. `agentConversationStore.ts` threads this gate through to every transport it creates and exposes `setCanvasSyncGate` / `notifyCanvasCaughtUp` so a host can register the gate and forward catch-up signals to the active turn and any stashed background ones. `AgentPanelRoot.vue` wires the gate to `agentPanelStore.enabled` (the same flag that gates the CRDT follower itself) and calls `notifyCanvasCaughtUp()` whenever `useAgentCrdtFollower`'s `outcomes.applied` counter increases for the bound workflow — i.e. the moment a fresh doc update actually lands. **Relationship to PM-1355 (`#18179`, `agentCanvasBlanksDuringRunTurn.spec.ts`):** this mirrors that fix's *shape* (a bounded catch-up-confirmation signal) rather than reusing its primitive directly. PM-1355's `AgentCrdtDocLifecycle`/`SUBSCRIBE_CATCHUP_GRACE_MS` answers "is THIS subscribe's own catch-up frame overdue" — a question scoped to one resubscribe. This bug needed a different question answered: "has some later doc update landed since this tool call reported done", which lives one level up, at the chat-transport/composable boundary rather than inside the subscribe lifecycle. Both do reuse the same `STALE_AFTER_MS` bound as their fallback timeout, per the design guidance, rather than adding a second magic number. **Out of scope:** the actual backend ~10s doc-broadcast propagation delay itself is not addressed here — this fix only makes the client accurately reflect canvas state instead of eliminating the underlying lag. Root-causing that lag is still open (see the file-header RCA in the spec). - `browser_tests/tests/agent/agentCanvasLagsToolCallCompletion.spec.ts`'s first test (previously `test.fail()`) now asserts the fix directly: after the `add_node` tool call reports `success`, its row (expanded from the "Worked for Xs" summary) stays on the spinner glyph — not the settled one — while the canvas still has zero nodes; once the delayed `doc_update` lands, the row flips to done in the same moment the node appears. - The second test (node eventually lands once the delayed `doc_update` arrives) is unchanged and still passes. - `eslint`, `vue-tsc --noEmit`, and `playwright test --list` (both tests listed and named correctly) all pass. Every existing agent-suite unit test (125 files, ~1956 tests) still passes unchanged, since the new gate defaults to off unless a caller opts in. - Could not run a real browser in this sandbox (Playwright's Chromium/headless-shell download is CDN-blocked here, same known limitation as before). N/A — this is a Playwright spec + client-side logic change; no visual/UI screenshot to attach. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VR48ZgDstU3S7MKeC1q3bH --- _Generated by [Claude Code](https://claude.ai/code/session_01VR48ZgDstU3S7MKeC1q3bH)_ ---------
…1575/PM-1576) (#18391) Backport of #18391 to core/1.54. Cherry-picked the squash-merge commit fce6d77 onto a new branch from origin/core/1.54. The automated backport failed with conflicts in src/scripts/api.logs.test.ts, src/workbench/extensions/agent/AgentPanelRoot.vue, src/workbench/extensions/agent/crdt/useAgentCrdtFollower.ts, src/workbench/extensions/agent/stores/agent/agentConversationStore.test.ts, and src/workbench/extensions/agent/stores/agent/agentConversationStore.ts. Conflict resolution: - src/scripts/api.logs.test.ts: modify/delete. The file doesn't exist on core/1.54 because its introducing PR (#17773) was never backported here. Dropped rather than smuggling in unrelated test scaffolding. - useAgentCrdtFollower.ts: core/1.54 has an older, pre-refactor version of this file. The fix's `appliedLive` outcome counter needs to distinguish a live doc update from a subscribe's one-time catch-up frame; core/1.54's LayoutFollowerBridge already computed that distinction internally but never exposed it. Added a small, additive `ClassifiedDocUpdate` type to layoutFollowerBridge.ts (not one of the reported conflicts, but a necessary minimal dependency, mirroring main's own pre-existing mechanism) to expose the flag on the already-dispatched `doc_update` event, then wired `appliedLive` counting off it. - AgentPanelRoot.vue: kept the PR's teardown fix (reset canvasSyncGate on unmount); dropped `agentMinimapLayer.dispose()`, an unrelated feature not present on core/1.54. - agentConversationStore.ts / .test.ts: diff-alignment conflicts from upstream reordering; merged both sides' real content, kept core/1.54's Pinia test setup. - agentEventTransport.ts / .test.ts (auto-merged, not a reported conflict): imported STALE_AFTER_MS from agentCrdtDocLifecycle.ts, a module that doesn't exist on core/1.54 (a later extraction refactor not yet backported). Repointed both to useAgentCrdtFollower.ts, which still exports that same constant on this branch's older file layout. - browser_tests/tests/agent/agentCanvasLagsToolCallCompletion.spec.ts (new file, auto-merged): referenced @/platform/remote/comfyui/types (moved from @/schemas/apiSchema on main, not yet backported) and agent.entryButton (renamed from agent.askComfyAgent on main). Repointed to core/1.54's current locations/copy. Also called HostDoc.graph(), a method main's harness has that core/1.54's didn't; added it to agentConversationHostDoc.ts mirroring main exactly (readGraph from the already-installed @comfyorg/comfy-multi-player package). Its assertions also expected `WorkSummary.vue`'s "Worked for Xs" collapsing summary button, a UI feature from #17339 never backported to core/1.54. core/1.54's own equivalent is `ToolCallGroup.vue`, using the same reka-ui Collapsible primitive but a different trigger label ("Ran N tool call(s) [for Xs]" via agent.ranToolCalls/ranToolCallsTimed, not agent.worked). Retargeted the three `/^Worked/` button-name matchers to `/^Ran/` to match; the underlying mechanics under test (the tool row's own spinner/done glyph, role="listitem" rows, aria-expanded on the trigger) are identical between the two components. The CANVAS_MUTATING_TOOLS pinning unit test (agentEventTransport.test.ts) depends on the BE-11470 conversation-replay fixture corpus, backported separately in #18585 (which this branch is based on). Verification: pnpm typecheck, pnpm typecheck:browser, pnpm eslint, pnpm exec oxfmt all clean. Targeted pnpm vitest run across useAgentCrdtFollower, followerSubscription, AgentPanelRoot, agentConversationStore, agentEventTransport, CrdtDevPanel, crdtDebugReport: all green except 3 pre-existing Media-card upload failures (confirmed identical on unmodified origin/core/1.54, matching a prior backport's own documented note). <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1790054937773959?thread_ts=1790054937.773959&cid=C0BGH348Z0C)_
…1575/PM-1576) (#18391) Backport of #18391 to core/1.54. Cherry-picked the squash-merge commit fce6d77 onto a new branch from origin/core/1.54. The automated backport failed with conflicts in src/scripts/api.logs.test.ts, src/workbench/extensions/agent/AgentPanelRoot.vue, src/workbench/extensions/agent/crdt/useAgentCrdtFollower.ts, src/workbench/extensions/agent/stores/agent/agentConversationStore.test.ts, and src/workbench/extensions/agent/stores/agent/agentConversationStore.ts. Conflict resolution: - src/scripts/api.logs.test.ts: modify/delete. The file doesn't exist on core/1.54 because its introducing PR (#17773) was never backported here. Dropped rather than smuggling in unrelated test scaffolding. - useAgentCrdtFollower.ts: core/1.54 has an older, pre-refactor version of this file. The fix's `appliedLive` outcome counter needs to distinguish a live doc update from a subscribe's one-time catch-up frame; core/1.54's LayoutFollowerBridge already computed that distinction internally but never exposed it. Added a small, additive `ClassifiedDocUpdate` type to layoutFollowerBridge.ts (not one of the reported conflicts, but a necessary minimal dependency, mirroring main's own pre-existing mechanism) to expose the flag on the already-dispatched `doc_update` event, then wired `appliedLive` counting off it. - AgentPanelRoot.vue: kept the PR's teardown fix (reset canvasSyncGate on unmount); dropped `agentMinimapLayer.dispose()`, an unrelated feature not present on core/1.54. - agentConversationStore.ts / .test.ts: diff-alignment conflicts from upstream reordering; merged both sides' real content, kept core/1.54's Pinia test setup. - agentEventTransport.ts / .test.ts (auto-merged, not a reported conflict): imported STALE_AFTER_MS from agentCrdtDocLifecycle.ts, a module that doesn't exist on core/1.54 (a later extraction refactor not yet backported). Repointed both to useAgentCrdtFollower.ts, which still exports that same constant on this branch's older file layout. - browser_tests/tests/agent/agentCanvasLagsToolCallCompletion.spec.ts (new file, auto-merged): referenced @/platform/remote/comfyui/types (moved from @/schemas/apiSchema on main, not yet backported) and agent.entryButton (renamed from agent.askComfyAgent on main). Repointed to core/1.54's current locations/copy. Also called HostDoc.graph(), a method main's harness has that core/1.54's didn't; added it to agentConversationHostDoc.ts mirroring main exactly (readGraph from the already-installed @comfyorg/comfy-multi-player package). Its assertions also expected `WorkSummary.vue`'s "Worked for Xs" collapsing summary button, a UI feature from #17339 never backported to core/1.54. core/1.54's own equivalent is `ToolCallGroup.vue`, using the same reka-ui Collapsible primitive but a different trigger label ("Ran N tool call(s) [for Xs]" via agent.ranToolCalls/ranToolCallsTimed, not agent.worked). Retargeted the three `/^Worked/` button-name matchers to `/^Ran/` to match; the underlying mechanics under test (the tool row's own spinner/done glyph, role="listitem" rows, aria-expanded on the trigger) are identical between the two components. One more difference surfaced by CI: core/1.54's ToolCallGroup.vue keeps itself expanded for as long as any tool part is still 'streaming' (a v-model tied to that state), which main's WorkSummary.vue does not do -- so in the very scenario this fix creates (a tool part held at 'streaming' past the turn's own settle), the trigger is already open when the test gets to it, and an unconditional click was closing it instead of opening it. Added an expandToolCallGroup() helper that checks aria-expanded before clicking, used at both call sites. The CANVAS_MUTATING_TOOLS pinning unit test (agentEventTransport.test.ts) depends on the BE-11470 conversation-replay fixture corpus, backported separately in #18585 (which this branch is based on). Verification: pnpm typecheck, pnpm typecheck:browser, pnpm eslint, pnpm exec oxfmt all clean. Targeted pnpm vitest run across useAgentCrdtFollower, followerSubscription, AgentPanelRoot, agentConversationStore, agentEventTransport, CrdtDevPanel, crdtDebugReport: all green except 3 pre-existing Media-card upload failures (confirmed identical on unmodified origin/core/1.54, matching a prior backport's own documented note). <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1790054937773959?thread_ts=1790054937.773959&cid=C0BGH348Z0C)_
… materialization (PM-1575/PM-1576) (#18595) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1790054937773959?thread_ts=1790054937.773959&cid=C0BGH348Z0C)_ Backport of #18391 to `core/1.54`. Stacked on #18585 (BE-11470 conversation-replay fixture corpus), which this branch is based on and which must merge first. ## Before An agent tool call that touches the canvas (e.g. adding a node) reports done — the tool's row flips straight to its settled icon — while the canvas itself still shows nothing for the new content, for a stretch that can be close to 10 real seconds. `agentEventTransport.ts`'s `ingest()` flipped a tool part's `state` to `'done'` purely from the chat-channel `agent_tool_call` frame's own `status` field, with zero coupling to whether the corresponding CRDT `doc_update` had actually reached and been projected onto the canvas. ## After `createAgentEventTransport` now takes an optional `shouldAwaitCanvasSync` gate. While it returns `true`, a tool call that reports done holds its part's displayed `state` at `'streaming'` instead of flipping straight to `'done'`, until either `notifyCanvasCaughtUp()` is called or `STALE_AFTER_MS` (30s) elapses. `agentConversationStore.ts` threads this gate through every transport it creates; `AgentPanelRoot.vue` wires it to the CRDT follower's own catch-up signal. ## How (backport-specific) Cherry-picked squash-merge commit `fce6d77e36b3f3ec7c00ce405c56628eabc55a12`. The automated backport failed with conflicts in the 5 files it named; each is resolved and explained in the commit message. Two notable adaptations for `core/1.54`'s older code shape: - `useAgentCrdtFollower.ts` / `layoutFollowerBridge.ts`: the fix's `appliedLive` outcome counter needs to distinguish a live doc update from a subscribe's one-time catch-up frame. `core/1.54`'s `LayoutFollowerBridge` already computed that distinction internally but never exposed it — added a small, additive `ClassifiedDocUpdate` type (mirroring `main`'s own pre-existing mechanism) to expose it on the already-dispatched `doc_update` event. - The PR's own new Playwright spec (`agentCanvasLagsToolCallCompletion.spec.ts`) referenced a module path, an i18n key, and a `HostDoc` method that only exist on `main`'s newer code shape. Repointed to `core/1.54`'s current equivalents (`@/schemas/apiSchema`, `agent.askComfyAgent`) and added the missing `HostDoc.graph()` method to the shared test harness, mirroring `main` exactly. ## Verification `pnpm typecheck`, `pnpm typecheck:browser`, `pnpm eslint`, `pnpm exec oxfmt` all clean. Targeted `pnpm vitest run` across the touched agent test suites: all green except 3 pre-existing "Media-card" upload failures, confirmed identical on unmodified `origin/core/1.54` (a documented pre-existing gap from an earlier backport). --- _Generated by [Claude Code](https://claude.ai/code/session_01NQDb2pk4BuLEgzkga3GhEs)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
…s materialization (PM-1575/PM-1576) (#18593) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1790054937773959?thread_ts=1790054937.773959&cid=C0BGH348Z0C)_ ## Before An agent tool call that touches the canvas (e.g. adding a node) reports done — the tool's own row flips straight to its settled icon — while the canvas itself still shows nothing for the new content, for a stretch that can run close to 10 real seconds. `agentEventTransport.ts`'s `ingest()` flipped a tool part's `state` to `'done'` purely from the chat-channel `agent_tool_call` frame's own `status` field, with zero coupling to whether the corresponding CRDT `doc_update` had actually reached and been projected onto the canvas. ## After `createAgentEventTransport` now takes an optional `shouldAwaitCanvasSync` gate. While it returns `true`, a tool call that reports done holds its part's displayed `state` at `'streaming'` instead of flipping straight to `'done'`, until either `notifyCanvasCaughtUp()` is called or `STALE_AFTER_MS` (30s) elapses. `agentConversationStore.ts` threads this gate through every transport it creates and exposes `setCanvasSyncGate` / `notifyCanvasCaughtUp`; `AgentPanelRoot.vue` wires the gate to `agentPanelStore.enabled` and calls `notifyCanvasCaughtUp()` whenever the CRDT follower's `outcomes.appliedLive` counter increases for the bound workflow. The gate defaults to always-`false`, so any caller that never wires it up keeps the old immediate-done behavior unchanged. ## How Cherry-picked #18391's merge commit onto `cloud/1.54` (stacked on #18586, which backports the JSON fixture corpus this PR's new regression test reads off disk). `cloud/1.54` has diverged architecturally from `main` in this area since PM-1355/#18179: `useAgentCrdtFollower.ts` inlines outcome tracking in its `onUpdate` handler instead of the `incrementOutcome`/`applyAndReconcile` helpers #18391 was written against, so the two real conflicts there were resolved by porting #18391's actual upstream diff (the `appliedLive`/`!update.catchUp` classification) into `cloud/1.54`'s current handler rather than reintroducing stale helper functions. Three follow-up fixes for other main-only references that only surfaced once the build/tests ran (not as git conflicts): `STALE_AFTER_MS` now imports from `useAgentCrdtFollower.ts` (its current home on this branch, not the `agentCrdtDocLifecycle.ts` split that hasn't landed here), and the new e2e spec's `UserDataFullInfo` import, open-agent button i18n key, and `HostDoc` node-presence check were pointed at their current cloud/1.54 equivalents. `pnpm lint`, `pnpm typecheck`, `pnpm typecheck:browser`, and the full targeted unit suite (`agentEventTransport.test.ts`, `agentConversationStore.test.ts`, `useAgentCrdtFollower.test.ts` — 155/155) all pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01NQDb2pk4BuLEgzkga3GhEs --- _Generated by [Claude Code](https://claude.ai/code/session_01NQDb2pk4BuLEgzkga3GhEs)_ --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
…sion test (#18391 follow-up) (#18602) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1790054937773959?thread_ts=1790054937.773959&cid=C0BGH348Z0C)_ ## Before #18595 backported #18391's PM-1575 gate-wiring fix to `core/1.54`, but its new regression test `'settles a mutating tool call immediately when no CRDT doc subscription is connected'` asserted on the "Working..." composing status text. That text is rendered by `AgentMessage.vue`'s `composing`/`status` computed on `main` — code that doesn't exist on `core/1.54` (it was added by a separate, still-unbackported PR, #17339). #18595 merged with this one test still red on `core/1.54`. ## After The PM-1575 fix itself is correct and unaffected by this; only this one assertion's observation point doesn't exist on this branch. Retargeted it to check what `core/1.54` actually shows once the tool call settles: `ToolCallGroup.vue`'s own row flips from its spinner to the "Ran N tool call(s)" label (`agent.ranToolCalls`) — the same UI this backport's Playwright spec already asserts on with a `/^Ran/` matcher. ## How 3-line change in `src/workbench/extensions/agent/AgentPanelRoot.test.ts`: swapped `screen.findByText(i18n.global.t('agent.working'))` for `screen.findByRole('button', { name: /^Ran/ })`, and updated the adjacent comment. Verified: `pnpm vitest run AgentPanelRoot.test.ts` — 227 passed, 3 failed (the same pre-existing, unrelated "Media-card" upload flakes documented in #18595, confirmed identical on unmodified `core/1.54`). `pnpm exec oxfmt --check` and `pnpm eslint` on the file: clean. --- _Generated by [Claude Code](https://claude.ai/code/session_01NQDb2pk4BuLEgzkga3GhEs)_ Co-authored-by: Claude <noreply@anthropic.com>
…xtures (#18586) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1790054937773959?thread_ts=1790054937.773959&cid=C0BGH348Z0C)_ ## Before `cloud/1.54` has no `browser_tests/fixtures/data/agent/conversations/` directory at all. #18391's backport adds a regression test (`agentEventTransport CANVAS_MUTATING_TOOLS pinning (PM-1575)`) that does a bare `fs.readdirSync` + `JSON.parse` over that directory to pin every tool name seen in the recorded conversation corpus — with the directory missing, that test fails with `ENOENT`. ## After The 16 pure JSON fixture files from the BE-11470 work land at the same paths: the 13 recorded conversations from #16764, plus 2 more conversations and 1 seed workflow from #17416. Zero code. ## How Deliberately narrow: this pulls *only* the JSON data files via `git checkout <sha> -- <path>` from the original commits, not the harness/loader/host-doc/capability-matrix code those PRs also added. `cloud/1.54` already has its own independently-evolved replay and fake-host-doc test infrastructure (used by several other e2e specs), and re-introducing main's older version of that harness would conflict with it and risk regressing those specs. The one thing that's actually needed here — the new pinning test from #18391 — only reads these files off disk directly, so the fixture data alone fully unblocks it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01NQDb2pk4BuLEgzkga3GhEs --- _Generated by [Claude Code](https://claude.ai/code/session_01NQDb2pk4BuLEgzkga3GhEs)_ --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
…tures (#18585) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1790054937773959?thread_ts=1790054937.773959&cid=C0BGH348Z0C)_ ## Before `core/1.54` has no recorded agent-conversation fixture corpus at all. A `needs-backport` label re-run of PR #18391's backport failed with `ENOENT` on `browser_tests/fixtures/data/agent/conversations` — one of #18391's own new unit tests (`agentEventTransport CANVAS_MUTATING_TOOLS pinning (PM-1575)`) walks that directory's JSON fixtures directly to guard against a newly-added, unreviewed agent tool name silently defaulting to "not canvas-mutating." ## After Backports the 14 recorded conversation JSON fixtures plus the derived empty-workflow seed fixture from `#16764` and `#17416` (BE-11470) to `core/1.54`, unblocking that test. Every file is byte-identical to its copy on `main` (verified with `diff` against `origin/main`). This is a deliberately data-only backport. It leaves out: - the fixture loader (`agentConversation.ts` / `.test.ts`) - the Playwright replay harness (`agentConversationFixture.ts`, `agentConversationHostDoc.ts`, `agentConversationReplay.spec.ts`, capability-matrix files) - refactors to 3 shared mock helpers (`CloudWorkspaceMockHelper.ts`, `agentPanelMocks.ts`, `cloudBootMocks.ts`) that #16764 also touched - a small production repaint fix (`useAgentCrdtFollower.ts`/`agentNodeMaterializer.ts`) bundled into #16764 None of that is needed for what actually requires this corpus on `core/1.54` right now, and the mock-helper refactors carry real conflict risk against this branch's independently-drifted test infra. It can be extended with the loader/harness in a follow-up if `core/1.54` ever needs the full E2E replay spec. ## How `git show origin/main:<path> > <path>` for each of the 13 files, into the same paths `main` uses. No other files touched. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01NQDb2pk4BuLEgzkga3GhEs --- _Generated by [Claude Code](https://claude.ai/code/session_01NQDb2pk4BuLEgzkga3GhEs)_ Co-authored-by: Claude <noreply@anthropic.com>
## Summary Backports six merged `main` Agent fixes to `cloud/1.54` and repairs the `agentCanvasLagsToolCallCompletion` e2e spec that #18586 landed with, which fails `typecheck:browser` on the current branch tip. ## Changes - **What**: `cherry-pick -x` of #17568, #17628, #16491, #18453, #17767 and #18603, in `main` merge order. The spec fix uses `entryButton` and the "Worked for" summary instead of the labels #18622 removed, and adds `HostDoc.graph()` to the conversation host-doc fixture. #18391 itself is already on the line via #18586 and is unchanged here. - **Excluded**: #18066 (Christian's request), #16908 (refactor), #18375 (needs its `src/lib/litegraph/` half). ## Review Focus - #18603 forwards two new onboarding telemetry events for every user, not only Agent users. - `AgentPanelRoot.vue` changes come from #16491 and #17767 on top of #18391's merged code; `useAgentCrdtFollower.ts` is identical to the tip. - Merging the tip resolved two conflicts: the spec (this copy) and `AgentPanelRoot.test.ts` (the tip's #18391 test plus these picks). - Second batch (#16856, #18204, #18229, #17327, #18251, #16985, #18224) follows on this tip. Linear: [PM-1656](https://linear.app/comfyorg/issue/PM-1656) ## Screenshots (if applicable) No new visuals; #17568 and #17767 were reviewed on `main`. --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Maanil Verma <vermaMaanil97@gmail.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org> Co-authored-by: Alexander Brown <drjkl@comfy.org>
## 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>
) ## Summary Show the agent's answer while the model writes it, instead of a finished render sitting under "Working…" for the whole reply round (prod p50 5.8 s, p90 14.3 s) and the answer landing at once. ## Changes - **What**: The transport renders the new `agent_message_draft` event (Comfy-Org/cloud#10351) as the reply: a streaming text part whose text each draft *replaces*. The draft ends the `composing` spinner, since a streaming part isn't settled. It is dropped when the round reaches a tool call (the draft was narration), when the final `agent_message_delta` arrives (the answer takes its place rather than appending), when an empty draft withdraws it, and when the turn settles — so a provisional answer is never left behind. - `agentApiSchema`: `agent_message_draft` joins the event union and `AGENT_WS_EVENT_TYPES`. ## Review Focus - **`agent_thinking` deliberately does not drop the draft.** The backend sends each round's reasoning as `agent_thinking` *after* the round, final round included. Dropping on it would make every answer vanish and reappear. Narration is identified instead by the tool call that follows it. Pinned by *keeps the answer on screen through the reasoning frame that precedes it*. - **Order is safe.** The backend publishes drafts synchronously inside the model call, so they always precede the narration and final answer that supersede them, even when those come from another replica. - **Rollout is independent.** Today's client drops unknown types in `useAgentSession`, so the backend ships first; this makes drafts visible. Red → green: `c695a8dd1e` (schema + tests; the transport ignores drafts, 4 fail) → `0e5c78a727`. `c137ae15f4` adds `ws-turn-reply-drafts.jsonl`: 30 real frames recorded on cloud#10351's preview environment (one narration round, then the resumed `wait_for_job` and 18 drafts), replayed through the transport. The reply streams with the narration draft already gone, and the turn settles on the final answer alone. On that environment the answer started 1.6 s after the render instead of 6.0 s. Rebased onto `main`. Comfy-Org#18391 split the transport's `ingest` into per-event handlers, so the draft handling now lives in those handlers (a `agent_message_draft` case, and `dropDraft()` in the tool-call, run-approval and delta paths) and this PR's own ingest refactor was dropped. Agent suite 132 files / 2,154 tests, `pnpm typecheck`, eslint, oxfmt, knip: clean. ## E2E coverage `browser_tests/tests/agent/agentReplyDrafts.spec.ts` (`4afb6f653f`) drives the panel over a routed `/ws`: - *the answer appears while the model writes it, and the final answer replaces it*: after a settled `wait_for_job`, a draft replaces "Working…", each draft replaces the last, and the delivered answer takes the draft's place so the reply reads once. - *a run-approval card takes the draft's place*: the regression the `fix:` commit covers. A draft, then `agent_thinking`, then a `run_approval` ask leaves the card visible and the draft gone. `76d6956635` adds the draft slot to `zRecordedWsEvent`, which reads the production union by position. - BE-16926
|
|
|
|
## Summary Show the agent's answer while the model writes it, instead of a finished render sitting under "Working…" for the whole reply round (prod p50 5.8 s, p90 14.3 s) and the answer landing at once. ## Changes - **What**: The transport renders the new `agent_message_draft` event (Comfy-Org/cloud#10351) as the reply: a streaming text part whose text each draft *replaces*. The draft ends the `composing` spinner, since a streaming part isn't settled. It is dropped when the round reaches a tool call (the draft was narration), when the final `agent_message_delta` arrives (the answer takes its place rather than appending), when an empty draft withdraws it, and when the turn settles — so a provisional answer is never left behind. - `agentApiSchema`: `agent_message_draft` joins the event union and `AGENT_WS_EVENT_TYPES`. ## Review Focus - **`agent_thinking` deliberately does not drop the draft.** The backend sends each round's reasoning as `agent_thinking` *after* the round, final round included. Dropping on it would make every answer vanish and reappear. Narration is identified instead by the tool call that follows it. Pinned by *keeps the answer on screen through the reasoning frame that precedes it*. - **Order is safe.** The backend publishes drafts synchronously inside the model call, so they always precede the narration and final answer that supersede them, even when those come from another replica. - **Rollout is independent.** Today's client drops unknown types in `useAgentSession`, so the backend ships first; this makes drafts visible. Red → green: `c695a8dd1e` (schema + tests; the transport ignores drafts, 4 fail) → `0e5c78a727`. `c137ae15f4` adds `ws-turn-reply-drafts.jsonl`: 30 real frames recorded on cloud#10351's preview environment (one narration round, then the resumed `wait_for_job` and 18 drafts), replayed through the transport. The reply streams with the narration draft already gone, and the turn settles on the final answer alone. On that environment the answer started 1.6 s after the render instead of 6.0 s. Rebased onto `main`. #18391 split the transport's `ingest` into per-event handlers, so the draft handling now lives in those handlers (a `agent_message_draft` case, and `dropDraft()` in the tool-call, run-approval and delta paths) and this PR's own ingest refactor was dropped. Agent suite 132 files / 2,154 tests, `pnpm typecheck`, eslint, oxfmt, knip: clean. ## E2E coverage `browser_tests/tests/agent/agentReplyDrafts.spec.ts` (`4afb6f653f`) drives the panel over a routed `/ws`: - *the answer appears while the model writes it, and the final answer replaces it*: after a settled `wait_for_job`, a draft replaces "Working…", each draft replaces the last, and the delivered answer takes the draft's place so the reply reads once. - *a run-approval card takes the draft's place*: the regression the `fix:` commit covers. A draft, then `agent_thinking`, then a `run_approval` ask leaves the card visible and the draft gone. `76d6956635` adds the draft slot to `zRecordedWsEvent`, which reads the production union by position. - BE-16926 (cherry picked from commit 8a29de5)
Requested by Christian Byrne · Slack thread
Summary
Fixes PM-1575/PM-1576: the agent's chat-side tool-call-completion affordance ("done" spinner, "Worked for Xs" summary) settled well before the resulting graph change actually rendered on canvas, with nothing in the UI indicating the canvas hadn't caught up. This PR now contains both the failing repro test (red) and the minimal client-side fix (green).
Changes
Before (bug): an agent tool call that touches the canvas (e.g. adding a node) reports done — the tool's own row flips straight to its settled icon — while the canvas itself still shows nothing for the new content, for a stretch that (per the stagingcloud report) is close to 10 real seconds.
agentEventTransport.ts'singest()flipped a tool part'sstateto'done'purely from the chat-channelagent_tool_callframe's ownstatusfield, with zero coupling to whether the corresponding CRDTdoc_updatehad actually reached and been projected onto the canvas (useAgentCrdtFollower.ts/LayoutFollowerBridge) — two structurally disjoint listeners, never consulting each other.After (fixed):
createAgentEventTransportnow takes an optionalshouldAwaitCanvasSyncgate. While it returnstrue, a tool call that reports done holds its part's displayedstateat'streaming'(the same spinner glyph it showed while running) instead of flipping straight to'done', until eithernotifyCanvasCaughtUp()is called orSTALE_AFTER_MS(30s) elapses — reusing the CRDT follower's own passive-heartbeat bound (agentCrdtDocLifecycle.ts) rather than inventing a new magic number. The gate defaults to always-false, so any caller that never wires it up (including every pre-existing unit test) keeps the old immediate-done behavior unchanged.agentConversationStore.tsthreads this gate through to every transport it creates and exposessetCanvasSyncGate/notifyCanvasCaughtUpso a host can register the gate and forward catch-up signals to the active turn and any stashed background ones.AgentPanelRoot.vuewires the gate toagentPanelStore.enabled(the same flag that gates the CRDT follower itself) and callsnotifyCanvasCaughtUp()wheneveruseAgentCrdtFollower'soutcomes.appliedcounter increases for the bound workflow — i.e. the moment a fresh doc update actually lands.Relationship to PM-1355 (
#18179,agentCanvasBlanksDuringRunTurn.spec.ts): this mirrors that fix's shape (a bounded catch-up-confirmation signal) rather than reusing its primitive directly. PM-1355'sAgentCrdtDocLifecycle/SUBSCRIBE_CATCHUP_GRACE_MSanswers "is THIS subscribe's own catch-up frame overdue" — a question scoped to one resubscribe. This bug needed a different question answered: "has some later doc update landed since this tool call reported done", which lives one level up, at the chat-transport/composable boundary rather than inside the subscribe lifecycle. Both do reuse the sameSTALE_AFTER_MSbound as their fallback timeout, per the design guidance, rather than adding a second magic number.Out of scope: the actual backend ~10s doc-broadcast propagation delay itself is not addressed here — this fix only makes the client accurately reflect canvas state instead of eliminating the underlying lag. Root-causing that lag is still open (see the file-header RCA in the spec).
Test Plan
browser_tests/tests/agent/agentCanvasLagsToolCallCompletion.spec.ts's first test (previouslytest.fail()) now asserts the fix directly: after theadd_nodetool call reportssuccess, its row (expanded from the "Worked for Xs" summary) stays on the spinner glyph — not the settled one — while the canvas still has zero nodes; once the delayeddoc_updatelands, the row flips to done in the same moment the node appears.doc_updatearrives) is unchanged and still passes.eslint,vue-tsc --noEmit, andplaywright test --list(both tests listed and named correctly) all pass. Every existing agent-suite unit test (125 files, ~1956 tests) still passes unchanged, since the new gate defaults to off unless a caller opts in.Screenshots (if applicable)
N/A — this is a Playwright spec + client-side logic change; no visual/UI screenshot to attach.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VR48ZgDstU3S7MKeC1q3bH
Generated by Claude Code