Repository navigation
[backport core/1.58] fix(agent): hold a promoted widget write during a re-subscribe instead of refusing it (PM-2003) - #21831
Conversation
…d of refusing it (PM-2003) (#21335) Promoted widget edit made while the agent document re-subscribes: now waits and saves, instead of the "Widget edit was rejected" toast. - Fixes the residual case pinned by #21281 (Run re-randomizes a promoted seed during the 30 s stale-probe re-subscribe). - The rc34 report on PM-2003 was a different, older cause (its panel build predates #20377). Tracked in BE-21435. - Freeze exception granted for this fix (agent `crdt/` dir). <details><summary>Full context for agent readers</summary> ## What changed `promotedHostWrite` refuses a write as `doc_not_synced` whenever `mayWritePromotedHost` is false. That gate (#20516) closes on every re-subscribe: `LayoutFollowerBridge.reconcile()` resets `ackSeq` until the catch-up lands. That covers the 30 s stale probe, a reconnect, a gap resync and an ack-timeout retry. A promoted write in that window got the rejected-edit toast, and the value never reached the document. The minter now holds such a write per widget and rechecks every 100 ms. Once the gate opens, the write goes back through the same checks a fresh write takes, so it is judged against the caught-up layout. A held write is: - superseded by any later local edit to the same widget, even one made while the doc is unbound; - dropped silently if the panel is disabled or the doc is unbound, the same as a fresh intent; - dropped if the canvas no longer shows its value (for example, the catch-up brought an agent value); - kept waiting while the graph is briefly unavailable; - refused with the existing notice only after `2 × SUBSCRIBE_ACK_TIMEOUT_MS` (30 s), or if the bound workflow changed; - dropped on detach. ## Alternative considered and rejected Make the gate lineage-level: stay open across same-lineage re-subscribes, with no hold. This was rejected. Positional promoted writes are not validated by the applier (`applyPromotedHostWrite`, positional case), and #20516 deliberately keeps a same-lineage doc closed when its ack is ahead (`keeps a stale non-empty same-lineage document closed`). After a reconnect the doc can be many frames behind, and writing a positional index against a stale layout can land on the wrong slot. Holding until catch-up keeps that guarantee. ## Evidence - Unit (`docOpMinter.test.ts`): 13 new cases. The first 6 fail on main and pass here. The 5 added after review fail on the first version of the hold and pass here. 99/99 pass. - Browser (`agentPromotedSeedRunWidgetWrite.spec.ts`, from #21281 without `test.fail`), local cloud build: the re-subscribe case fails on the unfixed minter and passes with the fix, 3/3 repeats. The control case passes on both. - `pnpm typecheck` clean on Node 26.8.2; agent suite 3883 pass. Two `useAgentSession` timing tests failed under full-suite load and pass when run alone, on this branch and on main. - Review: two fresh Claude reviewers (Skeptic, Architect). Codex was unavailable (expired login). Accepted findings: stale-value overwrite, unbound supersede, unbound retry, graph-null refusal, deadline shorter than an ack-timeout retry, wall clock, and inline comments. Rejected: the lineage-level gate (see above). ## Freeze `src/workbench/extensions/agent/crdt/**` is under the informal freeze. Christian granted an exception for this PM-2003 fix (2026-10-18). Disposition after the refactor: the property *a human widget write made during a re-subscribe is never silently refused* must hold on the graph-API path, and the browser spec survives as an acceptance pin. ## Backports core/1.57 and cloud/1.57 carry #20516, so they need this. 1.56 does not have #20516 (cloud/1.56 backport #21312 is still open). If #21312 lands, this must follow it. Refs PM-2003. Supersedes #21281 (same spec, now passing). </details>
📦 Bundle Size
⚡ Performance Report
Scenario timings
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-10-23T20:06:10.612Z",
"gitSha": "12d25eb3e9a02fd60a51c15cbde4493120580358",
"branch": "backport-21335-to-core-1.58",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2026.1689999999817,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.096,
"layouts": 10,
"layoutDurationMs": 2.7729999999999992,
"taskDurationMs": 546.5190000000001,
"heapDeltaBytes": 1016096,
"heapUsedBytes": 91597872,
"domNodes": -200,
"jsHeapTotalBytes": 2154496,
"scriptDurationMs": 11.725,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665573770491804,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2024.7150000000147,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.905,
"layouts": 9,
"layoutDurationMs": 2.508,
"taskDurationMs": 608.837,
"heapDeltaBytes": 493252,
"heapUsedBytes": 91133696,
"domNodes": -200,
"jsHeapTotalBytes": 1630208,
"scriptDurationMs": 13.023,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6655737704918,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1744.043000000005,
"styleRecalcs": 72,
"styleRecalcDurationMs": 12.996999999999998,
"layouts": 9,
"layoutDurationMs": 2.1879999999999997,
"taskDurationMs": 830.775,
"heapDeltaBytes": -788000,
"heapUsedBytes": 89866776,
"domNodes": -200,
"jsHeapTotalBytes": 3989504,
"scriptDurationMs": 134.47,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664761904761907,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1725.6629999999973,
"styleRecalcs": 72,
"styleRecalcDurationMs": 12.967000000000002,
"layouts": 9,
"layoutDurationMs": 2.479,
"taskDurationMs": 870.4490000000001,
"heapDeltaBytes": 729916,
"heapUsedBytes": 90916680,
"domNodes": -200,
"jsHeapTotalBytes": 3203072,
"scriptDurationMs": 137.764,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384617,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1725.2130000000534,
"styleRecalcs": 18,
"styleRecalcDurationMs": 5.0680000000000005,
"layouts": 12,
"layoutDurationMs": 3.039999999999999,
"taskDurationMs": 322.59000000000003,
"heapDeltaBytes": -1257076,
"heapUsedBytes": 88405396,
"domNodes": 47,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 15.796999999999999,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846156,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1809.0419999999767,
"styleRecalcs": 18,
"styleRecalcDurationMs": 5.763000000000001,
"layouts": 11,
"layoutDurationMs": 2.862,
"taskDurationMs": 386.622,
"heapDeltaBytes": -1326092,
"heapUsedBytes": 88902624,
"domNodes": 47,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 15.571000000000002,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666055045871563,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 564.5649999999875,
"styleRecalcs": 14,
"styleRecalcDurationMs": 2.8980000000000006,
"layouts": 9,
"layoutDurationMs": 2.4890000000000003,
"taskDurationMs": 388.00900000000007,
"heapDeltaBytes": 3313008,
"heapUsedBytes": 93555940,
"domNodes": 0,
"jsHeapTotalBytes": 6815744,
"scriptDurationMs": 144.387,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667647058823537,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 602.6090000000295,
"styleRecalcs": 14,
"styleRecalcDurationMs": 3.0629999999999997,
"layouts": 9,
"layoutDurationMs": 2.509,
"taskDurationMs": 438.853,
"heapDeltaBytes": 3325960,
"heapUsedBytes": 94002436,
"domNodes": 0,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 146.924,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1131.31199999998,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 831.1379999999999,
"heapDeltaBytes": -8661536,
"heapUsedBytes": 103066464,
"domNodes": -230,
"jsHeapTotalBytes": 10301440,
"scriptDurationMs": 50.65299999999999,
"eventListeners": -168,
"totalBlockingTimeMs": 445,
"frameDurationMs": 30.632432432432424,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1175.2389999999764,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 888.196,
"heapDeltaBytes": -14568452,
"heapUsedBytes": 103105792,
"domNodes": -230,
"jsHeapTotalBytes": 15532032,
"scriptDurationMs": 56.443999999999996,
"eventListeners": -168,
"totalBlockingTimeMs": 479,
"frameDurationMs": 31.532432432432426,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 778.8879999999949,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 428.13299999999987,
"heapDeltaBytes": -3276580,
"heapUsedBytes": 97485380,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 121.429,
"eventListeners": 0,
"totalBlockingTimeMs": 163,
"frameDurationMs": 23.03823529411765,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 791.6280000000029,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 448.137,
"heapDeltaBytes": -2089932,
"heapUsedBytes": 98306308,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 128.59900000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 164,
"frameDurationMs": 23.529411764705884,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "extension-clean-combined-draw",
"durationMs": 8347.452000000005,
"styleRecalcs": 2,
"styleRecalcDurationMs": 0.5380000000000003,
"layouts": 2,
"layoutDurationMs": 0.47099999999999964,
"taskDurationMs": 7408.301,
"heapDeltaBytes": 53773000,
"heapUsedBytes": 168386768,
"domNodes": -276,
"jsHeapTotalBytes": 40259584,
"scriptDurationMs": 5633.268,
"eventListeners": -130,
"totalBlockingTimeMs": 138,
"frameDurationMs": 24.727002967359052,
"p95FrameDurationMs": 50
},
{
"name": "extension-clean-combined-draw",
"durationMs": 7876.964999999984,
"styleRecalcs": 2,
"styleRecalcDurationMs": 0.379,
"layouts": 1,
"layoutDurationMs": 0.33200000000000024,
"taskDurationMs": 7075.222,
"heapDeltaBytes": 18654576,
"heapUsedBytes": 128109960,
"domNodes": -297,
"jsHeapTotalBytes": 21553152,
"scriptDurationMs": 5326.539000000001,
"eventListeners": -130,
"totalBlockingTimeMs": 72,
"frameDurationMs": 23.960486322188448,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 7604.576000000008,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6697.7880000000005,
"heapDeltaBytes": 17558500,
"heapUsedBytes": 121445356,
"domNodes": -296,
"jsHeapTotalBytes": 16048128,
"scriptDurationMs": 5341.446999999999,
"eventListeners": -130,
"totalBlockingTimeMs": 94,
"frameDurationMs": 24.30448717948718,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 8670.723000000009,
"styleRecalcs": 2,
"styleRecalcDurationMs": 0.4209999999999995,
"layouts": 1,
"layoutDurationMs": 0.30600000000000027,
"taskDurationMs": 7717.55,
"heapDeltaBytes": 20100568,
"heapUsedBytes": 130056624,
"domNodes": -277,
"jsHeapTotalBytes": 29679616,
"scriptDurationMs": 5918.208,
"eventListeners": -130,
"totalBlockingTimeMs": 77,
"frameDurationMs": 23.940055248618783,
"p95FrameDurationMs": 33.400000000001455
},
{
"name": "large-combo-open",
"durationMs": 168.7249999999949,
"styleRecalcs": 22,
"styleRecalcDurationMs": 13.362000000000002,
"layouts": 10,
"layoutDurationMs": 2.836,
"taskDurationMs": 125.364,
"heapDeltaBytes": 13195520,
"heapUsedBytes": 120629796,
"domNodes": 917,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 7.398,
"eventListeners": 196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 20.837499999999977,
"p95FrameDurationMs": 50
},
{
"name": "large-combo-open",
"durationMs": 205.27199999997947,
"styleRecalcs": 24,
"styleRecalcDurationMs": 14.139,
"layouts": 12,
"layoutDurationMs": 3.4939999999999998,
"taskDurationMs": 151.25,
"heapDeltaBytes": 15498180,
"heapUsedBytes": 120978768,
"domNodes": 917,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 8.100999999999999,
"eventListeners": 196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 22.22222222222222,
"p95FrameDurationMs": 66.60000000000036
},
{
"name": "large-graph-idle",
"durationMs": 2042.632000000026,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.613,
"layouts": 9,
"layoutDurationMs": 2.315,
"taskDurationMs": 652.913,
"heapDeltaBytes": -28644628,
"heapUsedBytes": 92998868,
"domNodes": -276,
"jsHeapTotalBytes": -1896448,
"scriptDurationMs": 35.763999999999996,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2056.9730000000277,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.436000000000001,
"layouts": 8,
"layoutDurationMs": 2.179,
"taskDurationMs": 693.31,
"heapDeltaBytes": 423688,
"heapUsedBytes": 111503256,
"domNodes": -296,
"jsHeapTotalBytes": -1777664,
"scriptDurationMs": 33.94499999999999,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2155.7149999999865,
"styleRecalcs": 69,
"styleRecalcDurationMs": 9.804,
"layouts": 8,
"layoutDurationMs": 2.2030000000000003,
"taskDurationMs": 1312.645,
"heapDeltaBytes": 1000672,
"heapUsedBytes": 112681276,
"domNodes": -296,
"jsHeapTotalBytes": -241664,
"scriptDurationMs": 660.628,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665891472868214,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 3045.85400000002,
"styleRecalcs": 68,
"styleRecalcDurationMs": 9.382000000000001,
"layouts": 6,
"layoutDurationMs": 1.695,
"taskDurationMs": 1599.5739999999998,
"heapDeltaBytes": -3474460,
"heapUsedBytes": 108883720,
"domNodes": -296,
"jsHeapTotalBytes": -1290240,
"scriptDurationMs": 720.191,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.75769230769231,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3920.466000000033,
"styleRecalcs": 71,
"styleRecalcDurationMs": 10.683,
"layouts": 65,
"layoutDurationMs": 11.016000000000002,
"taskDurationMs": 1669.027,
"heapDeltaBytes": -2922812,
"heapUsedBytes": 110935680,
"domNodes": -272,
"jsHeapTotalBytes": 188416,
"scriptDurationMs": 705.409,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6663829787234,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3440.9970000000385,
"styleRecalcs": 72,
"styleRecalcDurationMs": 11.138000000000002,
"layouts": 65,
"layoutDurationMs": 11.223,
"taskDurationMs": 1544.773,
"heapDeltaBytes": -4095808,
"heapUsedBytes": 109346288,
"domNodes": -272,
"jsHeapTotalBytes": -73728,
"scriptDurationMs": 706.158,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.747317073170734,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "legacy-node-drag",
"durationMs": 2897.61900000002,
"styleRecalcs": 47,
"styleRecalcDurationMs": 5.7540000000000004,
"layouts": 6,
"layoutDurationMs": 1.4889999999999999,
"taskDurationMs": 1728.806,
"heapDeltaBytes": -11314124,
"heapUsedBytes": 105363288,
"domNodes": 0,
"jsHeapTotalBytes": 5771264,
"scriptDurationMs": 829.7699999999999,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.85988372093023,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3141.538999999966,
"styleRecalcs": 45,
"styleRecalcDurationMs": 5.896,
"layouts": 6,
"layoutDurationMs": 1.476,
"taskDurationMs": 1880.246,
"heapDeltaBytes": -23776596,
"heapUsedBytes": 91100196,
"domNodes": 0,
"jsHeapTotalBytes": 2023424,
"scriptDurationMs": 932.253,
"eventListeners": 182,
"totalBlockingTimeMs": 4,
"frameDurationMs": 16.934408602150537,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2043.8220000000342,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.1999999999999997,
"layouts": 7,
"layoutDurationMs": 2.002,
"taskDurationMs": 692.9080000000001,
"heapDeltaBytes": -25347632,
"heapUsedBytes": 87684324,
"domNodes": -296,
"jsHeapTotalBytes": -1253376,
"scriptDurationMs": 36.77199999999999,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666667,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2051.8769999999904,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.6170000000000004,
"layouts": 8,
"layoutDurationMs": 2.346,
"taskDurationMs": 558.017,
"heapDeltaBytes": -276936,
"heapUsedBytes": 112981964,
"domNodes": -296,
"jsHeapTotalBytes": -466944,
"scriptDurationMs": 38.19499999999999,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 574.8209999999858,
"styleRecalcs": 46,
"styleRecalcDurationMs": 5.563999999999999,
"layouts": 9,
"layoutDurationMs": 2.394,
"taskDurationMs": 402.364,
"heapDeltaBytes": -900992,
"heapUsedBytes": 89724904,
"domNodes": 0,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 130.099,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.668571428571433,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 547.965999999974,
"styleRecalcs": 47,
"styleRecalcDurationMs": 5.451999999999999,
"layouts": 9,
"layoutDurationMs": 2.409,
"taskDurationMs": 361.34900000000005,
"heapDeltaBytes": -1056464,
"heapUsedBytes": 89835936,
"domNodes": 0,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 127.26400000000001,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2008.105999999998,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.8509999999999995,
"layouts": 9,
"layoutDurationMs": 2.493,
"taskDurationMs": 501.67800000000005,
"heapDeltaBytes": 3349956,
"heapUsedBytes": 96347280,
"domNodes": 0,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 10.690000000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-idle",
"durationMs": 2025.6100000000288,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.9259999999999997,
"layouts": 9,
"layoutDurationMs": 2.635,
"taskDurationMs": 610.848,
"heapDeltaBytes": 2463888,
"heapUsedBytes": 93849440,
"domNodes": -218,
"jsHeapTotalBytes": 2416640,
"scriptDurationMs": 12.334,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6655737704918,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1709.3250000000353,
"styleRecalcs": 76,
"styleRecalcDurationMs": 13.922999999999998,
"layouts": 9,
"layoutDurationMs": 2.067,
"taskDurationMs": 763.238,
"heapDeltaBytes": -16489988,
"heapUsedBytes": 84638200,
"domNodes": -191,
"jsHeapTotalBytes": 7409664,
"scriptDurationMs": 95.43900000000001,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66504854368932,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1960.0490000000264,
"styleRecalcs": 86,
"styleRecalcDurationMs": 15.531999999999998,
"layouts": 9,
"layoutDurationMs": 3.7319999999999998,
"taskDurationMs": 985.9850000000001,
"heapDeltaBytes": -6522684,
"heapUsedBytes": 94986004,
"domNodes": 0,
"jsHeapTotalBytes": 8388608,
"scriptDurationMs": 103.224,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666101694915252,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1385.0370000000112,
"styleRecalcs": 18,
"styleRecalcDurationMs": 22.265,
"layouts": 5,
"layoutDurationMs": 13.078,
"taskDurationMs": 975.2100000000002,
"heapDeltaBytes": 37993748,
"heapUsedBytes": 137077080,
"domNodes": 16030,
"jsHeapTotalBytes": 16392192,
"scriptDurationMs": 29.671999999999997,
"eventListeners": 3244,
"totalBlockingTimeMs": 109,
"frameDurationMs": 19.17808219178082,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 11861.625000000004,
"styleRecalcs": 249,
"styleRecalcDurationMs": 33.937,
"layouts": 7,
"layoutDurationMs": 3.2570000000000006,
"taskDurationMs": 5515.045,
"heapDeltaBytes": -23248520,
"heapUsedBytes": 89390656,
"domNodes": -276,
"jsHeapTotalBytes": 1462272,
"scriptDurationMs": 2383.4139999999998,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.712816901408452,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 11878.307000000063,
"styleRecalcs": 250,
"styleRecalcDurationMs": 33.201,
"layouts": 7,
"layoutDurationMs": 2.083,
"taskDurationMs": 5500.796,
"heapDeltaBytes": -22168844,
"heapUsedBytes": 100324168,
"domNodes": -296,
"jsHeapTotalBytes": 655360,
"scriptDurationMs": 2408.4159999999997,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.68932584269663,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 19582.086000000003,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 19096.21,
"heapDeltaBytes": -55449676,
"heapUsedBytes": 278297624,
"domNodes": -3344,
"jsHeapTotalBytes": 19648512,
"scriptDurationMs": 266.058,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 35.76946983546618,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-large-graph-idle",
"durationMs": 19897.378000000004,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 19389.922,
"heapDeltaBytes": -29380884,
"heapUsedBytes": 300513208,
"domNodes": -3352,
"jsHeapTotalBytes": 15716352,
"scriptDurationMs": 266.818,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 37.056238361266296,
"p95FrameDurationMs": 66.79999999999927
},
{
"name": "vue-large-graph-pan",
"durationMs": 24035.678000000018,
"styleRecalcs": 181,
"styleRecalcDurationMs": 25.650000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 23788.987999999998,
"heapDeltaBytes": -9617616,
"heapUsedBytes": 290845612,
"domNodes": -3344,
"jsHeapTotalBytes": 14667776,
"scriptDurationMs": 814.6460000000001,
"eventListeners": -651,
"totalBlockingTimeMs": 0,
"frameDurationMs": 47.68313492063493,
"p95FrameDurationMs": 99.89999999999964
},
{
"name": "vue-large-graph-pan",
"durationMs": 24617.201000000023,
"styleRecalcs": 180,
"styleRecalcDurationMs": 28.347999999999985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 24422.021,
"heapDeltaBytes": -22905268,
"heapUsedBytes": 306299764,
"domNodes": -3344,
"jsHeapTotalBytes": 12500992,
"scriptDurationMs": 840.5089999999999,
"eventListeners": -651,
"totalBlockingTimeMs": 12,
"frameDurationMs": 47.61257253384913,
"p95FrameDurationMs": 100
},
{
"name": "vue-node-resize-workload",
"durationMs": 5434.861000000012,
"styleRecalcs": 20,
"styleRecalcDurationMs": 51.47399999999999,
"layouts": 20,
"layoutDurationMs": 25.218000000000004,
"taskDurationMs": 5325.665000000001,
"heapDeltaBytes": -6693668,
"heapUsedBytes": 294230356,
"domNodes": -3344,
"jsHeapTotalBytes": 24629248,
"scriptDurationMs": 98.25099999999999,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 30.695480225988703,
"p95FrameDurationMs": 66.60000000000036
},
{
"name": "vue-node-resize-workload",
"durationMs": 7314.788000000021,
"styleRecalcs": 20,
"styleRecalcDurationMs": 74.15400000000002,
"layouts": 20,
"layoutDurationMs": 31.469000000000012,
"taskDurationMs": 7218.831,
"heapDeltaBytes": -43306828,
"heapUsedBytes": 285985248,
"domNodes": -3348,
"jsHeapTotalBytes": 25939968,
"scriptDurationMs": 112.153,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 43.03764705882353,
"p95FrameDurationMs": 83.39999999999964
},
{
"name": "vue-zoom-out-idle",
"durationMs": 7226.084000000014,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6979.9079999999985,
"heapDeltaBytes": 14648352,
"heapUsedBytes": 299069040,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 98.821,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 25.499646643109546,
"p95FrameDurationMs": 50
},
{
"name": "vue-zoom-out-idle",
"durationMs": 9755.62400000001,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9469.300000000001,
"heapDeltaBytes": -1260004,
"heapUsedBytes": 273879424,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 130.72900000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 35.582116788321166,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "workflow-execution",
"durationMs": 478.2849999999712,
"styleRecalcs": 20,
"styleRecalcDurationMs": 9.626,
"layouts": 10,
"layoutDurationMs": 3.5190000000000006,
"taskDurationMs": 126.61200000000001,
"heapDeltaBytes": 7423708,
"heapUsedBytes": 104069000,
"domNodes": 126,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 15.432,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.260714285714293,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 439.5590000000311,
"styleRecalcs": 12,
"styleRecalcDurationMs": 7.047000000000001,
"layouts": 11,
"layoutDurationMs": 2.7540000000000004,
"taskDurationMs": 83.75600000000001,
"heapDeltaBytes": 6757800,
"heapUsedBytes": 104442060,
"domNodes": 95,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 8.685,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 331.4110000000028,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.666,
"layouts": 76,
"layoutDurationMs": 13.558,
"taskDurationMs": 292.38599999999997,
"heapDeltaBytes": 10715896,
"heapUsedBytes": 99911300,
"domNodes": 4,
"jsHeapTotalBytes": 10485760,
"scriptDurationMs": 133.799,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.661904761904744,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 328.7320000000591,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.728,
"layouts": 76,
"layoutDurationMs": 13.372,
"taskDurationMs": 301.342,
"heapDeltaBytes": -21708704,
"heapUsedBytes": 70021480,
"domNodes": 4,
"jsHeapTotalBytes": 11272192,
"scriptDurationMs": 134.6,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664999999999964,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 361.5099999999529,
"styleRecalcs": 5,
"styleRecalcDurationMs": 2.366,
"layouts": 76,
"layoutDurationMs": 12.297,
"taskDurationMs": 329.536,
"heapDeltaBytes": -1549232,
"heapUsedBytes": 115831528,
"domNodes": 4,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 112.10000000000001,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.42272727272724,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 423.5199999999395,
"styleRecalcs": 5,
"styleRecalcDurationMs": 3.1310000000000002,
"layouts": 76,
"layoutDurationMs": 13.790999999999999,
"taskDurationMs": 382.974,
"heapDeltaBytes": -553284,
"heapUsedBytes": 116200024,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 138.31,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663999999999977,
"p95FrameDurationMs": 16.800000000000182
}
]
}🔬 E2E Coverage
🎭 Playwright: ✅ 2958 passed, 0 failed · 3 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measureExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
Findings and check detailsThe matrix runs on same-repository version-bump PRs with relevant changes, main-branch pushes, and manual dispatches. This candidate does not qualify, so every expensive stage was skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md 🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. Findings and check detailsNo new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 0ba4afebae9e5de425405f763ea129a10406c026
Full docs: ADR-DEVEX-LINT-0015 🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (116)
Reproduce locallypnpm architecture:checkFull docs: Frontend domain catalog |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## core/1.58 #21831 +/- ##
==========================================
Coverage 84.47% 84.48%
==========================================
Files 2931 2931
Lines 160741 160806 +65
Branches 39146 39171 +25
==========================================
+ Hits 135792 135856 +64
- Misses 24558 24559 +1
Partials 391 391
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
christian-byrne
left a comment
There was a problem hiding this comment.
Reviewed as a release carrier for #21335.
Cherry-pick fidelity — exact. The added/removed line sequence is byte-identical to the parent's squash commit 07518578, and all four files at this head are byte-identical to main's state immediately after #21335 merged. No conflict resolution was needed, so there is no resolution to assess.
The fix's premise holds on this branch. #21335 only does anything where #20516's mayWritePromotedHost gate exists to be held open; core/1.58 contains it (3825bc83d8 is an ancestor). The parent's description names core/1.57 and cloud/1.57 as the branches needing this because 1.58 did not exist when it was written — the same applicability test passes here.
Required checks pass at this head (fa67b001): lint-and-format, test, e2e-status. upload-e2e-coverage / package fails and is not a required check on release branches; it is currently failing on unrelated pull requests as well, so it is not evidence about this change.
Behaviour, read independently of the parent's review. The hold is bounded and cleans up after itself: one shared 100 ms timer that re-arms only while entries remain; detach clears both the held map and the timer; a later local edit to the same widget deletes the held entry even when the panel is disabled or the document is unbound, so a stale held value can never be minted after a newer edit; and a transient unbind refuses on the deadline rather than waiting forever. canvasReplaced reads live widget state only to discard a held write, never to reconstruct one, so the write that eventually mints still carries the intent captured at the edit.
One inaccuracy, inherited from the parent and not worth a commit on a backport. The description says a held write is refused after 2 × SUBSCRIBE_ACK_TIMEOUT_MS (30 s). The code computes SUBSCRIBE_ACK_MAX_TIMEOUTS * SUBSCRIBE_ACK_TIMEOUT_MS = 3 × 15 s = 45 s, which matches the subscribe lifecycle's own give-up point and is what the constant's comment intends. The prose is stale, not the behaviour.
Approving as a faithful carrier of an applicable fix.
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 5 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 4 |
| 🟢 Low | 1 |
Panel: 6/6 reviewers contributed findings.
| event: IntentOf<'set_widget'>, | ||
| retried: HeldPromotedWrite | null | ||
| ): void { | ||
| const held = retried ?? takeHeldWrite(event) |
There was a problem hiding this comment.
🟡 Medium — takeHeldWrite(event) removes the held entry before the pendingAdds, if (!graph) return and isValueWidgetWrite early returns. So a new local edit to the same widget made while the doc is bound but getGraph() is briefly null (for example, mid-load) discards both the held write and the new one, with no mint and no refusal notice. On the retry path the same early returns also drop entry silently. Take the held write only after those guards, or re-hold it on those paths. Raised by 3 of 6 reviewers (gpt-5.6-sol-xhigh adversarial, kimi-k3-high adversarial, kimi-k3-high edge-case).
|
|
||
| function retryHeldWrite(graph: LGraph, entry: HeldPromotedWrite): void { | ||
| if (canvasReplaced(graph, entry.event)) return | ||
| if ((deps.boundRootGraphId() ?? graph.id) !== entry.rootGraphId) { |
There was a problem hiding this comment.
🟡 Medium — This guard only compares deps.boundRootGraphId(), which keeps naming the bound workflow while a tab switch swaps the live canvas graph, and which doesn't change on a same-workflow doc_reset. In the first case a retry can resolve the held event against the new graph and drop it silently. In the second, an old-lineage value gets minted into the replacement document. Also check the live graph identity (for example, graph.id or graph.rootGraph.id against entry.rootGraphId), tag held writes with the document lineage, and refuse rather than silently drop them when either has changed. Raised by 2 of 6 reviewers (claude-opus-5-5-xhigh adversarial, gpt-5.6-sol-xhigh edge-case).
| } | ||
|
|
||
| function retryHeldWrite(graph: LGraph, entry: HeldPromotedWrite): void { | ||
| if (canvasReplaced(graph, entry.event)) return |
There was a problem hiding this comment.
🟡 Medium — canvasReplaced treats any difference between the canvas and the held value as a remote replacement. Held writes are never registered with the projection's local-write guard, so a catch-up that re-applies the host's whole stale widgets_values array (for example, because the agent changed a sibling promoted widget) reverts the human's edit, and that edit is then dropped silently. In the other direction, when the input has no widgetId or no entry in the store, canvasReplaced reports 'not replaced', so a stale local value can overwrite a real remote change. Raised by 2 of 6 reviewers (claude-opus-5-5-xhigh edge-case, kimi-k3-high adversarial).
| if (!deps.isEnabled() || !deps.isDocBound()) return | ||
| if (!deps.isEnabled() || !deps.isDocBound()) { | ||
| if (event.type === 'set_widget') | ||
| heldPromotedWrites.delete(heldWriteKey(event)) |
There was a problem hiding this comment.
🟡 Medium — The retry loop keeps a held write through a transient unbind (isDocBound() false while boundRootGraphId() is still set). But a newer local write to the same widget in that window deletes the held entry here, and the newer write is never minted either, so neither value reaches the doc and the user gets no notice. The test 'is superseded by a newer write made while the document is unbound' locks this in. When the bound workflow is unchanged, replace the held entry with the newer event (keeping heldSince) instead of deleting it. Raised by 2 of 6 reviewers (claude-opus-5-5-xhigh adversarial, claude-opus-5-5-xhigh edge-case).
| * How long a promoted-host write waits for the bound document to catch up | ||
| * before it is refused: as long as the subscribe lifecycle keeps retrying. | ||
| */ | ||
| export const PROMOTED_WRITE_CATCH_UP_DEADLINE_MS = |
There was a problem hiding this comment.
🟢 Low — The fixed 3 × 15 s deadline runs from the first held edit, but the subscribe lifecycle can keep retrying for longer: reconnects reset its budget, and refusals add backoff. On top of that, a superseding edit inherits the old heldSince, so an edit made just before the 45 s mark is refused with a toast about 100 ms later, even when a later catch-up would have accepted it. Consider deriving expiry from the lifecycle's give-up signal, or restarting the clock on resubscribe. Raised by 3 of 6 reviewers (gpt-5.6-sol-xhigh adversarial, claude-opus-5-5-xhigh edge-case, claude-opus-5-5-xhigh adversarial).
Backport of #21335 to
core/1.58Automatically created by backport workflow.