Repository navigation
[backport cloud/1.58] fix(agent): hold a promoted widget write during a re-subscribe instead of refusing it (PM-2003) - #21832
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
Absolute values
Raw data{
"timestamp": "2026-10-23T20:07:26.929Z",
"gitSha": "0c14cb9d53504b43cfcebde6df2d86a37ae2e30b",
"branch": "backport-21335-to-cloud-1.58",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2008.3719999999516,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.646,
"layouts": 9,
"layoutDurationMs": 2.7540000000000004,
"taskDurationMs": 362.717,
"heapDeltaBytes": 4208248,
"heapUsedBytes": 103578508,
"domNodes": 0,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 8.316,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2023.0679999999666,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.987,
"layouts": 9,
"layoutDurationMs": 2.725,
"taskDurationMs": 545.769,
"heapDeltaBytes": 4068336,
"heapUsedBytes": 103963880,
"domNodes": 0,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 9.672,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1728.367999999989,
"styleRecalcs": 73,
"styleRecalcDurationMs": 13.154,
"layouts": 9,
"layoutDurationMs": 2.543,
"taskDurationMs": 733.2429999999999,
"heapDeltaBytes": 23135972,
"heapUsedBytes": 115925088,
"domNodes": 0,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 161.634,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846153,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1976.9489999999905,
"styleRecalcs": 84,
"styleRecalcDurationMs": 14.047,
"layouts": 11,
"layoutDurationMs": 2.777,
"taskDurationMs": 1068.759,
"heapDeltaBytes": -3384632,
"heapUsedBytes": 97404092,
"domNodes": 0,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 164.42200000000003,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66638655462185,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1724.411000000032,
"styleRecalcs": 18,
"styleRecalcDurationMs": 5.247,
"layouts": 11,
"layoutDurationMs": 3.116,
"taskDurationMs": 299.06,
"heapDeltaBytes": 25413556,
"heapUsedBytes": 115162796,
"domNodes": 47,
"jsHeapTotalBytes": 6815744,
"scriptDurationMs": 10.770999999999999,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384614,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1790.1440000000548,
"styleRecalcs": 19,
"styleRecalcDurationMs": 4.714,
"layouts": 11,
"layoutDurationMs": 2.8579999999999997,
"taskDurationMs": 430.62199999999996,
"heapDeltaBytes": -1298140,
"heapUsedBytes": 88906636,
"domNodes": 47,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 10.050000000000004,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66635514018692,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 614.7169999999846,
"styleRecalcs": 13,
"styleRecalcDurationMs": 2.8459999999999996,
"layouts": 8,
"layoutDurationMs": 2.341,
"taskDurationMs": 453.989,
"heapDeltaBytes": 4194844,
"heapUsedBytes": 94399332,
"domNodes": 0,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 174.91099999999997,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.127777777777762,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 682.3850000000675,
"styleRecalcs": 13,
"styleRecalcDurationMs": 2.393,
"layouts": 8,
"layoutDurationMs": 2.097,
"taskDurationMs": 499.926,
"heapDeltaBytes": 3705224,
"heapUsedBytes": 94639544,
"domNodes": 0,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 168.08800000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.092307692307678,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1252.8629999999907,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 952.4200000000001,
"heapDeltaBytes": -15085348,
"heapUsedBytes": 102596236,
"domNodes": -239,
"jsHeapTotalBytes": 15532032,
"scriptDurationMs": 79.26199999999999,
"eventListeners": -168,
"totalBlockingTimeMs": 552,
"frameDurationMs": 32.89210526315791,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1232.462000000055,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 874.3660000000001,
"heapDeltaBytes": -15405908,
"heapUsedBytes": 102154692,
"domNodes": -230,
"jsHeapTotalBytes": 15269888,
"scriptDurationMs": 74.92199999999998,
"eventListeners": -168,
"totalBlockingTimeMs": 555,
"frameDurationMs": 33.33243243243244,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 857.0740000000114,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 490.15299999999985,
"heapDeltaBytes": -2692748,
"heapUsedBytes": 94673240,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 157.752,
"eventListeners": 0,
"totalBlockingTimeMs": 211,
"frameDurationMs": 24.9970588235294,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 847.3510000000033,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 443.76999999999975,
"heapDeltaBytes": -2983248,
"heapUsedBytes": 97623380,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 160.11700000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 215,
"frameDurationMs": 24.99999999999997,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10797.716000000008,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9900.104,
"heapDeltaBytes": 23353696,
"heapUsedBytes": 129312188,
"domNodes": -296,
"jsHeapTotalBytes": 29773824,
"scriptDurationMs": 8208.010999999999,
"eventListeners": -130,
"totalBlockingTimeMs": 1463,
"frameDurationMs": 33.22953846153846,
"p95FrameDurationMs": 66.69999999999891
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11379.335999999967,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10607.234999999999,
"heapDeltaBytes": 79764012,
"heapUsedBytes": 194693224,
"domNodes": -276,
"jsHeapTotalBytes": 66736128,
"scriptDurationMs": 8611.928,
"eventListeners": -130,
"totalBlockingTimeMs": 1202,
"frameDurationMs": 32.10819209039548,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 9521.135999999984,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.07500000000000041,
"layouts": 1,
"layoutDurationMs": 0.3870000000000002,
"taskDurationMs": 8731.002,
"heapDeltaBytes": 43024120,
"heapUsedBytes": 146599200,
"domNodes": -276,
"jsHeapTotalBytes": 19718144,
"scriptDurationMs": 7152.463,
"eventListeners": -130,
"totalBlockingTimeMs": 862,
"frameDurationMs": 32.149662162162166,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10576.324,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9794.842,
"heapDeltaBytes": 28469000,
"heapUsedBytes": 132617860,
"domNodes": -296,
"jsHeapTotalBytes": 31776768,
"scriptDurationMs": 7825.215999999999,
"eventListeners": -130,
"totalBlockingTimeMs": 1041,
"frameDurationMs": 30.985923753665684,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "large-combo-open",
"durationMs": 241.31499999998596,
"styleRecalcs": 25,
"styleRecalcDurationMs": 13.991000000000001,
"layouts": 11,
"layoutDurationMs": 3.252,
"taskDurationMs": 188.61199999999997,
"heapDeltaBytes": 13280448,
"heapUsedBytes": 118764996,
"domNodes": 917,
"jsHeapTotalBytes": 1835008,
"scriptDurationMs": 10.197,
"eventListeners": 196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 20.833333333333332,
"p95FrameDurationMs": 66.69999999999982
},
{
"name": "large-combo-open",
"durationMs": 217.24600000004557,
"styleRecalcs": 24,
"styleRecalcDurationMs": 13.636,
"layouts": 11,
"layoutDurationMs": 3.2520000000000002,
"taskDurationMs": 162.454,
"heapDeltaBytes": 13189780,
"heapUsedBytes": 120875732,
"domNodes": 917,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 8.083,
"eventListeners": 196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.680000000000017,
"p95FrameDurationMs": 66.59999999999945
},
{
"name": "large-graph-idle",
"durationMs": 2073.691999999994,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.064,
"layouts": 9,
"layoutDurationMs": 2.6700000000000004,
"taskDurationMs": 680.6429999999999,
"heapDeltaBytes": -27681968,
"heapUsedBytes": 94792224,
"domNodes": -297,
"jsHeapTotalBytes": -1646592,
"scriptDurationMs": 32.095000000000006,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66612903225806,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2042.067999999972,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.372,
"layouts": 8,
"layoutDurationMs": 2.3430000000000004,
"taskDurationMs": 478.91700000000014,
"heapDeltaBytes": 453984,
"heapUsedBytes": 110794172,
"domNodes": -276,
"jsHeapTotalBytes": -1253376,
"scriptDurationMs": 30.807000000000002,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2279.8369999999863,
"styleRecalcs": 69,
"styleRecalcDurationMs": 8.895,
"layouts": 7,
"layoutDurationMs": 1.8920000000000001,
"taskDurationMs": 1554.2060000000001,
"heapDeltaBytes": -3132416,
"heapUsedBytes": 108233552,
"domNodes": -297,
"jsHeapTotalBytes": 20480,
"scriptDurationMs": 822.8299999999999,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.788235294117644,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2261.1149999999043,
"styleRecalcs": 69,
"styleRecalcDurationMs": 8.259,
"layouts": 7,
"layoutDurationMs": 1.957,
"taskDurationMs": 1493.4299999999998,
"heapDeltaBytes": -4772136,
"heapUsedBytes": 112106904,
"domNodes": -296,
"jsHeapTotalBytes": -897024,
"scriptDurationMs": 803.824,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66592592592593,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3843.094000000008,
"styleRecalcs": 69,
"styleRecalcDurationMs": 9.408,
"layouts": 63,
"layoutDurationMs": 10.344000000000001,
"taskDurationMs": 1824.557,
"heapDeltaBytes": -7914796,
"heapUsedBytes": 105309172,
"domNodes": -272,
"jsHeapTotalBytes": 819200,
"scriptDurationMs": 789.901,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665800865800872,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3582.6660000000174,
"styleRecalcs": 71,
"styleRecalcDurationMs": 9.496,
"layouts": 64,
"layoutDurationMs": 10.822,
"taskDurationMs": 1595.2990000000002,
"heapDeltaBytes": -25057208,
"heapUsedBytes": 87997520,
"domNodes": -252,
"jsHeapTotalBytes": 450560,
"scriptDurationMs": 786.8309999999999,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.743925233644863,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 3148.8539999999716,
"styleRecalcs": 45,
"styleRecalcDurationMs": 5.458000000000001,
"layouts": 5,
"layoutDurationMs": 1.6210000000000004,
"taskDurationMs": 2025.843,
"heapDeltaBytes": -23397992,
"heapUsedBytes": 91734784,
"domNodes": 0,
"jsHeapTotalBytes": 1761280,
"scriptDurationMs": 992.8460000000001,
"eventListeners": 182,
"totalBlockingTimeMs": 22,
"frameDurationMs": 17.116216216216216,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 2687.275999999997,
"styleRecalcs": 44,
"styleRecalcDurationMs": 4.83,
"layouts": 5,
"layoutDurationMs": 1.3860000000000001,
"taskDurationMs": 1759.149,
"heapDeltaBytes": -12019940,
"heapUsedBytes": 102608852,
"domNodes": 0,
"jsHeapTotalBytes": 6033408,
"scriptDurationMs": 964.855,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.982278481012656,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2047.9729999999563,
"styleRecalcs": 7,
"styleRecalcDurationMs": 2.0740000000000003,
"layouts": 7,
"layoutDurationMs": 2.1079999999999997,
"taskDurationMs": 476.639,
"heapDeltaBytes": -27554284,
"heapUsedBytes": 96813672,
"domNodes": -296,
"jsHeapTotalBytes": -1122304,
"scriptDurationMs": 31.668999999999997,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536584,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2066.094000000021,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.6639999999999997,
"layouts": 8,
"layoutDurationMs": 2.6359999999999997,
"taskDurationMs": 485.48999999999995,
"heapDeltaBytes": -26048512,
"heapUsedBytes": 92920020,
"domNodes": -276,
"jsHeapTotalBytes": -1478656,
"scriptDurationMs": 33.257000000000005,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666129032258066,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 628.9390000000026,
"styleRecalcs": 47,
"styleRecalcDurationMs": 5.005999999999999,
"layouts": 9,
"layoutDurationMs": 2.8560000000000003,
"taskDurationMs": 449.001,
"heapDeltaBytes": 3137956,
"heapUsedBytes": 109768332,
"domNodes": 0,
"jsHeapTotalBytes": 8388608,
"scriptDurationMs": 146.367,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66486486486485,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 577.2650000000112,
"styleRecalcs": 47,
"styleRecalcDurationMs": 4.698999999999999,
"layouts": 9,
"layoutDurationMs": 2.5869999999999997,
"taskDurationMs": 432.055,
"heapDeltaBytes": -94000,
"heapUsedBytes": 102251560,
"domNodes": 0,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 143.792,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66857142857142,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2026.1430000000473,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.2179999999999995,
"layouts": 9,
"layoutDurationMs": 2.231,
"taskDurationMs": 419.90299999999996,
"heapDeltaBytes": 5742720,
"heapUsedBytes": 97069732,
"domNodes": -218,
"jsHeapTotalBytes": 1630208,
"scriptDurationMs": 7.130000000000001,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6655737704918,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2027.9829999999492,
"styleRecalcs": 11,
"styleRecalcDurationMs": 2.8979999999999997,
"layouts": 10,
"layoutDurationMs": 2.84,
"taskDurationMs": 431.33,
"heapDeltaBytes": -510316,
"heapUsedBytes": 97952500,
"domNodes": -219,
"jsHeapTotalBytes": 581632,
"scriptDurationMs": 8.604000000000001,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66639344262295,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1774.4299999999953,
"styleRecalcs": 77,
"styleRecalcDurationMs": 12.724999999999998,
"layouts": 9,
"layoutDurationMs": 2.377,
"taskDurationMs": 979.692,
"heapDeltaBytes": -24722260,
"heapUsedBytes": 81898720,
"domNodes": -210,
"jsHeapTotalBytes": 3477504,
"scriptDurationMs": 112.427,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666037735849052,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1973.1819999999516,
"styleRecalcs": 88,
"styleRecalcDurationMs": 16.364000000000004,
"layouts": 9,
"layoutDurationMs": 2.4040000000000004,
"taskDurationMs": 1061.345,
"heapDeltaBytes": -6399324,
"heapUsedBytes": 95034888,
"domNodes": 0,
"jsHeapTotalBytes": 8388608,
"scriptDurationMs": 110.23,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66610169491525,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1459.5229999999901,
"styleRecalcs": 19,
"styleRecalcDurationMs": 26.238000000000003,
"layouts": 5,
"layoutDurationMs": 17.145000000000003,
"taskDurationMs": 1166.961,
"heapDeltaBytes": 35956712,
"heapUsedBytes": 140024644,
"domNodes": 16030,
"jsHeapTotalBytes": 17178624,
"scriptDurationMs": 34.953,
"eventListeners": 3244,
"totalBlockingTimeMs": 177,
"frameDurationMs": 20.0904109589041,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 9641.634000000011,
"styleRecalcs": 251,
"styleRecalcDurationMs": 28.891000000000002,
"layouts": 8,
"layoutDurationMs": 2.033,
"taskDurationMs": 6005.595,
"heapDeltaBytes": -19907252,
"heapUsedBytes": 89732388,
"domNodes": -276,
"jsHeapTotalBytes": -466944,
"scriptDurationMs": 2670.7810000000004,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665743944636677,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8324.368999999933,
"styleRecalcs": 250,
"styleRecalcDurationMs": 27.406000000000002,
"layouts": 8,
"layoutDurationMs": 2.0750000000000006,
"taskDurationMs": 5087.535,
"heapDeltaBytes": -20892540,
"heapUsedBytes": 89197632,
"domNodes": -276,
"jsHeapTotalBytes": -1253376,
"scriptDurationMs": 2628.891,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.73319919517103,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 22876.620000000003,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21995.923,
"heapDeltaBytes": -62201976,
"heapUsedBytes": 267046060,
"domNodes": -3344,
"jsHeapTotalBytes": 14667776,
"scriptDurationMs": 306.594,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 39.49188255613126,
"p95FrameDurationMs": 83.30000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 23118.487999999958,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22311.691,
"heapDeltaBytes": -38493988,
"heapUsedBytes": 273014976,
"domNodes": -3344,
"jsHeapTotalBytes": -7614464,
"scriptDurationMs": 311.637,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 39.71786941580756,
"p95FrameDurationMs": 83.29999999999927
},
{
"name": "vue-large-graph-pan",
"durationMs": 18772.99499999998,
"styleRecalcs": 150,
"styleRecalcDurationMs": 14.157000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 18396.522,
"heapDeltaBytes": -11875456,
"heapUsedBytes": 293437160,
"domNodes": -3373,
"jsHeapTotalBytes": 15978496,
"scriptDurationMs": 824.499,
"eventListeners": -651,
"totalBlockingTimeMs": 23,
"frameDurationMs": 34.27481751824817,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-large-graph-pan",
"durationMs": 27784.190999999963,
"styleRecalcs": 181,
"styleRecalcDurationMs": 19.509999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 27307.193000000003,
"heapDeltaBytes": -4075504,
"heapUsedBytes": 296265396,
"domNodes": -3344,
"jsHeapTotalBytes": 12046336,
"scriptDurationMs": 868.268,
"eventListeners": -651,
"totalBlockingTimeMs": 23,
"frameDurationMs": 51.16427255985267,
"p95FrameDurationMs": 100.10000000000036
},
{
"name": "vue-node-resize-workload",
"durationMs": 8153.381999999965,
"styleRecalcs": 20,
"styleRecalcDurationMs": 64.39,
"layouts": 20,
"layoutDurationMs": 21.668999999999993,
"taskDurationMs": 8041.829999999999,
"heapDeltaBytes": -36193908,
"heapUsedBytes": 288071720,
"domNodes": -3344,
"jsHeapTotalBytes": 16240640,
"scriptDurationMs": 117.873,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 47.107514450867065,
"p95FrameDurationMs": 100
},
{
"name": "vue-node-resize-workload",
"durationMs": 5841.839999999934,
"styleRecalcs": 20,
"styleRecalcDurationMs": 64.389,
"layouts": 20,
"layoutDurationMs": 21.991999999999997,
"taskDurationMs": 5712.4130000000005,
"heapDeltaBytes": -47357364,
"heapUsedBytes": 273121848,
"domNodes": -3344,
"jsHeapTotalBytes": 21745664,
"scriptDurationMs": 97.10600000000001,
"eventListeners": -653,
"totalBlockingTimeMs": 20,
"frameDurationMs": 34.61420118343195,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8224.094999999978,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7726.392000000003,
"heapDeltaBytes": 14603644,
"heapUsedBytes": 285310284,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 121.24000000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 28.099317406143353,
"p95FrameDurationMs": 50.099999999998545
},
{
"name": "vue-zoom-out-idle",
"durationMs": 11444.911999999931,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11222.663999999999,
"heapDeltaBytes": -20682584,
"heapUsedBytes": 274485488,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 156.00900000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 39.423448275862064,
"p95FrameDurationMs": 83.30000000000291
},
{
"name": "workflow-execution",
"durationMs": 499.1539999999759,
"styleRecalcs": 25,
"styleRecalcDurationMs": 12.011999999999999,
"layouts": 13,
"layoutDurationMs": 4.886,
"taskDurationMs": 148.595,
"heapDeltaBytes": 7412676,
"heapUsedBytes": 104868804,
"domNodes": 128,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 17.037,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 117.3710000000483,
"styleRecalcs": 8,
"styleRecalcDurationMs": 10.537,
"layouts": 8,
"layoutDurationMs": 3.333,
"taskDurationMs": 87.00000000000001,
"heapDeltaBytes": 4685396,
"heapUsedBytes": 95303576,
"domNodes": 120,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 7.263999999999998,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 19.43333333333332,
"p95FrameDurationMs": 33.30000000000018
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 446.61100000007536,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.656,
"layouts": 76,
"layoutDurationMs": 15.377,
"taskDurationMs": 407.243,
"heapDeltaBytes": 11439872,
"heapUsedBytes": 80805564,
"domNodes": 4,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 193.926,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667857142857137,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 499.51899999996385,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.71,
"layouts": 76,
"layoutDurationMs": 16.081000000000003,
"taskDurationMs": 452.741,
"heapDeltaBytes": -14028932,
"heapUsedBytes": 79674948,
"domNodes": 4,
"jsHeapTotalBytes": 2359296,
"scriptDurationMs": 212.77100000000002,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 588.3659999999509,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.9980000000000002,
"layouts": 76,
"layoutDurationMs": 14.949,
"taskDurationMs": 546.186,
"heapDeltaBytes": 1171992,
"heapUsedBytes": 113425212,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 225.52700000000002,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66571428571429,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 603.9760000001024,
"styleRecalcs": 5,
"styleRecalcDurationMs": 2.081,
"layouts": 76,
"layoutDurationMs": 14.442,
"taskDurationMs": 557.964,
"heapDeltaBytes": -3857652,
"heapUsedBytes": 108562496,
"domNodes": 4,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 226.727,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66944444444443,
"p95FrameDurationMs": 16.799999999999272
}
]
}🔬 E2E Coverage
🎭 Playwright: ✅ 2955 passed, 0 failed · 5 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 a0c2434b25b27a22c0e57b0d1c89a1c6a152c851
Full docs: ADR-DEVEX-LINT-0015 🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (120)
Reproduce locallypnpm architecture:checkFull docs: Frontend domain catalog |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## cloud/1.58 #21832 +/- ##
=============================================
Coverage ? 85.77%
=============================================
Files ? 2588
Lines ? 134707
Branches ? 41141
=============================================
Hits ? 115547
Misses ? 18744
Partials ? 416
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, and the one divergence from main is explained rather than assumed. The added/removed line sequence this commit introduces is byte-identical to the parent's squash commit 07518578. Two of the four files do not match main's state at that commit, and the reason is ordering rather than a changed resolution: cloud/1.58 already carries #21479 via #21544, and on main #21479 landed 72 minutes after #21335 and was authored on top of it. So this branch took the two changes in the opposite order. After this commit, docOpMinter.ts and docOpMinter.test.ts at this head are byte-identical to main at c5b55212 — main's state once both changes had landed. The inversion converges exactly; nothing was hand-resolved and no behaviour moved.
The fix's premise holds on this branch. #21335 only does anything where #20516's mayWritePromotedHost gate exists to be held open; cloud/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 (816b236c): 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 4 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 3 |
| 🟢 Low | 1 |
Panel: 6/6 reviewers contributed findings.
| 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 — Sometimes the doc is briefly unbound while boundRootGraphId() is still set, for example during a refusal backoff or a reconnect. The retry loop treats that as a gap and keeps the held write. But if a new local set_widget for the same widget arrives in that window, it deletes the held entry and is itself dropped. Neither value reaches the document and no refusal is shown, so the canvas and the doc silently diverge (the PM-2003 symptom). The newer write should replace the held entry and keep its heldSince. The test 'is superseded by a newer write made while the document is unbound' currently locks in the lossy behavior.
Raised by 3 of 6 reviewers (claude-opus-5-5-xhigh adversarial, claude-opus-5-5-xhigh edge-case, gpt-5.6-sol-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.
🟡 Medium — The 45 s deadline counts from the write, but the subscribe lifecycle's budget restarts on reconnect and on every confirm, and it also includes the six-step refusal backoff. So a write can be refused with a toast while the lifecycle is still legitimately retrying and later catches up, which contradicts the JSDoc. The reverse also happens: once the lifecycle has already given up (terminal timeout or permanent refusal), every promoted write now waits 45 s before it is refused. Base the hold/refuse decision on the lifecycle's own state, such as a 'gave up' signal, rather than a fixed timer.
Raised by 4 of 6 reviewers (claude-opus-5-5-xhigh adversarial, gpt-5.6-sol-xhigh adversarial, claude-opus-5-5-xhigh edge-case, gpt-5.6-sol-xhigh edge-case).
| const stored = input?.widgetId | ||
| ? useWidgetValueStore().getWidget(input.widgetId) | ||
| : undefined | ||
| return stored !== undefined && !isEqual(stored.value, event.value) |
There was a problem hiding this comment.
🟡 Medium — canvasReplaced fails open. It returns false (meaning safe to mint) whenever the host is not found, the input has no widgetId, or the widget value store has no entry, and retryHeldWrite then re-routes the stale write anyway. That covers three cases: a deleted host, a host replaced by a different node with the same ID, and a tab-switch load where isDocBound/boundRootGraphId still name the old workflow while the canvas holds the new graph. Depending on how the owner resolves, the result is a silent drop, a spurious unresolved-owner report, or a plain unpromoted set_widget. An unresolvable host or a missing store entry should keep the write held (waitOrGiveUp) or drop it, not count as 'not replaced'.
Raised by 4 of 6 reviewers (gpt-5.6-sol-xhigh adversarial, kimi-k3-high adversarial, claude-opus-5-5-xhigh edge-case, kimi-k3-high edge-case).
| event: IntentOf<'set_widget'>, | ||
| retried: HeldPromotedWrite | null | ||
| ): void { | ||
| const held = retried ?? takeHeldWrite(event) |
There was a problem hiding this comment.
🟢 Low — takeHeldWrite removes the held entry before the pendingAdds, !graph, and owner-resolution early returns. On the retry path the entry has already been cleared from the map. So if one of those returns fires, the held write is neither re-held nor refused and is lost silently. Two ways this happens: a new edit while the graph is briefly null, or a retry tick mid-reconfigure where the owner cannot be resolved. Take the held entry only after those guards, or re-hold it when bailing out.
Raised by 3 of 6 reviewers (claude-opus-5-5-xhigh adversarial, kimi-k3-high adversarial, kimi-k3-high edge-case).
Backport of #21335 to
cloud/1.58Automatically created by backport workflow.