Repository navigation
[backport cloud/1.56] fix(agent): recover running turn - #21685
Conversation
…1998) (#19901) ## Summary A `409 TURN_IN_PROGRESS` on send was a dead end; it now re-attaches to the turn that is holding the thread, so the user gets a Stop control instead of a raw server string. FE-1998. ## Changes - **What**: `useAgentSession` reads the 409 conflict body the agent service has sent since [cloud#8275](Comfy-Org/cloud#8275) (`type: "TURN_IN_PROGRESS"`, `active_message_id`, `turn_id`) and re-reads the thread on it. The re-read adopts the still-running assistant row as the active turn, which is what puts **Stop** where Send was; when that turn settles the composer unlocks on its own. The notice copy changes from the raw server message to `agent.sendTurnInProgress`. - **Dependencies**: none. ### Why the refusal was terminal The server's single-active-turn signal is a `status='streaming'` assistant row, durable in Postgres and deliberately surviving a worker restart (`services/agent/server/agent_handler.go`, `ThreadActiveTurn` → `rejectTurnInProgress`). So the thread stays locked until that row goes terminal, and nothing the user could reach from the panel cleared it: no stop control, no retry, and no way to tell a working turn from a dead one. ## Review Focus **Scope — this is the 409 route that composer gating does not close.** A turn *this* client can see already renders Stop and never offers Send, so it cannot reach the guard; #19697/#18152 and #18154 closed the reload and socket-drop routes. What remains is a turn started from a second tab, window or device: this client has no local signal, offers Send, and is refused. That is what the new spec exercises, and it is the only shape that can reach the refusal path at all now. **The re-read is bounded, on `reconcileSnapshotTurn`'s reasoning.** `performSend` awaits it and the composer sits in `sending` until it returns, so an unbounded await would let a slow workflow restore hold the one control the user needs. If the bound wins before the transcript lands, the reattachment is invalidated and the late snapshot is discarded. If the transcript has already landed and only workflow restore is still outstanding, the active turn remains adopted and the send reports that reattachment. **It goes through `hydrateFromServer`, not a bare `getMessages` + `hydrate`.** That is the one path which arms the hydration mailbox, so WS frames for the running turn that land during the GET are replayed rather than dropped. A second re-attach path would drift from it. **The discriminator is load-bearing** and has its own negative test: a 409 from another endpoint, or one whose body this client cannot parse, stays an ordinary send failure and triggers no re-read. **Fixture fidelity (please look at this).** `agentTurnLockFixture` answered a refused post with the 409's *message only*, so no spec could distinguish a client that reads the conflict ids from one that ignores them — the comment claimed the body was verbatim from `agent_handler.go` and it was not. It now sends the whole body. The generated `AgentError` type describes only `error`, because the OpenAPI schema does not cover this endpoint's conflict body; the fixture types the body as `AgentError & z.infer<typeof zTurnInProgressError>`, reusing the client's runtime schema for the conflict fields. *Filed as an upstream hypothesis for the ingest schema* rather than fixed here. ## Testing Black-box, red on the parent and green here: ``` browser_tests/tests/agent/agentSendRefusedByRunningTurn.spec.ts ``` On `origin/main` it fails at `expect(turnLock.stopButton).toBeVisible()` with "element(s) not found" — the dead end itself. It also drives the escape hatch end to end: Stop unlocks the composer and the retry is accepted with no second refusal and no page reload, which is this ticket's stated acceptance criterion. Unit: ``` useAgentSession.test.ts › re-attaches to the running turn when a send is refused with TURN_IN_PROGRESS useAgentSession.test.ts › does not let a timed-out re-attachment replace a newer turn useAgentSession.test.ts › records no failed send when the re-read finds the refused thread deleted useAgentSession.test.ts › leaves an undiscriminated 409 on an existing thread as a plain failure useAgentSession.test.ts › applies a pending stop to an active turn adopted after a refused send useAgentSession.test.ts › clears a pending stop when the send fails before adopting a turn ``` The first is also red on the parent (`expected false to be true` on `isStreaming`). Run locally against `origin/main` at `dd630e6c04`: - `useAgentSession` / `agentConversationStore` / `agentTranscript` / `agentRestClient` — 413 passed - the four sibling turn-lock specs that share the fixture (`agentTurnSurvivesRefresh`, `agentTurnSurvivesSocketDrop`, `agentTurnSurvivesPanelMinimize`, `agentEscapeStopsClickedTurn`) — 15 passed - `typecheck:app`, `typecheck:browser`, `oxlint`, `eslint`, `locale:check`, and the `fallow` pre-push audit gate — clean ## Production context Measured 2026-10-02 (read-only): `comfy.agent.turn_rejected{reason:in_progress}` ran at **19.9% of `agent_turn_started`** over a four-hour window, and **30.0% of threads** contained at least one ten-minute-plus window in which the next send is answered 409. That figure is dominated by the reload route this PR does *not* cover, and should fall sharply once the fix already on `cloud/1.54`/`cloud/1.55` reaches the production stable arm — re-measure before citing it as this change's justification. --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Alexander Brown <drjkl@comfy.org> (cherry picked from commit 526ab68)
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords: 2
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
📦 Bundle Size
⚡ Performance Report
Scenario timings
Absolute values
Raw data{
"timestamp": "2026-10-22T13:31:47.158Z",
"gitSha": "1605103a675d2882174074b7f4c8644a22617c8b",
"branch": "christian-byrne/pm2033-cloud-156",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2017.9630000000088,
"styleRecalcs": 11,
"styleRecalcDurationMs": 2.695000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 239.753,
"heapDeltaBytes": 754472,
"heapUsedBytes": 67223784,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 5.080999999999995,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2005.5169999999976,
"styleRecalcs": 12,
"styleRecalcDurationMs": 3.4749999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 240.507,
"heapDeltaBytes": 1308828,
"heapUsedBytes": 70471948,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 5.195999999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66611570247934,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1673.7380000000144,
"styleRecalcs": 71,
"styleRecalcDurationMs": 15.274,
"layouts": 12,
"layoutDurationMs": 4.01,
"taskDurationMs": 467.44,
"heapDeltaBytes": -2294444,
"heapUsedBytes": 66280112,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 97.47899999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66534653465347,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1728.4820000000423,
"styleRecalcs": 74,
"styleRecalcDurationMs": 16.479,
"layouts": 12,
"layoutDurationMs": 4.488,
"taskDurationMs": 519.389,
"heapDeltaBytes": -2166028,
"heapUsedBytes": 65248172,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 111.605,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667307692307688,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1719.3080000000123,
"styleRecalcs": 30,
"styleRecalcDurationMs": 7.805999999999998,
"layouts": 6,
"layoutDurationMs": 1.1650000000000003,
"taskDurationMs": 212.73,
"heapDeltaBytes": 4162800,
"heapUsedBytes": 72169892,
"domNodes": 53,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 8.471,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66601941747573,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1705.8949999999982,
"styleRecalcs": 31,
"styleRecalcDurationMs": 8.534,
"layouts": 6,
"layoutDurationMs": 1.2760000000000002,
"taskDurationMs": 208.03999999999996,
"heapDeltaBytes": 3820232,
"heapUsedBytes": 72913312,
"domNodes": 53,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 8.681999999999995,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665048543689323,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 510.54099999998925,
"styleRecalcs": 16,
"styleRecalcDurationMs": 3.941,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 307.00000000000006,
"heapDeltaBytes": -6675828,
"heapUsedBytes": 61171360,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 106.599,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667741935483864,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 429.634999999962,
"styleRecalcs": 14,
"styleRecalcDurationMs": 3.067,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 283.44599999999997,
"heapDeltaBytes": 15298712,
"heapUsedBytes": 69912436,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 102.307,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384603,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 910.4690000000062,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 505.75199999999995,
"heapDeltaBytes": 10493084,
"heapUsedBytes": 92512884,
"domNodes": 0,
"jsHeapTotalBytes": 1736704,
"scriptDurationMs": 33.474999999999994,
"eventListeners": 0,
"totalBlockingTimeMs": 311,
"frameDurationMs": 27.775757575757574,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 860.7409999999618,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 457.68699999999995,
"heapDeltaBytes": 12092092,
"heapUsedBytes": 93068120,
"domNodes": 0,
"jsHeapTotalBytes": 2785280,
"scriptDurationMs": 34.068999999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 262,
"frameDurationMs": 26.26363636363636,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 703.1970000000172,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 276.8809999999999,
"heapDeltaBytes": 12127420,
"heapUsedBytes": 101090680,
"domNodes": 0,
"jsHeapTotalBytes": 528384,
"scriptDurationMs": 101.30299999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 95,
"frameDurationMs": 21.21212121212121,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 721.5190000000007,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 291.7649999999998,
"heapDeltaBytes": -14729500,
"heapUsedBytes": 80968580,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 99.034,
"eventListeners": 0,
"totalBlockingTimeMs": 121,
"frameDurationMs": 21.567647058823535,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "extension-clean-combined-draw",
"durationMs": 5625.452999999993,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.5069999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4808.2609999999995,
"heapDeltaBytes": 14161460,
"heapUsedBytes": 82850712,
"domNodes": -142,
"jsHeapTotalBytes": -10620928,
"scriptDurationMs": 3821.9979999999996,
"eventListeners": -70,
"totalBlockingTimeMs": 32,
"frameDurationMs": 21.337500000000002,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "extension-clean-combined-draw",
"durationMs": 5764.038999999968,
"styleRecalcs": 4,
"styleRecalcDurationMs": 1.2530000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5012.6720000000005,
"heapDeltaBytes": 21809060,
"heapUsedBytes": 100062240,
"domNodes": -142,
"jsHeapTotalBytes": -3280896,
"scriptDurationMs": 4035.584,
"eventListeners": -74,
"totalBlockingTimeMs": 19,
"frameDurationMs": 22.114230769230772,
"p95FrameDurationMs": 33.40000000000009
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 5291.427999999996,
"styleRecalcs": 6,
"styleRecalcDurationMs": 1.7470000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4630.201,
"heapDeltaBytes": 1405336,
"heapUsedBytes": 69289832,
"domNodes": -142,
"jsHeapTotalBytes": -10358784,
"scriptDurationMs": 3669.535,
"eventListeners": -70,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.1324,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 5176.535999999998,
"styleRecalcs": 3,
"styleRecalcDurationMs": 0.8959999999999992,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4491.854,
"heapDeltaBytes": -9173604,
"heapUsedBytes": 68878916,
"domNodes": -143,
"jsHeapTotalBytes": -8261632,
"scriptDurationMs": 3571.4359999999997,
"eventListeners": -82,
"totalBlockingTimeMs": 4,
"frameDurationMs": 20.748995983935743,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "large-graph-idle",
"durationMs": 2010.0490000000377,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.593999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 267.54299999999995,
"heapDeltaBytes": 14907116,
"heapUsedBytes": 88326800,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 21.769999999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2010.6269999999995,
"styleRecalcs": 11,
"styleRecalcDurationMs": 3.136999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 294.344,
"heapDeltaBytes": -11235056,
"heapUsedBytes": 68365616,
"domNodes": 0,
"jsHeapTotalBytes": 36864,
"scriptDurationMs": 22.891999999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2098.2650000000262,
"styleRecalcs": 70,
"styleRecalcDurationMs": 12.289,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1012.27,
"heapDeltaBytes": 10934340,
"heapUsedBytes": 89716092,
"domNodes": 0,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 557.4950000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666400000000003,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2149.5200000000523,
"styleRecalcs": 71,
"styleRecalcDurationMs": 13.703999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1050.2720000000002,
"heapDeltaBytes": 7673776,
"heapUsedBytes": 95725548,
"domNodes": 0,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 586.681,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665625000000002,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3086.6660000000365,
"styleRecalcs": 74,
"styleRecalcDurationMs": 14.100999999999999,
"layouts": 60,
"layoutDurationMs": 14.604000000000001,
"taskDurationMs": 1104.558,
"heapDeltaBytes": 5791928,
"heapUsedBytes": 96632760,
"domNodes": 24,
"jsHeapTotalBytes": 823296,
"scriptDurationMs": 556.053,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665945945945946,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3110.1360000000113,
"styleRecalcs": 74,
"styleRecalcDurationMs": 13.907,
"layouts": 60,
"layoutDurationMs": 14.65,
"taskDurationMs": 1102.3110000000001,
"heapDeltaBytes": 5954632,
"heapUsedBytes": 81369204,
"domNodes": 24,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 542.855,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2138.20400000003,
"styleRecalcs": 48,
"styleRecalcDurationMs": 7.888000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1224.866,
"heapDeltaBytes": 3292916,
"heapUsedBytes": 71558168,
"domNodes": 0,
"jsHeapTotalBytes": 1572864,
"scriptDurationMs": 661.6730000000001,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665625,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2173.0289999999854,
"styleRecalcs": 47,
"styleRecalcDurationMs": 7.639999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1226.3120000000001,
"heapDeltaBytes": -16081352,
"heapUsedBytes": 71385248,
"domNodes": 0,
"jsHeapTotalBytes": 1347584,
"scriptDurationMs": 641.389,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384614,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "minimap-idle",
"durationMs": 2003.678999999977,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.2430000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 264.59,
"heapDeltaBytes": -9535584,
"heapUsedBytes": 80112876,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 16.602000000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2004.6590000000037,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.7810000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 292.939,
"heapDeltaBytes": -10499796,
"heapUsedBytes": 78117020,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 24.345999999999993,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66611570247934,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 433.7600000000066,
"styleRecalcs": 48,
"styleRecalcDurationMs": 6.519,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 283.37100000000004,
"heapDeltaBytes": -11543164,
"heapUsedBytes": 57902264,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 98.85900000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384603,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 398.05999999998676,
"styleRecalcs": 49,
"styleRecalcDurationMs": 5.9289999999999985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 264.201,
"heapDeltaBytes": -11827776,
"heapUsedBytes": 57636992,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 94.045,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2007.9569999999762,
"styleRecalcs": 13,
"styleRecalcDurationMs": 3.6869999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 236.08599999999996,
"heapDeltaBytes": 1529168,
"heapUsedBytes": 70754036,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 5.396000000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2009.7640000000183,
"styleRecalcs": 11,
"styleRecalcDurationMs": 2.928,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 228.885,
"heapDeltaBytes": 1156944,
"heapUsedBytes": 71461408,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 4.778,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66611570247934,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1680.168999999978,
"styleRecalcs": 75,
"styleRecalcDurationMs": 15.978,
"layouts": 16,
"layoutDurationMs": 5.329,
"taskDurationMs": 467.3349999999999,
"heapDeltaBytes": -5830352,
"heapUsedBytes": 64942220,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 80.48700000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666336633663366,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1679.234000000008,
"styleRecalcs": 75,
"styleRecalcDurationMs": 16.113000000000003,
"layouts": 16,
"layoutDurationMs": 5.41,
"taskDurationMs": 488.56699999999995,
"heapDeltaBytes": -5819940,
"heapUsedBytes": 63632692,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 82.686,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666336633663366,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 800.8839999999964,
"styleRecalcs": 18,
"styleRecalcDurationMs": 18.894999999999996,
"layouts": 5,
"layoutDurationMs": 8.845999999999998,
"taskDurationMs": 565.5150000000001,
"heapDeltaBytes": -664668,
"heapUsedBytes": 90116536,
"domNodes": 14227,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 19.189999999999998,
"eventListeners": 2463,
"totalBlockingTimeMs": 58,
"frameDurationMs": 19.049999999999986,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8103.852000000017,
"styleRecalcs": 250,
"styleRecalcDurationMs": 40.225,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3629.6130000000003,
"heapDeltaBytes": -19133144,
"heapUsedBytes": 69069908,
"domNodes": 0,
"jsHeapTotalBytes": 823296,
"scriptDurationMs": 1910.438,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665843621399176,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8237.167999999998,
"styleRecalcs": 251,
"styleRecalcDurationMs": 41.214999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3742.1689999999994,
"heapDeltaBytes": 9578976,
"heapUsedBytes": 82414668,
"domNodes": 0,
"jsHeapTotalBytes": 749568,
"scriptDurationMs": 1950.3500000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.699797160243406,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 11569.581000000027,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10536.701,
"heapDeltaBytes": -30840812,
"heapUsedBytes": 182501580,
"domNodes": -3045,
"jsHeapTotalBytes": 10833920,
"scriptDurationMs": 153.74500000000003,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 19.87319587628866,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "vue-large-graph-idle",
"durationMs": 10534.57800000001,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9756.820000000002,
"heapDeltaBytes": -46691340,
"heapUsedBytes": 180658928,
"domNodes": -3045,
"jsHeapTotalBytes": 2990080,
"scriptDurationMs": 130.514,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.702521008403366,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-large-graph-pan",
"durationMs": 14189.66499999999,
"styleRecalcs": 65,
"styleRecalcDurationMs": 12.876999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13783.419,
"heapDeltaBytes": -50332476,
"heapUsedBytes": 174862468,
"domNodes": -3045,
"jsHeapTotalBytes": 9752576,
"scriptDurationMs": 596.081,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 25.877636363636366,
"p95FrameDurationMs": 50
},
{
"name": "vue-large-graph-pan",
"durationMs": 14113.528999999971,
"styleRecalcs": 67,
"styleRecalcDurationMs": 12.755000000000017,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13770.941,
"heapDeltaBytes": -37352612,
"heapUsedBytes": 192480016,
"domNodes": -3045,
"jsHeapTotalBytes": 5959680,
"scriptDurationMs": 616.375,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 26.64052532833021,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "vue-node-resize-workload",
"durationMs": 3944.4090000000074,
"styleRecalcs": 20,
"styleRecalcDurationMs": 49.596000000000004,
"layouts": 20,
"layoutDurationMs": 19.210000000000004,
"taskDurationMs": 3827.007,
"heapDeltaBytes": 1170244,
"heapUsedBytes": 218538344,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 59.263,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 23.001169590643272,
"p95FrameDurationMs": 50
},
{
"name": "vue-node-resize-workload",
"durationMs": 4102.155000000039,
"styleRecalcs": 20,
"styleRecalcDurationMs": 51.237,
"layouts": 20,
"layoutDurationMs": 19.247999999999994,
"taskDurationMs": 3945.483,
"heapDeltaBytes": 935328,
"heapUsedBytes": 217140032,
"domNodes": 0,
"jsHeapTotalBytes": 1310720,
"scriptDurationMs": 61.224000000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 24.403571428571436,
"p95FrameDurationMs": 50
},
{
"name": "vue-zoom-out-idle",
"durationMs": 5774.547999999982,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5281.238,
"heapDeltaBytes": -28025552,
"heapUsedBytes": 186555664,
"domNodes": -3045,
"jsHeapTotalBytes": 15347712,
"scriptDurationMs": 79.648,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 19.547118644067794,
"p95FrameDurationMs": 33.400000000001455
},
{
"name": "vue-zoom-out-idle",
"durationMs": 5528.516999999965,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5040.310999999999,
"heapDeltaBytes": -23646804,
"heapUsedBytes": 187578464,
"domNodes": -3046,
"jsHeapTotalBytes": 16351232,
"scriptDurationMs": 73.334,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.382392026578067,
"p95FrameDurationMs": 33.30000000000109
},
{
"name": "workflow-execution",
"durationMs": 87.79800000002069,
"styleRecalcs": 7,
"styleRecalcDurationMs": 10.371000000000002,
"layouts": 4,
"layoutDurationMs": 1.4559999999999997,
"taskDurationMs": 60.493,
"heapDeltaBytes": 3898896,
"heapUsedBytes": 62516888,
"domNodes": 115,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 7.69,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "workflow-execution",
"durationMs": 89.51799999999821,
"styleRecalcs": 7,
"styleRecalcDurationMs": 8.267999999999999,
"layouts": 3,
"layoutDurationMs": 1.253,
"taskDurationMs": 52.251999999999995,
"heapDeltaBytes": 3720124,
"heapUsedBytes": 62010448,
"domNodes": 114,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 4.316000000000001,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000036,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 368.28400000001693,
"styleRecalcs": 78,
"styleRecalcDurationMs": 68.313,
"layouts": 76,
"layoutDurationMs": 16.404,
"taskDurationMs": 324.081,
"heapDeltaBytes": 12668492,
"heapUsedBytes": 85301300,
"domNodes": 76,
"jsHeapTotalBytes": 8388608,
"scriptDurationMs": 100.985,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66818181818181,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 373.61699999996745,
"styleRecalcs": 78,
"styleRecalcDurationMs": 67.128,
"layouts": 76,
"layoutDurationMs": 17.410999999999998,
"taskDurationMs": 338.974,
"heapDeltaBytes": 12895708,
"heapUsedBytes": 86106856,
"domNodes": 76,
"jsHeapTotalBytes": 9699328,
"scriptDurationMs": 110.501,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66956521739131,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 723.8879999999881,
"styleRecalcs": 78,
"styleRecalcDurationMs": 185.15400000000002,
"layouts": 76,
"layoutDurationMs": 22.200999999999997,
"taskDurationMs": 687.038,
"heapDeltaBytes": 3383676,
"heapUsedBytes": 111481092,
"domNodes": 76,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 177.024,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665116279069775,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 675.2170000000888,
"styleRecalcs": 78,
"styleRecalcDurationMs": 191.387,
"layouts": 76,
"layoutDurationMs": 22.808,
"taskDurationMs": 647.076,
"heapDeltaBytes": -17631512,
"heapUsedBytes": 109005428,
"domNodes": 76,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 154.307,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.699999999999818
}
]
}🔬 E2E CoverageLine coverage: 64.2% Coverage totals
Top 10 files by uncovered lines
🎭 Playwright: ✅ 2205 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 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 🌾 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 1029906e8b2e8bf71cefa61080bcf1d8f0066ff8
Full docs: ADR-DEVEX-LINT-0015 |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## cloud/1.56 #21685 +/- ##
=============================================
Coverage ? 84.59%
=============================================
Files ? 2578
Lines ? 147294
Branches ? 36781
=============================================
Hits ? 124605
Misses ? 22302
Partials ? 387
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.
Backport review (author-side; GitHub refuses self-approval, so this is a COMMENT).
- Diff matches #19901:
git range-diffshows an identical patch; only one hunk's context differs (releaseSendGate()oncloud/1.56). No follow-up fix to this code exists onmain. - Red on the parent, green here: the new spec fails at
stopButton"element(s) not found" withcloud/1.56'suseAgentSession.ts, passes at this head. - Exact-head CI green and the target-aware merge-ready gate passed at
84d7000c79oncloud/1.56@1029906e8b.
Full context for agent readers
- Authority: standing Agent backport review/merge grant for the current
cloud/1.56train (program release-backport authority, Christian 2026-09-16, current-train corrections 2026-10-09/10). - Applicability: source
526ab68265is oncloud/1.57, absent fromcloud/1.56; no othercloud/1.56carrier for #19901 exists. Cloud Agent only, so nocore/1.56carrier. - PM-2103 send-failure telemetry on
cloud/1.56is preserved:reportErrortags are untouched; only the user-facing notice copy changes on a reattached refusal. - Local harness,
--project=cloud, backend :8188:agentSendRefusedByRunningTurnred on parent (Stop not visible, 20s), then it plusagentTurnSurvivesRefreshandagentTurnSurvivesSocketDrop9/9 passed at this head. - Hosted:
playwright-video-new-tests (cloud)ran this spec, 1 passed; all four cloud shards,lint-and-format,test,e2e-statussuccess.codecov/patch(informational) hung in progress for 40 min; re-runningupload-e2e-coverage / packagemade Codecov post a fresh success (100% of modified lines covered). - No human reviews, no review threads, no objections.
Summary
Backports the running-turn conflict recovery from #19901 to cloud/1.56 for PM-2033.
Human owner:
@christian-byrneChanges
TURN_IN_PROGRESSresponse and adopt the active assistant turn.Review Focus
This is a clean cherry-pick of
526ab682653from #19901. It is Cloud Agent-only, so no core/1.56 carrier is needed.Testing
NODE_OPTIONS=--no-experimental-webstorage pnpm exec vitest run src/workbench/extensions/agent/composables/agent/useAgentSession.test.ts src/workbench/extensions/agent/composables/agent/useAgentSessionEvents.test.ts src/workbench/extensions/agent/composables/agent/useAgentSessionThread.test.ts src/workbench/extensions/agent/composables/agent/useAgentSessionMessages.test.tsPLAYWRIGHT_SETUP_API_URL=http://127.0.0.1:8188 PLAYWRIGHT_TEST_URL=http://127.0.0.1:6247 DISTRIBUTION=cloud pnpm exec playwright test browser_tests/tests/agent/agentSendRefusedByRunningTurn.spec.ts --project=cloud --workers=1pnpm typecheck:apppnpm typecheck:browser