Repository navigation
[backport cloud/1.57] fix(agent): restore a completed turn's thinking on reload and chat switch (PM-717) (#21600) - #22105
christian-byrne wants to merge 2 commits into
Conversation
…itch (PM-717) (#21600) - Reopening a chat from history lost the thinking. Tool calls stayed. - The transcript now restores `content.thinking` into the Worked trace, each entry at its round. - Needs Comfy-Org/cloud#14903 to persist the field. Until that lands this is a no-op. Tracks [PM-717](https://linear.app/comfyorg/issue/PM-717) (fresh Windows QA report, case Q4: "Thinking and tool call summary survive a chat switch"). <details><summary>Full context for agent readers</summary> **Before.** `hydrate()` replaces the conversation with `normalizeAgentTranscript(history)`. An assistant row contributed tool parts from `content.tool_calls` (FE #18282) and its reply text, and nothing else. The thinking the live turn streamed through `agent_thinking` existed only in memory, so after New Chat → reopen, or after a reload, the Worked trace showed tool rows only. That matches the reporter's screenshots. **After.** Comfy-Org/cloud#14903 stores each round's live thinking text on the completed row: ```json "thinking": [{ "text": "...", "tool_call_id": "call-1" }, { "text": "..." }] ``` `appendAssistantContent` restores each entry as a done `ThinkingPart` in front of the tool part whose `callId` matches `tool_call_id`. An entry with no anchor, or one whose call is not in the transcript, goes after the calls and before the reply. Entries are parsed one at a time with `zPersistedThinkingEntry.safeParse`. A malformed or blank entry is skipped, and the row still loads. No rendering change: `WorkSummary`/`ActivityTrace` already render thinking parts. - **Black-box harness, red → green.** `agentToolCallHistoryPersistence.spec.ts` now mocks the history row with `content.thinking` (the cloud#14903 contract). It asserts the trace reads `thinking, Search nodes, thinking, Add node, thinking` after a reload and again after New Chat → reopen from history. - On parent `7178296cf5`: **fails**. Received only `Search nodes, Add node`. - On this head: **passes**. - Unit: one new `agentTranscript.test.ts` case covers a malformed or blank entry being skipped, and a missing-call anchor falling after the calls. - `vitest run src/workbench/extensions/agent/`: 178 files, 4038 passed, 1 expected fail. - `pnpm typecheck`, eslint, oxfmt, pre-commit, pre-push (knip/fallow): clean. - Local setup: cloud-distribution dev server with `VITE_USE_LEGACY_DEFAULT_GRAPH=true`, own backend container (ci image 0.0.28), `--project=cloud --retries=0`, Node 26.10, Chromium. - Screenshots were inspected locally. Before: the expanded Worked trace holds two tool rows and no thinking. After the chat switch: thinking rows sit between and after the tool rows, and the layout is intact. </details> (cherry picked from commit 5d44835)
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords: 2
Please check the settings in the CodeRabbit UI or the
|
📦 Bundle Size
⚡ Performance Report
Scenario timings
Absolute values
Raw data{
"timestamp": "2026-10-28T03:00:38.390Z",
"gitSha": "aa678ca0b6e101de6652ff119b9ab965d55a14d7",
"branch": "backport-21600-to-cloud-1.57",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2008.5339999999974,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.1909999999999994,
"layouts": 9,
"layoutDurationMs": 3.3249999999999997,
"taskDurationMs": 624.878,
"heapDeltaBytes": -893912,
"heapUsedBytes": 74916708,
"domNodes": 0,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 14.306999999999997,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 2024.0830000000187,
"styleRecalcs": 11,
"styleRecalcDurationMs": 3.6439999999999997,
"layouts": 11,
"layoutDurationMs": 4.068,
"taskDurationMs": 662.181,
"heapDeltaBytes": -928440,
"heapUsedBytes": 74512096,
"domNodes": 0,
"jsHeapTotalBytes": 7864320,
"scriptDurationMs": 15.708,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1891.4749999999572,
"styleRecalcs": 79,
"styleRecalcDurationMs": 18.311999999999998,
"layouts": 9,
"layoutDurationMs": 2.8899999999999997,
"taskDurationMs": 981.8269999999999,
"heapDeltaBytes": -7252500,
"heapUsedBytes": 68103448,
"domNodes": 0,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 183.444,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665486725663715,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1859.7069999999576,
"styleRecalcs": 77,
"styleRecalcDurationMs": 16.369,
"layouts": 10,
"layoutDurationMs": 2.5129999999999995,
"taskDurationMs": 961.6370000000001,
"heapDeltaBytes": -7287476,
"heapUsedBytes": 68596264,
"domNodes": 0,
"jsHeapTotalBytes": 7864320,
"scriptDurationMs": 177.925,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665765765765762,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1699.1550000000188,
"styleRecalcs": 18,
"styleRecalcDurationMs": 6.296000000000001,
"layouts": 10,
"layoutDurationMs": 2.894,
"taskDurationMs": 361.63900000000007,
"heapDeltaBytes": 18767640,
"heapUsedBytes": 84628644,
"domNodes": 47,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 16.379,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1724.091000000044,
"styleRecalcs": 18,
"styleRecalcDurationMs": 5.293000000000001,
"layouts": 11,
"layoutDurationMs": 2.693,
"taskDurationMs": 408.866,
"heapDeltaBytes": -4501932,
"heapUsedBytes": 71022240,
"domNodes": 47,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 12.759000000000002,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384614,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 741.989999999987,
"styleRecalcs": 12,
"styleRecalcDurationMs": 2.688,
"layouts": 8,
"layoutDurationMs": 2.9139999999999997,
"taskDurationMs": 480.097,
"heapDeltaBytes": 25275712,
"heapUsedBytes": 92009636,
"domNodes": 0,
"jsHeapTotalBytes": 3407872,
"scriptDurationMs": 179.194,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.668181818181832,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 760.042999999996,
"styleRecalcs": 14,
"styleRecalcDurationMs": 3.3649999999999998,
"layouts": 10,
"layoutDurationMs": 2.97,
"taskDurationMs": 545.233,
"heapDeltaBytes": 3923048,
"heapUsedBytes": 79365708,
"domNodes": 0,
"jsHeapTotalBytes": 8388608,
"scriptDurationMs": 182.289,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1337.3269999999593,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1075.9050000000002,
"heapDeltaBytes": -13573736,
"heapUsedBytes": 81229796,
"domNodes": -212,
"jsHeapTotalBytes": 20455424,
"scriptDurationMs": 85.46799999999999,
"eventListeners": -106,
"totalBlockingTimeMs": 632,
"frameDurationMs": 35.086842105263166,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1317.448000000013,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1056.894,
"heapDeltaBytes": 609504,
"heapUsedBytes": 81225836,
"domNodes": -212,
"jsHeapTotalBytes": 14426112,
"scriptDurationMs": 75.85799999999999,
"eventListeners": -106,
"totalBlockingTimeMs": 621,
"frameDurationMs": 34.64736842105264,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 855.3980000000365,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 515.4440000000004,
"heapDeltaBytes": -4789916,
"heapUsedBytes": 76129216,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 164.572,
"eventListeners": 0,
"totalBlockingTimeMs": 222,
"frameDurationMs": 24.9970588235294,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 870.9920000000011,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 530.5790000000004,
"heapDeltaBytes": -4262564,
"heapUsedBytes": 76544408,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 170.56299999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 224,
"frameDurationMs": 25.488235294117658,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "extension-clean-combined-draw",
"durationMs": 12401.468999999992,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11432.881,
"heapDeltaBytes": -4496880,
"heapUsedBytes": 90322392,
"domNodes": -278,
"jsHeapTotalBytes": 3010560,
"scriptDurationMs": 9318.675000000001,
"eventListeners": -68,
"totalBlockingTimeMs": 1812,
"frameDurationMs": 33.42183288409703,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10949.71899999996,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10148.81,
"heapDeltaBytes": 2509952,
"heapUsedBytes": 96635708,
"domNodes": -258,
"jsHeapTotalBytes": 3796992,
"scriptDurationMs": 8233.951,
"eventListeners": -68,
"totalBlockingTimeMs": 1243,
"frameDurationMs": 31.284285714285716,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 11573.256000000016,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10713.195000000002,
"heapDeltaBytes": 2934992,
"heapUsedBytes": 97024676,
"domNodes": -258,
"jsHeapTotalBytes": 6156288,
"scriptDurationMs": 8675.767,
"eventListeners": -68,
"totalBlockingTimeMs": 1702,
"frameDurationMs": 31.77554945054945,
"p95FrameDurationMs": 66.69999999999891
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 11359.96499999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10589.412,
"heapDeltaBytes": -12128312,
"heapUsedBytes": 87572956,
"domNodes": -258,
"jsHeapTotalBytes": 4583424,
"scriptDurationMs": 8597.06,
"eventListeners": -68,
"totalBlockingTimeMs": 1384,
"frameDurationMs": 31.880898876404494,
"p95FrameDurationMs": 66.60000000000036
},
{
"name": "large-combo-open",
"durationMs": 250.01900000000887,
"styleRecalcs": 23,
"styleRecalcDurationMs": 17.406,
"layouts": 11,
"layoutDurationMs": 3.787,
"taskDurationMs": 192.582,
"heapDeltaBytes": -7528524,
"heapUsedBytes": 80094960,
"domNodes": 917,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 10.107,
"eventListeners": 196,
"totalBlockingTimeMs": 4,
"frameDurationMs": 25,
"p95FrameDurationMs": 100
},
{
"name": "large-combo-open",
"durationMs": 243.00800000003164,
"styleRecalcs": 23,
"styleRecalcDurationMs": 18.54,
"layouts": 11,
"layoutDurationMs": 3.377,
"taskDurationMs": 189.505,
"heapDeltaBytes": -7534088,
"heapUsedBytes": 80323248,
"domNodes": 917,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 9.994000000000002,
"eventListeners": 196,
"totalBlockingTimeMs": 1,
"frameDurationMs": 25,
"p95FrameDurationMs": 100
},
{
"name": "large-graph-idle",
"durationMs": 2057.688999999982,
"styleRecalcs": 7,
"styleRecalcDurationMs": 2.3689999999999998,
"layouts": 7,
"layoutDurationMs": 2.366,
"taskDurationMs": 603.448,
"heapDeltaBytes": -2331504,
"heapUsedBytes": 76524848,
"domNodes": -258,
"jsHeapTotalBytes": 2748416,
"scriptDurationMs": 39.732,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666129032258066,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2072.3369999999477,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.7030000000000007,
"layouts": 8,
"layoutDurationMs": 2.5610000000000004,
"taskDurationMs": 761.8050000000001,
"heapDeltaBytes": -18900168,
"heapUsedBytes": 77727904,
"domNodes": -258,
"jsHeapTotalBytes": 4096000,
"scriptDurationMs": 40.4,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66612903225806,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2817.196000000024,
"styleRecalcs": 68,
"styleRecalcDurationMs": 6.886,
"layouts": 7,
"layoutDurationMs": 2.396,
"taskDurationMs": 1844.9879999999998,
"heapDeltaBytes": 329812,
"heapUsedBytes": 77837552,
"domNodes": -278,
"jsHeapTotalBytes": 3235840,
"scriptDurationMs": 886.1940000000001,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66568047337278,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2933.721999999989,
"styleRecalcs": 68,
"styleRecalcDurationMs": 6.854999999999999,
"layouts": 7,
"layoutDurationMs": 2.115,
"taskDurationMs": 1907.0259999999998,
"heapDeltaBytes": -10524728,
"heapUsedBytes": 67002792,
"domNodes": -278,
"jsHeapTotalBytes": 3010560,
"scriptDurationMs": 901.07,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66590909090909,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 4056.096000000025,
"styleRecalcs": 70,
"styleRecalcDurationMs": 8.24,
"layouts": 63,
"layoutDurationMs": 10.869,
"taskDurationMs": 2015.1700000000003,
"heapDeltaBytes": -31931288,
"heapUsedBytes": 67716308,
"domNodes": -234,
"jsHeapTotalBytes": 5144576,
"scriptDurationMs": 876.283,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.734567901234563,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3953.6620000000084,
"styleRecalcs": 70,
"styleRecalcDurationMs": 8.043999999999999,
"layouts": 64,
"layoutDurationMs": 11.248000000000001,
"taskDurationMs": 1854.9509999999998,
"heapDeltaBytes": 5926640,
"heapUsedBytes": 88001656,
"domNodes": 24,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 825.976,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.7364406779661,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3267.563999999993,
"styleRecalcs": 43,
"styleRecalcDurationMs": 5.047999999999998,
"layouts": 4,
"layoutDurationMs": 1.3219999999999998,
"taskDurationMs": 2172.781,
"heapDeltaBytes": 1598876,
"heapUsedBytes": 85050096,
"domNodes": -258,
"jsHeapTotalBytes": 5001216,
"scriptDurationMs": 1041.1000000000001,
"eventListeners": -64,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.923711340206186,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3243.0779999999686,
"styleRecalcs": 44,
"styleRecalcDurationMs": 5.309999999999999,
"layouts": 5,
"layoutDurationMs": 1.689,
"taskDurationMs": 2172.787,
"heapDeltaBytes": 779012,
"heapUsedBytes": 84409072,
"domNodes": -258,
"jsHeapTotalBytes": 6049792,
"scriptDurationMs": 1038.252,
"eventListeners": -65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.839062499999997,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2055.3280000000314,
"styleRecalcs": 7,
"styleRecalcDurationMs": 2.416000000000001,
"layouts": 7,
"layoutDurationMs": 1.9980000000000002,
"taskDurationMs": 775.1309999999999,
"heapDeltaBytes": 6880248,
"heapUsedBytes": 85080988,
"domNodes": -258,
"jsHeapTotalBytes": -659456,
"scriptDurationMs": 40.894999999999996,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2045.7130000000916,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.601,
"layouts": 8,
"layoutDurationMs": 3.037,
"taskDurationMs": 575.903,
"heapDeltaBytes": -2102216,
"heapUsedBytes": 79391088,
"domNodes": -258,
"jsHeapTotalBytes": 3796992,
"scriptDurationMs": 36.91199999999999,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 751.0930000000258,
"styleRecalcs": 46,
"styleRecalcDurationMs": 5.637,
"layouts": 9,
"layoutDurationMs": 2.613,
"taskDurationMs": 512.943,
"heapDeltaBytes": -1121584,
"heapUsedBytes": 76346208,
"domNodes": 0,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 153.988,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 672.9759999999487,
"styleRecalcs": 46,
"styleRecalcDurationMs": 4.957,
"layouts": 9,
"layoutDurationMs": 2.569,
"taskDurationMs": 461.701,
"heapDeltaBytes": 3170256,
"heapUsedBytes": 80308416,
"domNodes": 0,
"jsHeapTotalBytes": 12582912,
"scriptDurationMs": 147.698,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66500000000001,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2045.10700000003,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.4810000000000008,
"layouts": 7,
"layoutDurationMs": 2.299,
"taskDurationMs": 657.181,
"heapDeltaBytes": -262632,
"heapUsedBytes": 77099708,
"domNodes": 0,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 13.541,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536587,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2015.0280000000294,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.136,
"layouts": 10,
"layoutDurationMs": 2.7899999999999996,
"taskDurationMs": 468.226,
"heapDeltaBytes": 22444712,
"heapUsedBytes": 89089012,
"domNodes": 0,
"jsHeapTotalBytes": 3407872,
"scriptDurationMs": 15.276,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66611570247934,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1987.5020000000063,
"styleRecalcs": 86,
"styleRecalcDurationMs": 19.024,
"layouts": 8,
"layoutDurationMs": 2.523,
"taskDurationMs": 1184.465,
"heapDeltaBytes": 11596144,
"heapUsedBytes": 79052468,
"domNodes": 0,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 130.933,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666386554621848,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1725.5059999999958,
"styleRecalcs": 77,
"styleRecalcDurationMs": 17.036,
"layouts": 8,
"layoutDurationMs": 2.259,
"taskDurationMs": 880.3899999999999,
"heapDeltaBytes": 11683704,
"heapUsedBytes": 79244276,
"domNodes": 0,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 119.366,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666019417475727,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1467.219,
"styleRecalcs": 18,
"styleRecalcDurationMs": 30.885999999999996,
"layouts": 5,
"layoutDurationMs": 15.675,
"taskDurationMs": 988.6389999999998,
"heapDeltaBytes": 35798204,
"heapUsedBytes": 115810544,
"domNodes": 15953,
"jsHeapTotalBytes": 11407360,
"scriptDurationMs": 48.586,
"eventListeners": 3244,
"totalBlockingTimeMs": 176,
"frameDurationMs": 20.319178082191783,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 10331.912999999986,
"styleRecalcs": 249,
"styleRecalcDurationMs": 20.438,
"layouts": 6,
"layoutDurationMs": 1.5759999999999996,
"taskDurationMs": 6535.519000000001,
"heapDeltaBytes": 9144616,
"heapUsedBytes": 87863108,
"domNodes": -258,
"jsHeapTotalBytes": 3989504,
"scriptDurationMs": 2913.9210000000003,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.692891760904686,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 9873.30600000007,
"styleRecalcs": 249,
"styleRecalcDurationMs": 19.607,
"layouts": 7,
"layoutDurationMs": 2.304,
"taskDurationMs": 6177.179000000001,
"heapDeltaBytes": 13873404,
"heapUsedBytes": 93203120,
"domNodes": -278,
"jsHeapTotalBytes": 3989504,
"scriptDurationMs": 2776.817,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.694077834179357,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 23633.658000000025,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 23186.153,
"heapDeltaBytes": -26547736,
"heapUsedBytes": 268362792,
"domNodes": -3330,
"jsHeapTotalBytes": 12046336,
"scriptDurationMs": 331.814,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 41.31538461538461,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "vue-large-graph-idle",
"durationMs": 17028.861000000004,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16408.907,
"heapDeltaBytes": -10355552,
"heapUsedBytes": 271314228,
"domNodes": -3330,
"jsHeapTotalBytes": 23060480,
"scriptDurationMs": 277.57300000000004,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 29.4681660899654,
"p95FrameDurationMs": 66.59999999999854
},
{
"name": "vue-large-graph-pan",
"durationMs": 29224.295000000042,
"styleRecalcs": 181,
"styleRecalcDurationMs": 21.310999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 28937.688,
"heapDeltaBytes": -18696860,
"heapUsedBytes": 257627336,
"domNodes": -3330,
"jsHeapTotalBytes": 13357056,
"scriptDurationMs": 973.5420000000001,
"eventListeners": -651,
"totalBlockingTimeMs": 55,
"frameDurationMs": 55.36401515151515,
"p95FrameDurationMs": 116.60000000000218
},
{
"name": "vue-large-graph-pan",
"durationMs": 27935.959999999908,
"styleRecalcs": 181,
"styleRecalcDurationMs": 16.842999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 27628.905999999995,
"heapDeltaBytes": -28640172,
"heapUsedBytes": 271842424,
"domNodes": -3330,
"jsHeapTotalBytes": 10215424,
"scriptDurationMs": 870.354,
"eventListeners": -651,
"totalBlockingTimeMs": 50,
"frameDurationMs": 51.88754646840148,
"p95FrameDurationMs": 100.10000000000036
},
{
"name": "vue-node-resize-workload",
"durationMs": 8708.582999999977,
"styleRecalcs": 20,
"styleRecalcDurationMs": 75.04699999999997,
"layouts": 20,
"layoutDurationMs": 25.785000000000004,
"taskDurationMs": 8575.134,
"heapDeltaBytes": -36988108,
"heapUsedBytes": 259007016,
"domNodes": -3330,
"jsHeapTotalBytes": 16764928,
"scriptDurationMs": 134.174,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 50.579651162790704,
"p95FrameDurationMs": 100.09999999999854
},
{
"name": "vue-node-resize-workload",
"durationMs": 8274.085000000014,
"styleRecalcs": 20,
"styleRecalcDurationMs": 73.28599999999999,
"layouts": 20,
"layoutDurationMs": 22.092,
"taskDurationMs": 8109.905999999999,
"heapDeltaBytes": -31607880,
"heapUsedBytes": 269241480,
"domNodes": -3330,
"jsHeapTotalBytes": 17289216,
"scriptDurationMs": 167.586,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 46.27430167597765,
"p95FrameDurationMs": 100
},
{
"name": "vue-zoom-out-idle",
"durationMs": 12222.758999999996,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11705.923999999999,
"heapDeltaBytes": -24282292,
"heapUsedBytes": 250589760,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 178.39100000000008,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 42.47534722222221,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "vue-zoom-out-idle",
"durationMs": 11521.968000000015,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11368.454000000002,
"heapDeltaBytes": 9113028,
"heapUsedBytes": 276883492,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 163.628,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 41.188928571428576,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "workflow-execution",
"durationMs": 142.1420000000353,
"styleRecalcs": 11,
"styleRecalcDurationMs": 10.96,
"layouts": 9,
"layoutDurationMs": 6.703,
"taskDurationMs": 109.331,
"heapDeltaBytes": -10367804,
"heapUsedBytes": 69143984,
"domNodes": 116,
"jsHeapTotalBytes": 9437184,
"scriptDurationMs": 9.444999999999999,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666615,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "workflow-execution",
"durationMs": 140.79000000003816,
"styleRecalcs": 8,
"styleRecalcDurationMs": 10.463000000000001,
"layouts": 8,
"layoutDurationMs": 3.4960000000000004,
"taskDurationMs": 102.613,
"heapDeltaBytes": -15474904,
"heapUsedBytes": 68208304,
"domNodes": 94,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 6.810999999999999,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 19.042857142857105,
"p95FrameDurationMs": 33.40000000000009
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 633.9309999999614,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.495,
"layouts": 76,
"layoutDurationMs": 18.037000000000003,
"taskDurationMs": 587.163,
"heapDeltaBytes": 13270672,
"heapUsedBytes": 96221524,
"domNodes": 4,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 291.39200000000005,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664102564102556,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 549.3039999998928,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.1280000000000001,
"layouts": 76,
"layoutDurationMs": 16.362000000000002,
"taskDurationMs": 501.659,
"heapDeltaBytes": -20617708,
"heapUsedBytes": 72880404,
"domNodes": 4,
"jsHeapTotalBytes": 12058624,
"scriptDurationMs": 247.999,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 600.8759999999711,
"styleRecalcs": 5,
"styleRecalcDurationMs": 2.5509999999999997,
"layouts": 76,
"layoutDurationMs": 15.056999999999999,
"taskDurationMs": 556.419,
"heapDeltaBytes": 716096,
"heapUsedBytes": 122758944,
"domNodes": 4,
"jsHeapTotalBytes": 1310720,
"scriptDurationMs": 226.387,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 664.3219999999701,
"styleRecalcs": 5,
"styleRecalcDurationMs": 2.693,
"layouts": 76,
"layoutDurationMs": 17.133,
"taskDurationMs": 623.527,
"heapDeltaBytes": 18913372,
"heapUsedBytes": 183166380,
"domNodes": 4,
"jsHeapTotalBytes": 9437184,
"scriptDurationMs": 248.831,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.094871794871814,
"p95FrameDurationMs": 16.800000000000182
}
]
}🔬 E2E CoverageLine coverage: 64.5% Coverage totals
Top 10 files by uncovered lines
🎭 Playwright: ✅ 2286 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 21364a588de45873cbbbd7c9e13e5de7ad85bf27
Full docs: ADR-DEVEX-LINT-0015 |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## cloud/1.57 #22105 +/- ##
=============================================
Coverage ? 84.13%
=============================================
Files ? 3006
Lines ? 160208
Branches ? 40811
=============================================
Hits ? 134789
Misses ? 25029
Partials ? 390
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
dante01yoon
left a comment
There was a problem hiding this comment.
Faithful cherry-pick of #21600: the production-code hunks in agentTranscript.ts, agentApiSchema.ts, and agentConversationStore.ts are byte-identical to upstream, and cloud/1.57 already has everything the patch assumes (ThinkingPart in agentMessageParts.ts, the relative-import style used, enMessages.agent.toolNotConfirmedOnCanvas, interleaveLocalParts/anchorLocalParts). The only adapted file is the browser spec's TRACE, which matches this branch's pre-existing toolNotConfirmedOnCanvas label for the Add node row, and the e2e/unit/typecheck checks on this PR pass. The bug itself is real: before this change there is no code path that restores content.thinking into the transcript at all, so a chat reopen genuinely drops a completed turn's thinking (tool rows only) — the spec's before/after description is accurate.
One blocking carry-over issue from the original PR (same code, so it applies here too) is anchored inline below.
| * One persisted `content.thinking` entry: a model round's thinking text, | ||
| * anchored to that round's first tool call when it made one. | ||
| */ | ||
| export const zPersistedThinkingEntry = z.object({ |
There was a problem hiding this comment.
issue: this hand-declares a full local schema for a server-response shape that @comfyorg/ingest-types already generates. packages/ingest-types/src/zod.gen.ts exports zAgentThinkingEntry = z.object({ text: z.string(), tool_call_id: z.string().optional() }), generated straight from AgentMessage.content.thinking's OpenAPI schema. Per this repo's rule on generated API types, a hand-declared copy like this silently drifts from the real contract (that's exactly what caused the two bugs in #14771).
The .nullish() vs .optional() difference looks intentional (same Go-nullable-pointer reasoning documented a few lines up for zPersistedToolCallSummary's tool_call_id override), but the fix for that is to extend the generated schema the same way zPersistedToolCallSummary already does — zToolCallSummary.extend({ tool_call_id: z.string().nullish(), ... }) — not to redeclare it from scratch:
export const zPersistedThinkingEntry = zAgentThinkingEntry.extend({
tool_call_id: z.string().nullish()
})This keeps text's type sourced from the generated contract so a future backend shape change (e.g. text becoming nullable, or a new field being added) shows up here instead of silently diverging. Could we switch this to extend zAgentThinkingEntry?
There was a problem hiding this comment.
Not possible on this branch: 1.57 generated types have no zAgentThinkingEntry (not in packages/ingest-types/src/zod.gen.ts here). Keeping the local copy so 1.57 matches its own contract. Main and the 1.58 backports now extend the generated schema: #22109.
dante01yoon
left a comment
There was a problem hiding this comment.
Your branch-specific correction is right: I checked this exact cloud/1.57 checkout, and neither generated zAgentThinkingEntry nor AgentThinkingEntry exists. The previous review's assertion that the export already existed on this train was incorrect.
issue: that absence means the generated contract dependency must be backported before this consumer; it does not make a full local response schema compliant. Please bring the generated shared-package schema onto this train, then derive zPersistedThinkingEntry from it, retaining the intentional null compatibility. Do not hand-edit generated output. This follows up on the existing inline #22105 (comment) rather than duplicating it.
Own validation on 653cb1544bd2e441b4514a84002344dbdc21074d, after fetching main and a separate frozen install: PASS 212 schema/transcript/conversation tests, app typecheck, cloud production build, full six-file type-aware Oxlint/format, production-file ESLint and Knip. ESLint ignores the three test/spec files; no lint coverage is claimed for them. Restored tests PASS 212. Removing thinking restoration fails 2 targeted transcript rows. Keeping local thinking alongside persisted thinking fails only the persisted-replacement row; deleting local thinking unconditionally fails only the legacy row-without-thinking case. The opposite row stays green in each mutation.
PASS the actual Chromium reload-and-chat-switch spec on this exact-head development app with a private local ComfyUI backend and controlled Agent history/auth responses. This is not production Cloud or live LLM evidence. All source mutations were restored; owned servers stopped.
Production Cloud, real persisted backend thinking and combined-main execution: NOT_RUN; no deployment or merge claim.
Repo rule: no added non-JSDoc comments. The branch-specific trace rationale is in the PR description.
dante01yoon
left a comment
There was a problem hiding this comment.
The release-note comment finding is resolved: the spec comment was removed at this head, and test behavior is unchanged.
The generated-schema finding is still open (#22105 (comment)). zPersistedThinkingEntry at agentApiSchema.ts:147 is still a hand-declared z.object. This branch's packages/ingest-types/src/zod.gen.ts has no zAgentThinkingEntry because the types update #21508 (cloud@2d86ea8c) was backported only to 1.58 (#21764 / #21765). Backporting #21508 to this branch first, the same way, would add the generated export. Then this PR can use the same zAgentThinkingEntry.pick({ text: true }).extend({ tool_call_id: z.string().nullish() }) as the 1.58 backports, along with #22109's explicit-null test.
The rest is a faithful copy of #21600 (merged as 5d44835). Every non-spec file is byte-identical to upstream, which is why this PR is +163 while the 1.58 backports are +178: those also carry #22109's 15-line explicit-null unit case. The spec is adapted to this branch's existing toolNotConfirmedOnCanvas Add node label.
Checks: the transcript, conversation-store and schema tests pass locally (212). CI is green.
|
Closing: no 1.57 user can hit this.
Full context for agent readers
|
|
@dante01yoon FYI on your backport-the-contract-first request here and on #22106: I closed both instead of porting #21508. No 1.57 user can reach this surface, so a 55-file port has nothing to protect. Your review stands as not addressed, not as done. If you see a 1.57 path I missed, reopen and I'll do the port. |
Backport of #21600 to
cloud/1.57.Full context for agent readers
Why this train.
cloud/1.57is a current Agent backport train and does not contain #21600 (merged to main as 5d44835). The backend half, Comfy-Org/cloud#14903, is already live on Comfy Cloud and in the local agent package, so the frontend is the missing piece for users on this train. Without the backend field the change is a no-op.Conflicts (auto cherry-pick failed).
agentTranscript.ts: import specifiers only. This branch uses relative paths; kept them and addedThinkingPart/zPersistedThinkingEntry. Logic hunks applied cleanly.agentToolCallHistoryPersistence.spec.ts: this branch already labels the restored Add node row as an unconfirmed canvas write (toolNotConfirmedOnCanvas). The expected trace keeps that label and adds the three thinking rows, matching upstream's order: thinking, Search nodes, thinking, Add node (unconfirmed), thinking.agentApiSchema.ts,agentConversationStore.tsand both unit test files applied cleanly.Verification. Local install/test runs were not possible on this host (it is heavily loaded; dependency install timed out), and the commit was pushed with hooks skipped for that reason. Hosted CI on this PR (lint-and-format, test, e2e) is the verification; the browser spec above is the red/green proof upstream (fails on the parent with only tool rows, passes with the fix).