Repository navigation
test: reproduce widget value loss from an unguarded CRDT resync - #18089
Conversation
applyWidgetValues/setWidgetValue in graphMutations.ts overwrite a widget's stored value from the doc payload unconditionally, both on a full reconcile and on a plain per-widget setWidget op. There is no per-field check for whether the live value is locally newer, so a value the user is actively typing gets stomped whenever an unrelated doc frame happens to touch that widget's entry. - Two Vitest cases on graphMutations.ts prove the overwrite directly, through both the reconcile path and the plain setWidget path. - A Playwright e2e case replays a real agent run that creates a prompt node and sets its text, then types into that same widget via real per-keystroke dispatch while a doc frame resyncs it mid-edit.
|
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: ✅ 2132 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 10 MB gzip ⚪ 0 BDetailsSummary
Category Glance App Entry Points — 3.77 kB (baseline 3.77 kB) • ⚪ 0 BMain entry bundles and manifests Status: 1 unchanged Graph Workspace — 1.45 MB (baseline 1.45 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration Status: 3 unchanged Views & Navigation — 134 kB (baseline 134 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces Status: 18 unchanged Panels & Settings — 639 kB (baseline 639 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens Status: 28 unchanged User & Accounts — 39.4 kB (baseline 39.4 kB) • ⚪ 0 BAuthentication, profile, and account management bundles Status: 11 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors Status: 8 unchanged UI Components — 125 kB (baseline 125 kB) • ⚪ 0 BReusable component library chunks Status: 16 unchanged Data & Services — 3.97 MB (baseline 3.97 MB) • ⚪ 0 BStores, services, APIs, and repositories Status: 16 unchanged Utilities & Hooks — 576 kB (baseline 576 kB) • ⚪ 0 BHelpers, composables, and utility bundles Status: 36 unchanged Vendor & Third-Party — 17.4 MB (baseline 17.4 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 17.9 MB (baseline 17.9 MB) • ⚪ 0 BBundles that do not match a named category Status: 301 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-25T01:10:14.707Z",
"gitSha": "581c204f218f963fb7616a7dc7a3faa2c373b42c",
"branch": "test/agent-widget-typing-reconcile",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2009.3499999999835,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.084999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 312.42499999999995,
"heapDeltaBytes": 9402368,
"heapUsedBytes": 71786188,
"domNodes": -228,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 5.982000000000001,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 1994.3559999999252,
"styleRecalcs": 11,
"styleRecalcDurationMs": 2.354,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 276.494,
"heapDeltaBytes": -1201096,
"heapUsedBytes": 61310888,
"domNodes": 0,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 6.333,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1695.0740000000337,
"styleRecalcs": 71,
"styleRecalcDurationMs": 11.286,
"layouts": 12,
"layoutDurationMs": 2.8339999999999996,
"taskDurationMs": 543.8259999999999,
"heapDeltaBytes": 10467872,
"heapUsedBytes": 72786364,
"domNodes": -228,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 93.789,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1695.6480000000056,
"styleRecalcs": 71,
"styleRecalcDurationMs": 11.068000000000001,
"layouts": 12,
"layoutDurationMs": 3.0759999999999996,
"taskDurationMs": 549.954,
"heapDeltaBytes": -3093956,
"heapUsedBytes": 59244208,
"domNodes": -228,
"jsHeapTotalBytes": 6283264,
"scriptDurationMs": 93.96099999999998,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1700.918999999999,
"styleRecalcs": 30,
"styleRecalcDurationMs": 8.408999999999999,
"layouts": 6,
"layoutDurationMs": 1.345,
"taskDurationMs": 249.426,
"heapDeltaBytes": 2582944,
"heapUsedBytes": 70001496,
"domNodes": 53,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 10.161999999999999,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1694.2639999999756,
"styleRecalcs": 30,
"styleRecalcDurationMs": 7.1129999999999995,
"layouts": 6,
"layoutDurationMs": 1.1509999999999998,
"taskDurationMs": 227.611,
"heapDeltaBytes": 2443504,
"heapUsedBytes": 64629848,
"domNodes": 53,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 8.465999999999998,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 508.94299999998793,
"styleRecalcs": 14,
"styleRecalcDurationMs": 2.324,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 307.601,
"heapDeltaBytes": 18376652,
"heapUsedBytes": 80337832,
"domNodes": 0,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 109.971,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 448.98000000000593,
"styleRecalcs": 14,
"styleRecalcDurationMs": 2.3560000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 298.79,
"heapDeltaBytes": 18196772,
"heapUsedBytes": 80563592,
"domNodes": 0,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 106.74300000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1020.9600000000023,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 671.0699999999999,
"heapDeltaBytes": -14054380,
"heapUsedBytes": 73581632,
"domNodes": -259,
"jsHeapTotalBytes": 21102592,
"scriptDurationMs": 37.767999999999994,
"eventListeners": -207,
"totalBlockingTimeMs": 372,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1052.6350000000093,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 695.376,
"heapDeltaBytes": -15838872,
"heapUsedBytes": 72327920,
"domNodes": -259,
"jsHeapTotalBytes": 21364736,
"scriptDurationMs": 45.272999999999996,
"eventListeners": -207,
"totalBlockingTimeMs": 415,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 697.5219999999922,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 290.2739999999997,
"heapDeltaBytes": 14417080,
"heapUsedBytes": 91231064,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 91.53100000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 101,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 700.1520000000028,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 276.8700000000002,
"heapDeltaBytes": 14398756,
"heapUsedBytes": 90471244,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 83.81,
"eventListeners": 0,
"totalBlockingTimeMs": 95,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-clean-combined-draw",
"durationMs": 5738.517999999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5098.256,
"heapDeltaBytes": 22347900,
"heapUsedBytes": 99469908,
"domNodes": -228,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 3951.281,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 33.29999999999927
},
{
"name": "extension-clean-combined-draw",
"durationMs": 5552.0649999999705,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.2149999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4844.946,
"heapDeltaBytes": 11217960,
"heapUsedBytes": 93792420,
"domNodes": 0,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 3898.751,
"eventListeners": 0,
"totalBlockingTimeMs": 28,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 5688.941,
"styleRecalcs": 2,
"styleRecalcDurationMs": 0.3809999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5133.631,
"heapDeltaBytes": -13111248,
"heapUsedBytes": 69235804,
"domNodes": 0,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 3932.888,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 5443.396000000007,
"styleRecalcs": 2,
"styleRecalcDurationMs": 0.6269999999999991,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4859.789,
"heapDeltaBytes": 12323640,
"heapUsedBytes": 90131368,
"domNodes": -228,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 3746.257,
"eventListeners": -164,
"totalBlockingTimeMs": 2,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2009.0730000000008,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.131000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 440.47200000000004,
"heapDeltaBytes": -11871272,
"heapUsedBytes": 69764044,
"domNodes": -228,
"jsHeapTotalBytes": -495616,
"scriptDurationMs": 31.163000000000004,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2010.6339999999818,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.319999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 421.18100000000004,
"heapDeltaBytes": -6897796,
"heapUsedBytes": 74809292,
"domNodes": -228,
"jsHeapTotalBytes": -757760,
"scriptDurationMs": 25.615,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2095.1319999999782,
"styleRecalcs": 68,
"styleRecalcDurationMs": 8.030000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1093.459,
"heapDeltaBytes": 15828500,
"heapUsedBytes": 79856064,
"domNodes": -228,
"jsHeapTotalBytes": 1011712,
"scriptDurationMs": 526.134,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2116.002999999978,
"styleRecalcs": 70,
"styleRecalcDurationMs": 7.263000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1061.919,
"heapDeltaBytes": -21055972,
"heapUsedBytes": 65512972,
"domNodes": -228,
"jsHeapTotalBytes": 4485120,
"scriptDurationMs": 494.742,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3080.8980000000474,
"styleRecalcs": 67,
"styleRecalcDurationMs": 8.841000000000001,
"layouts": 60,
"layoutDurationMs": 10.503,
"taskDurationMs": 1121.826,
"heapDeltaBytes": 7603712,
"heapUsedBytes": 91524700,
"domNodes": 0,
"jsHeapTotalBytes": 5017600,
"scriptDurationMs": 476.739,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3139.8790000000645,
"styleRecalcs": 67,
"styleRecalcDurationMs": 9.707,
"layouts": 60,
"layoutDurationMs": 11.411,
"taskDurationMs": 1184.711,
"heapDeltaBytes": -15385452,
"heapUsedBytes": 68565856,
"domNodes": -228,
"jsHeapTotalBytes": 4485120,
"scriptDurationMs": 489.32300000000004,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2131.5199999999663,
"styleRecalcs": 45,
"styleRecalcDurationMs": 4.110000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1235.618,
"heapDeltaBytes": 14576916,
"heapUsedBytes": 82470920,
"domNodes": 0,
"jsHeapTotalBytes": 679936,
"scriptDurationMs": 596.813,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "legacy-node-drag",
"durationMs": 2112.5990000000456,
"styleRecalcs": 48,
"styleRecalcDurationMs": 4.783,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1246.0359999999998,
"heapDeltaBytes": 13605408,
"heapUsedBytes": 99281116,
"domNodes": 0,
"jsHeapTotalBytes": 5697536,
"scriptDurationMs": 588.3159999999999,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2036.518000000001,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.440999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 442.94,
"heapDeltaBytes": -8662584,
"heapUsedBytes": 73718596,
"domNodes": -228,
"jsHeapTotalBytes": -1282048,
"scriptDurationMs": 32.669,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2016.381000000024,
"styleRecalcs": 9,
"styleRecalcDurationMs": 1.9269999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 414.918,
"heapDeltaBytes": -13716236,
"heapUsedBytes": 75225256,
"domNodes": -228,
"jsHeapTotalBytes": 4222976,
"scriptDurationMs": 24.061,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 430.8800000000019,
"styleRecalcs": 47,
"styleRecalcDurationMs": 3.979999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 264.297,
"heapDeltaBytes": 13678784,
"heapUsedBytes": 76573600,
"domNodes": 0,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 90.06599999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 429.89299999999275,
"styleRecalcs": 49,
"styleRecalcDurationMs": 4.050999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 265.098,
"heapDeltaBytes": 12998688,
"heapUsedBytes": 76727708,
"domNodes": 0,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 91.685,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-idle",
"durationMs": 2020.0790000000097,
"styleRecalcs": 13,
"styleRecalcDurationMs": 3.1459999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 335.471,
"heapDeltaBytes": -4748572,
"heapUsedBytes": 58792092,
"domNodes": -244,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 6.227,
"eventListeners": -210,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 1990.784000000076,
"styleRecalcs": 13,
"styleRecalcDurationMs": 2.593,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 318.90200000000004,
"heapDeltaBytes": 14844500,
"heapUsedBytes": 78312728,
"domNodes": -244,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 5.692999999999999,
"eventListeners": -188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1696.0069999999519,
"styleRecalcs": 75,
"styleRecalcDurationMs": 13.299999999999997,
"layouts": 16,
"layoutDurationMs": 4.166,
"taskDurationMs": 553.4449999999999,
"heapDeltaBytes": 11378008,
"heapUsedBytes": 74471944,
"domNodes": -244,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 71.858,
"eventListeners": -188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1679.7409999999218,
"styleRecalcs": 75,
"styleRecalcDurationMs": 11.449000000000003,
"layouts": 16,
"layoutDurationMs": 3.6790000000000003,
"taskDurationMs": 535.8810000000001,
"heapDeltaBytes": -2605236,
"heapUsedBytes": 60696376,
"domNodes": -244,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 62.904,
"eventListeners": -210,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 815.5339999999569,
"styleRecalcs": 19,
"styleRecalcDurationMs": 18.708999999999996,
"layouts": 5,
"layoutDurationMs": 7.494000000000001,
"taskDurationMs": 569.2850000000001,
"heapDeltaBytes": 19794552,
"heapUsedBytes": 99995100,
"domNodes": 13667,
"jsHeapTotalBytes": 10485760,
"scriptDurationMs": 18.615,
"eventListeners": 2383,
"totalBlockingTimeMs": 89,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8124.375999999984,
"styleRecalcs": 250,
"styleRecalcDurationMs": 21.905,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3697.1620000000003,
"heapDeltaBytes": -16016964,
"heapUsedBytes": 65894748,
"domNodes": -228,
"jsHeapTotalBytes": 815104,
"scriptDurationMs": 1672.2050000000002,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8106.209999999919,
"styleRecalcs": 250,
"styleRecalcDurationMs": 22.422,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3645.9320000000002,
"heapDeltaBytes": 1555780,
"heapUsedBytes": 81243220,
"domNodes": -228,
"jsHeapTotalBytes": 5459968,
"scriptDurationMs": 1638.194,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 11185.023999999998,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10275.501999999999,
"heapDeltaBytes": -30124672,
"heapUsedBytes": 190889612,
"domNodes": -8049,
"jsHeapTotalBytes": -15536128,
"scriptDurationMs": 162.094,
"eventListeners": -14923,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 10369.397000000048,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9331.984999999999,
"heapDeltaBytes": -27111260,
"heapUsedBytes": 185168132,
"domNodes": -8049,
"jsHeapTotalBytes": -10993664,
"scriptDurationMs": 132.48399999999998,
"eventListeners": -14923,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 13288.958999999977,
"styleRecalcs": 66,
"styleRecalcDurationMs": 13.214999999999977,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12563.107000000002,
"heapDeltaBytes": -34847344,
"heapUsedBytes": 177957952,
"domNodes": -8049,
"jsHeapTotalBytes": -17547264,
"scriptDurationMs": 665.509,
"eventListeners": -14923,
"totalBlockingTimeMs": 39,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 13152.894999999944,
"styleRecalcs": 66,
"styleRecalcDurationMs": 13.147999999999993,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12525.688,
"heapDeltaBytes": -57418908,
"heapUsedBytes": 176597128,
"domNodes": -8049,
"jsHeapTotalBytes": -6828032,
"scriptDurationMs": 588.505,
"eventListeners": -14923,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-node-resize-workload",
"durationMs": 3699.8099999999567,
"styleRecalcs": 20,
"styleRecalcDurationMs": 51.071000000000005,
"layouts": 20,
"layoutDurationMs": 20.482999999999986,
"taskDurationMs": 3549.4000000000005,
"heapDeltaBytes": -40677188,
"heapUsedBytes": 184712600,
"domNodes": -8049,
"jsHeapTotalBytes": 17555456,
"scriptDurationMs": 53.763,
"eventListeners": -14922,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 3966.3610000000062,
"styleRecalcs": 20,
"styleRecalcDurationMs": 54.422,
"layouts": 20,
"layoutDurationMs": 22.062000000000005,
"taskDurationMs": 3785.9999999999995,
"heapDeltaBytes": -38751828,
"heapUsedBytes": 183006128,
"domNodes": -8049,
"jsHeapTotalBytes": 14057472,
"scriptDurationMs": 61.469,
"eventListeners": -14923,
"totalBlockingTimeMs": 69,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-zoom-out-idle",
"durationMs": 5149.379999999951,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4582.219999999999,
"heapDeltaBytes": 2981248,
"heapUsedBytes": 166363148,
"domNodes": 0,
"jsHeapTotalBytes": -24117248,
"scriptDurationMs": 58.64900000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-zoom-out-idle",
"durationMs": 5540.364000000068,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5090.187999999999,
"heapDeltaBytes": 446756,
"heapUsedBytes": 172659000,
"domNodes": 0,
"jsHeapTotalBytes": -37224448,
"scriptDurationMs": 72.438,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "workflow-execution",
"durationMs": 442.3499999999194,
"styleRecalcs": 16,
"styleRecalcDurationMs": 12.499,
"layouts": 4,
"layoutDurationMs": 1.6219999999999997,
"taskDurationMs": 93.90899999999999,
"heapDeltaBytes": 4851232,
"heapUsedBytes": 66997588,
"domNodes": 102,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 9.046000000000001,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "workflow-execution",
"durationMs": 99.65599999998176,
"styleRecalcs": 6,
"styleRecalcDurationMs": 11.01,
"layouts": 3,
"layoutDurationMs": 1.7140000000000002,
"taskDurationMs": 69.663,
"heapDeltaBytes": 3095772,
"heapUsedBytes": 65032036,
"domNodes": 119,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 5.647000000000001,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🌾 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 65a05b85ffbaa7c502ecc6de79412b4eae045a47
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 |
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 #18089 +/- ##
==========================================
+ Coverage 83.85% 84.83% +0.97%
==========================================
Files 3052 2302 -750
Lines 151001 132119 -18882
Branches 39097 36510 -2587
==========================================
- Hits 126622 112082 -14540
+ Misses 22965 19737 -3228
+ Partials 1414 300 -1114
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Reviewed alongside #18079/#18081, which were grouped with this one as the "PM-1155 family" batch. Flagging a mismatch before going further: this PR is not part of that family. PM-1155/PM-982/PM-1156/PM-1176/PM-1339 are all about a node's That defect already has its own ticket and RCA: PM-1192 ("editing a CLIP Text Encode prompt right after the agent finishes glitches and drops keystrokes"), RCA'd 2026-09-19, no PR yet as of that RCA. This PR's own root-cause writeup independently arrives at the same mechanism ( On the PR itself: repro-only ( No changes pushed here — the repro looks correct as written; the fix (a focus guard or per-field "local edit is newer" check in 🤖 Generated with Claude Code |
|
Update on the Ruled out: these are not artifact-upload/infra failures. The failing step in both jobs is the actual test-execution step ( Local repro attempts (inconclusive): I ran the new spec locally 4x against a real ComfyUI backend (port 8188) + Vite dev server (
Bottom line: I cannot conclusively say whether CI's |
Firing resyncWidget synchronously right after starting pressSequentially raced the very start of typing: the resync's store round trip could land before any keystroke did, so the widget reset to its pre-typing value and every keystroke landed cleanly afterward, letting the full string through. Typing a short first chunk and awaiting it before firing resyncWidget means the doc frame captures a partially-typed value and its overwrite now has to compete with keystrokes still in flight, which reliably reproduces the dropped-character defect.
|
Follow-up, resolving the open question from my last comment. Root cause of the CI failure found, and fixed. A subsequent local run (with a healthy backend) reached the test's actual race assertion and reported "Expected to fail, but passed" — the full typed string survived intact. That's the same The reason: Fix (pushed in Verified locally against a real ComfyUI backend + built frontend ( (" at s" is exactly what the resync's overwrite drops, then the remaining keystrokes continue typing on top of the truncated base — precisely the mechanism the RCA and the Vitest tests describe.) |
Restate the context as a contract gap (agent writes bypass the live widget's value accessor, callback, and onWidgetChanged) with Custom Combo and PrimitiveNode as concrete beneficiaries; the ring on core static combos is mechanism A plus stale defs, not this ADR. Gate effects on the applied store value with structural equality for objects (identity is defeated by the follower's clone and loops through a normalizing callback's mint echo); shape the shared write helper so the #18089 recency guard reports applied: false; require store ownership of the resolved live node so a replaced or deleted node's orphan never receives its successor's value; define placeholder semantics by live-node presence; state what onWidgetChanged triggers; pin reentrancy and drain order; correct file attributions and the layering rationale; note the reactive-options dependency for ring clearance and the subgraph surface. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nxv4TewGb9qXkwjUMofZ8D
Fix assessment: not trivial, holding off on pushingRead through Focus guard ( Per-field "local edit is newer" check — this is what the two Proposed approachBuild the s3-opt-5 presentation layer: Open questionDoes Leaving |
…ing-reconcile # Conflicts: # src/workbench/extensions/agent/crdt/graphMutations.test.ts
…#18070) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789610676316069?thread_ts=1789610676.316069&cid=C0BGH348Z0C)_ ## Summary Fixes the false "invalid" red ring on combo widgets in agent workflow tabs by closing both mechanisms behind it. **Before:** repro-only. Two `it.fails` pins: `WidgetSelectDefault` marking an agent-created node's placeholder widget (`options: {}`) invalid, and `graphMutations.setWidget` writing the widget store without ever reaching the live widget's `callback`. **After:** - **Mechanism A (placeholder window)**: `WidgetSelectDefault.isInvalid` no longer flags a value while `options.values` is still undefined, so a placeholder widget's legitimate value renders clean until the node materializes. - **Mechanism B (contract gap)**: agent writes now run the same live-widget effects a human edit runs, per [ADR-CRDT-WIDGETS-0036](docs/adr/CRDT-WIDGETS-0036-agent-widget-writes-run-live-widget-effects.md). `GraphMutationsDeps` gains a required renderer-owned `widgets: SemanticWidgetEffectPort`; both follower write paths (named `set_widget`, positional reconcile) go through one `applyWidgetWrite` helper; a batch records an effect only when the write applied and the store's post-write value differs from the previous one (`Object.is` for primitives, structural equality for objects, so the clone every doc value takes cannot count as a change and a normalizing callback cannot loop through its mint echo); effects drain after `commit` in payload order, each call isolated behind `reportError('error_applying_agent_widget_effects')`. The new `createLiveWidgetEffectPort` resolves the live node the way the Vue render model does (`resolveLiveWidget`), requires the store to still own it (so an orphan left by an in-batch replace or delete never receives its successor's value), then assigns `widget.value`, runs `callback(value, canvas, node)` and `node.onWidgetChanged`, and redraws. Wired in `AgentPanelRoot.vue`. Concrete beneficiaries beyond the ring: Custom Combo's `option*` value setters (agent edits now rebuild its option list) and `PrimitiveNode`'s `callback → applyToGraph` (agent edits to a primitive now propagate to linked targets). An agent write also clears `required_input_missing` for that widget through the existing `onWidgetChanged` hook. ## Changes - `docs/adr/CRDT-WIDGETS-0036-agent-widget-writes-run-live-widget-effects.md` (+ README index row): the design, amended after adversarial review (structural change gate, ownership gating, placeholder semantics by live-node presence, `onWidgetChanged` contract, reentrancy and drain order, subgraph note). - `src/workbench/extensions/agent/crdt/graphMutations.ts`: `SemanticWidgetEffectPort`, `applyWidgetWrite`, post-commit drain. - `src/workbench/extensions/agent/crdt/liveWidgetEffects.ts` (new): `createLiveWidgetEffectPort({ getGraph, getCanvas })`, with the guards in a `resolveLiveWidget` helper. - `src/workbench/extensions/agent/crdt/__fixtures__/widgetEffectPorts.ts` (new): inert and recording ports for the other construction sites. - `src/workbench/extensions/agent/AgentPanelRoot.vue`: wiring. - `src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue`: mechanism A. - Tests: the placeholder repro now a plain `it` (fixture adapted to a live `LGraph`; assertion unchanged); port-contract table in `graphMutations.test.ts`; `liveWidgetEffects.test.ts` (callback and `onWidgetChanged` arguments, no-ops for store-only nodes, missing widgets, a foreign root graph, the orphan after an in-batch `replaceNode`, drain-time resolution, `required_input_missing` clearing); mint-echo test in `agentCrdtProjection.integration.test.ts` (a callback that rewrites its own object value mints one human `set_widget`; the echo frame mints nothing). ## Red-Green Verification | Commit | CI | Purpose | |--------|----|---------| | `test(agent): pin live widget effects for agent writes` | red | Proves the tests catch the gap | | `fix(agent): run the live widget's effects for agent widget writes` | green | Proves the fix resolves it | ## Scope notes - The autogrow / node-field display bugs are out of scope here; they are a different mechanism (`prepareNode` replacing live node fields wholesale) and are owned by Comfy-Org#18081. - **Comfy-Org#18089** pins that a doc value must not overwrite a newer local value. Its recency guard lands inside the same `applyWidgetWrite` helper introduced here and should report `applied: false`, which by construction records no effect. Expect a small merge on that helper and on the `GraphMutationsDeps` type (Comfy-Org#18084 adds `placement`). - Extension authors: a widget's `callback` and its node's `onWidgetChanged` now also fire when the in-app agent changes the value, with `(value, canvas, node)` and no pointer arguments. Treat it as programmatic, like a remote option refresh. - Ring clearance for a combo whose callback rebuilds `options.values` additionally depends on that mutation being reactive (Custom Combo's `shallowReactive` splice is; a raw `widget.options.values = …` write is not). Documented in the ADR; a renderer concern outside this PR. - No e2e added: the agent replay harness needs a live CRDT-enabled backend. A follow-up may pin `aria-invalid` absence after an agent set plus tab switch next to `agentTabSwitchCatchUp.spec.ts`. ## Review Focus - `graphMutations.ts` `writeWidget` / `applyWidgetWrite` and the drain in `batch`. - `liveWidgetEffects.ts` ownership check (`useNodeDataStore().ownsNode`) and root-graph guard. - `pnpm exec vitest run src/workbench/extensions/agent/ src/renderer/extensions/vueNodes/widgets/ src/stores/`: all pass, 1 expected fail (pre-existing serialize pin). `pnpm typecheck`, `pnpm lint`, `pnpm format:check`, `pnpm knip`: clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Nxv4TewGb9qXkwjUMofZ8D --- _Generated by [Claude Code](https://claude.ai/code/session_01Nxv4TewGb9qXkwjUMofZ8D)_ --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: bymyself <cbyrne@comfy.org>
…ing-reconcile Mechanical conflict in browser_tests/fixtures/agentConversationFixture.ts: both branches independently appended unrelated helper methods (resyncWidget vs hostNodePositions/reloadWithoutLocalWorkflow) to the same harness class at the same insertion point. Kept both.
d9efec9 to
e5edf95
Compare
…ing-reconcile # Conflicts: # src/workbench/extensions/agent/crdt/graphMutations.test.ts
This comment has been minimized.
This comment has been minimized.
The merge conflict resolution left both the old sync resyncWidget and the new async (zod-validated) implementation in AgentConversationHarness, which oxlint's type-aware pass rejected as a duplicate identifier. Keep the async version the tests actually rely on, and mark its now-newly-visible floating promise in agentWidgetTypingReconcile.spec.ts with void, as intended.
The host echoes every accepted human batch back as a doc_update stamped with the sending tab's actor. The follower merged that frame into the doc and then re-applied it to the live graph as an agent-remote patch, so every local edit round-tripped through the applier (FE-2509, the frame source behind #18089's lost keystrokes and #18375's null-origin hand-wired link). The follower now recognises its own actor before projection: the frame is still merged into the doc, but the collected changes are discarded instead of applied, and the frame counts as skipped. Catch-up frames are never skipped, since a resubscribe can replay state this tab wrote but whose graph was since replaced. Supersedes the echo-gating half of #18210. Amp-Thread-ID: https://ampcode.com/threads/T-01a0d248-f130-743a-a0a7-d90e3334772b
christian-byrne
left a comment
There was a problem hiding this comment.
Approving as a W1a acceptance pin (row tlock-1).
Test-only after merging main: one new black-box spec plus two comments. Verified at head 2af4dc388e:
browser_tests/tests/agent/agentWidgetTypingReconcile.spec.ts(+83, new) — the pin,test.fail().browser_tests/fixtures/agentConversationFixture.ts(+6) — comment only on the existingresyncWidget.src/workbench/extensions/agent/crdt/graphMutations.test.ts(+4) — comment only.
The unit pin this PR originally added, it.fails('preserves a locally newer widget value across a direct setWidget op'), is already on main at graphMutations.test.ts:1262, landed by #18187 (54d382c645). The merge collapsed the duplicate; verified no second copy exists. So what lands here is the black-box form of a symptom main previously pinned only at unit level, which is the form docs/harness-first-qa.md prefers.
Red for the right reason, executed rather than inferred: playwright-video-new-tests passed (4m3s) and playwright-tests (cloud, frontend-dist-cloud) passed (20m45s) at this head — the new spec ran, and Playwright reports a test.fail() as passing only while the assertion genuinely fails. The suite will break when FE #18700 fixes the widget guard, which is the intent.
CI at 2af4dc388e: 91 pass, 16 skipped, 0 failures.
…nstead of sweeping it A doc_reset no longer clears the canvas. It arms the projection so the new lineage's first frame, which carries its whole state, applies in replace mode: shared node ids are updated in place and live nodes and links the new document lacks are removed in the same change-tracker step. The backend's lazy first mint (system:mint) therefore no longer blanks a freshly opened template until the catch-up lands. Absorbs the reproductions from #18403 (first-mint sweep), #18116 (redo after undoing an agent edit), #18404 (delete_node and clear turns) and #18089 (widget typing versus a remote frame, pinned as a known defect). Amp-Thread-ID: https://ampcode.com/threads/T-01a0d248-f130-743a-a0a7-d90e3334772b
|
|
…get typing pin #18089 landed this repro on main with `test.fail()` while the defect was live. The stale-echo guard in this PR fixes it, so the marker would make the spec report "expected to fail, but passed" — a false red on main the moment this merges. Removing it here keeps the assertion and retires the marker in the same change that earns it.
… edit (#18766) Typing into any text widget while the agent panel is open garbles — the cursor jumps and fast typing deletes letters (PM-1191, PM-1697, live on cloud at 5% exposure). Root cause: the incremental `setWidget` apply path writes remote doc-frame values into `widgetValueStore` with no in-progress-local-edit guard, so the host's echo of the user's *own* keystroke ops (whole-value, stale by however many keystrokes are in flight) deletes text under the cursor. The same unguarded path let an agent turn's `set_widget` overwrite a widget the user was mid-editing. - **What**: `graphMutations.ts` — the incremental `setWidget` commit now consults the same `skipStaleReconcile` local-dirty guard the full-reconcile path already uses: a remote value that differs from a locally-dirty widget is skipped until the document catches up to the local value; the write that finally matches clears the mark (its context-carrying no-op write), after which remote/agent writes land normally. The old escape hatch that let a single-widget op bypass the guard "regardless of value" is retired — that bypass *was* the garble. - **Pins flipped green honestly** (each red on parent, green here): - `graphMutations.test.ts` "preserves a locally newer widget value across a direct setWidget op" (`it.fails` → `it`), plus a new round-trip test covering skip-stale-echo → catch-up-clears → agent-write-lands. - `agentCrdtReconcileOverwrite.spec.ts` widget-overwrite case (`test.fail()` removed; now proves the agent frame really applied via the CRDT debug-panel outcomes counter *and* that the user's text survived). - `agentConversationReplay.spec.ts` "keeps prompt keystrokes when a doc frame resyncs the widget" (`test.fail()` removed — with this fix it passes deterministically, not by echo-latency luck; supersedes the marker-only removal in #18649). - Two unit tests that pinned the old escape-hatch contract are updated to the new one (a differing remote write holds; only a matching one resolves the mark). The trade: a widget stranded dirty by an unsuppressed structural replay now stays local-valued until a matching remote write, instead of being unstuck by the next agent op — the suppression brackets those tests also pin are what prevent that state. - The guard-clearing rule: convergence relies on the user's own minted keystroke ops echoing back; once the echo value equals the local value, the contexted write clears `locallyDirtyWidgets`. Verified in `graphMutations.test.ts` round-trip test. - Open test PRs [#18089](#18089) and [#18705](#18705) both flip to "expected to fail, but passed" when run against this branch (verified locally; #18705's attachment shows the stale echo arriving and being skipped) — their `test.fail()` markers should drop on rebase after this merges. - Freeze note: this is the authorized P0 exception to the informal remote-ops freeze. `graphMutations.ts` is deleted by the #18700 refactor; the property this restores — *a local edit in progress is never overwritten by a remote or reconciled write* — must be re-asserted on the new graph-API apply path (own-actor echo skip at follower entry + a provenance-aware guard at the widget setter). The three flipped black-box/unit pins are the acceptance tests for that re-assertion; they survive the refactor even though this implementation does not. Evidence: reported by four users over ten days (Memie 09-15 w/ CRDT debug report `F0C22E6U70E`, Denys 09-22, Luke 09-24, Doug 09-24 Silverside demo).
… edit (Comfy-Org#18766) ## Summary Typing into any text widget while the agent panel is open garbles — the cursor jumps and fast typing deletes letters (PM-1191, PM-1697, live on cloud at 5% exposure). Root cause: the incremental `setWidget` apply path writes remote doc-frame values into `widgetValueStore` with no in-progress-local-edit guard, so the host's echo of the user's *own* keystroke ops (whole-value, stale by however many keystrokes are in flight) deletes text under the cursor. The same unguarded path let an agent turn's `set_widget` overwrite a widget the user was mid-editing. ## Changes - **What**: `graphMutations.ts` — the incremental `setWidget` commit now consults the same `skipStaleReconcile` local-dirty guard the full-reconcile path already uses: a remote value that differs from a locally-dirty widget is skipped until the document catches up to the local value; the write that finally matches clears the mark (its context-carrying no-op write), after which remote/agent writes land normally. The old escape hatch that let a single-widget op bypass the guard "regardless of value" is retired — that bypass *was* the garble. - **Pins flipped green honestly** (each red on parent, green here): - `graphMutations.test.ts` "preserves a locally newer widget value across a direct setWidget op" (`it.fails` → `it`), plus a new round-trip test covering skip-stale-echo → catch-up-clears → agent-write-lands. - `agentCrdtReconcileOverwrite.spec.ts` widget-overwrite case (`test.fail()` removed; now proves the agent frame really applied via the CRDT debug-panel outcomes counter *and* that the user's text survived). - `agentConversationReplay.spec.ts` "keeps prompt keystrokes when a doc frame resyncs the widget" (`test.fail()` removed — with this fix it passes deterministically, not by echo-latency luck; supersedes the marker-only removal in Comfy-Org#18649). - Two unit tests that pinned the old escape-hatch contract are updated to the new one (a differing remote write holds; only a matching one resolves the mark). The trade: a widget stranded dirty by an unsuppressed structural replay now stays local-valued until a matching remote write, instead of being unstuck by the next agent op — the suppression brackets those tests also pin are what prevent that state. ## Review Focus - The guard-clearing rule: convergence relies on the user's own minted keystroke ops echoing back; once the echo value equals the local value, the contexted write clears `locallyDirtyWidgets`. Verified in `graphMutations.test.ts` round-trip test. - Open test PRs [Comfy-Org#18089](Comfy-Org#18089) and [Comfy-Org#18705](Comfy-Org#18705) both flip to "expected to fail, but passed" when run against this branch (verified locally; Comfy-Org#18705's attachment shows the stale echo arriving and being skipped) — their `test.fail()` markers should drop on rebase after this merges. - Freeze note: this is the authorized P0 exception to the informal remote-ops freeze. `graphMutations.ts` is deleted by the Comfy-Org#18700 refactor; the property this restores — *a local edit in progress is never overwritten by a remote or reconciled write* — must be re-asserted on the new graph-API apply path (own-actor echo skip at follower entry + a provenance-aware guard at the widget setter). The three flipped black-box/unit pins are the acceptance tests for that re-assertion; they survive the refactor even though this implementation does not. Evidence: reported by four users over ten days (Memie 09-15 w/ CRDT debug report `F0C22E6U70E`, Denys 09-22, Luke 09-24, Doug 09-24 Silverside demo).
|
|
|
Automated backport to both Not something to fix on this PR itself — flagging for whoever owns #18633's release backport. Generated by Claude Code |
|
Answering the open question above: no manual 1.54 port, and #18633 does not need porting for it.
|
Summary
Reproduces a defect where typing quickly into a text widget (e.g. a CLIP Text Encode "text" widget) can lose keystrokes when the agent's CRDT follower resyncs a widget mid-edit.
Update: main has since merged #18361, which fixed the
reconcileNode(full-reconcile) path of this bug. That half of this PR'sgraphMutations.test.tsrepro is now a passingit()on main (merged into this branch as-is). The plainsetWidgetop path is explicitly left unfixed by #18361, so this PR's remaining scope is just thatit.failsrepro plus the Playwright e2e case below.Changes
graphMutations.ts'sapplyWidgetValues/setWidgetValueoverwrite a widget's stored value from the CRDT doc payload unconditionally — on both the full-reconcile path and the plain per-widgetsetWidgetop. There is no per-field check for whether the live value is locally newer than the doc's copy, and the widget's DOM<textarea>(WidgetGrid.vue/WidgetTextarea.vue) binds straight to that store with no focus guard either. So any doc frame that happens to touch a widget's entry (a stale echo, a reconnect resync, or an unrelated full reconcile) can stomp a value the user is actively typing.src/workbench/extensions/agent/crdt/graphMutations.test.ts: one remainingit.failsVitest case proving the unconditional overwrite through the plainsetWidgetop — the missing guard lives insetWidgetValueitself. (The sibling case throughreconcileNodeis now fixed on main by fix(agent): don't let CRDT reconcile clobber a fresher live widget value #18361 and passes.)browser_tests/tests/agent/agentWidgetTypingReconcile.spec.ts: atest.fail()Playwright case using the agent-integration-replay harness. It replays a real recorded agent run that creates a prompt node and sets its text, then types into that same widget via real per-keystroke dispatch (pressSequentially, not.fill()) while one more doc frame resyncs the widget mid-keystroke, and asserts the full typed string survives.browser_tests/fixtures/agentConversationFixture.ts: adds a smallresyncWidget(nodeId, widget)helper to the shared replay harness that sends one more realdoc_update(through the actual CRDT doc, not a fake) resyncing a widget to its current value — used to make the race deterministic instead of depending on incidental timing.setWidgetpath, by design — these aretest.fail()/it.fails()repros).Review Focus
vitest runof the full file: thereconcileNodecase now passes (fixed on main), thesetWidgetcase still fails as expected (it.fails). The Playwright e2e case could not be executed in the sandbox this was authored in (no way to launch a matching Chromium build there) — please run it in CI/locally before relying on it; if it doesn't fail as written, that's worth a second look rather than assuming it's correct.setWidgetpath likely needs either a focus guard (skip/defer overwriting a widget's value while it has DOM focus) or a per-field "is the local edit newer" check insetWidgetValue.Screenshots (if applicable)
The Playwright test attaches a screenshot of the widget after the race and a text diff of typed-vs-final value as test artifacts (not included here since the test wasn't run in this environment).