Repository navigation
[backport cloud/1.58] fix(agent): restore a completed turn's thinking on reload and chat switch (PM-717) (#21600) - #22103
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:07:35.778Z",
"gitSha": "a53f5e6a078ff4fc13b114af101661060d88423b",
"branch": "backport-21600-to-cloud-1.58",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2026.6379999999913,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.7689999999999997,
"layouts": 9,
"layoutDurationMs": 2.731,
"taskDurationMs": 419.66400000000004,
"heapDeltaBytes": 3474168,
"heapUsedBytes": 93703416,
"domNodes": -200,
"jsHeapTotalBytes": 1638400,
"scriptDurationMs": 11.31,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66639344262295,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2026.3239999999882,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.543,
"layouts": 9,
"layoutDurationMs": 2.165,
"taskDurationMs": 383.249,
"heapDeltaBytes": 4322976,
"heapUsedBytes": 94627840,
"domNodes": -200,
"jsHeapTotalBytes": 851968,
"scriptDurationMs": 10.475,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665573770491804,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1695.8369999999832,
"styleRecalcs": 71,
"styleRecalcDurationMs": 11.769,
"layouts": 10,
"layoutDurationMs": 2.353,
"taskDurationMs": 670.4689999999999,
"heapDeltaBytes": -11953728,
"heapUsedBytes": 79412572,
"domNodes": -180,
"jsHeapTotalBytes": 1454080,
"scriptDurationMs": 124.32399999999998,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665686274509806,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1725.9470000000192,
"styleRecalcs": 72,
"styleRecalcDurationMs": 12.068999999999999,
"layouts": 9,
"layoutDurationMs": 2.08,
"taskDurationMs": 766.125,
"heapDeltaBytes": 862616,
"heapUsedBytes": 91177980,
"domNodes": -180,
"jsHeapTotalBytes": 2424832,
"scriptDurationMs": 125.47500000000001,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384614,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1724.4699999999966,
"styleRecalcs": 18,
"styleRecalcDurationMs": 4.428,
"layouts": 13,
"layoutDurationMs": 2.865,
"taskDurationMs": 329.83799999999997,
"heapDeltaBytes": 1807388,
"heapUsedBytes": 106472744,
"domNodes": 47,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 10.538000000000002,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846156,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1726.346000000035,
"styleRecalcs": 19,
"styleRecalcDurationMs": 5.2299999999999995,
"layouts": 11,
"layoutDurationMs": 3.0849999999999995,
"taskDurationMs": 280.122,
"heapDeltaBytes": -738552,
"heapUsedBytes": 89898188,
"domNodes": 47,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 12.58,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384614,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 566.5480000000116,
"styleRecalcs": 13,
"styleRecalcDurationMs": 2.5899999999999994,
"layouts": 9,
"layoutDurationMs": 2.2849999999999997,
"taskDurationMs": 410.24899999999997,
"heapDeltaBytes": 5903984,
"heapUsedBytes": 96372072,
"domNodes": 0,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 137.42399999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664705882352937,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 584.3179999999961,
"styleRecalcs": 14,
"styleRecalcDurationMs": 2.705,
"layouts": 10,
"layoutDurationMs": 2.601,
"taskDurationMs": 413.50999999999993,
"heapDeltaBytes": 3659640,
"heapUsedBytes": 93672268,
"domNodes": 0,
"jsHeapTotalBytes": 6815744,
"scriptDurationMs": 143.085,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66571428571429,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1039.7199999999884,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 685.211,
"heapDeltaBytes": -17962468,
"heapUsedBytes": 103130608,
"domNodes": -230,
"jsHeapTotalBytes": 15618048,
"scriptDurationMs": 52.453,
"eventListeners": -168,
"totalBlockingTimeMs": 381,
"frameDurationMs": 29.163888888888877,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1102.6360000000182,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 763.355,
"heapDeltaBytes": -15135368,
"heapUsedBytes": 102178344,
"domNodes": -210,
"jsHeapTotalBytes": 15540224,
"scriptDurationMs": 54.117,
"eventListeners": -168,
"totalBlockingTimeMs": 432,
"frameDurationMs": 30.555555555555557,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 782.4720000000127,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 406.622,
"heapDeltaBytes": -3698952,
"heapUsedBytes": 96795988,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 120.24099999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 162,
"frameDurationMs": 23.035294117647055,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 781.6339999999968,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 403.68100000000015,
"heapDeltaBytes": -4488272,
"heapUsedBytes": 97530900,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 117.674,
"eventListeners": 0,
"totalBlockingTimeMs": 158,
"frameDurationMs": 23.035294117647055,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "extension-clean-combined-draw",
"durationMs": 7753.146000000015,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6883.708,
"heapDeltaBytes": 32355400,
"heapUsedBytes": 137050076,
"domNodes": -296,
"jsHeapTotalBytes": 34668544,
"scriptDurationMs": 5592.3099999999995,
"eventListeners": -130,
"totalBlockingTimeMs": 209,
"frameDurationMs": 25.10714285714286,
"p95FrameDurationMs": 33.400000000001455
},
{
"name": "extension-clean-combined-draw",
"durationMs": 7409.983000000011,
"styleRecalcs": 3,
"styleRecalcDurationMs": 0.882,
"layouts": 3,
"layoutDurationMs": 0.755,
"taskDurationMs": 6583.8150000000005,
"heapDeltaBytes": -15763968,
"heapUsedBytes": 93697016,
"domNodes": -141,
"jsHeapTotalBytes": 12582912,
"scriptDurationMs": 5411.870000000001,
"eventListeners": -53,
"totalBlockingTimeMs": 53,
"frameDurationMs": 24.34111842105263,
"p95FrameDurationMs": 33.400000000001455
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 7381.921000000006,
"styleRecalcs": 3,
"styleRecalcDurationMs": 0.7660000000000002,
"layouts": 3,
"layoutDurationMs": 0.6849999999999998,
"taskDurationMs": 6616.426,
"heapDeltaBytes": 354772,
"heapUsedBytes": 114122864,
"domNodes": -276,
"jsHeapTotalBytes": 17182720,
"scriptDurationMs": 5101.45,
"eventListeners": -130,
"totalBlockingTimeMs": 139,
"frameDurationMs": 24.858585858585858,
"p95FrameDurationMs": 33.400000000001455
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 7385.295999999982,
"styleRecalcs": 3,
"styleRecalcDurationMs": 3.2049999999999996,
"layouts": 2,
"layoutDurationMs": 0.67,
"taskDurationMs": 6582.604,
"heapDeltaBytes": 36827400,
"heapUsedBytes": 140376516,
"domNodes": -296,
"jsHeapTotalBytes": 27590656,
"scriptDurationMs": 4975.207,
"eventListeners": -130,
"totalBlockingTimeMs": 38,
"frameDurationMs": 24.073202614379085,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "large-combo-open",
"durationMs": 185.91200000000185,
"styleRecalcs": 23,
"styleRecalcDurationMs": 12.34,
"layouts": 12,
"layoutDurationMs": 3.0100000000000002,
"taskDurationMs": 146.495,
"heapDeltaBytes": 13296072,
"heapUsedBytes": 118839564,
"domNodes": 917,
"jsHeapTotalBytes": 1835008,
"scriptDurationMs": 6.913999999999998,
"eventListeners": 196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 20.36666666666669,
"p95FrameDurationMs": 50
},
{
"name": "large-combo-open",
"durationMs": 171.621000000016,
"styleRecalcs": 22,
"styleRecalcDurationMs": 12.735999999999999,
"layouts": 11,
"layoutDurationMs": 2.9560000000000004,
"taskDurationMs": 130.25300000000001,
"heapDeltaBytes": 13284136,
"heapUsedBytes": 118817416,
"domNodes": 917,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 7.177999999999999,
"eventListeners": 196,
"totalBlockingTimeMs": 0,
"frameDurationMs": 20.36666666666669,
"p95FrameDurationMs": 50
},
{
"name": "large-graph-idle",
"durationMs": 2042.5380000000075,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.49,
"layouts": 9,
"layoutDurationMs": 2.032,
"taskDurationMs": 586.557,
"heapDeltaBytes": 174648,
"heapUsedBytes": 109934740,
"domNodes": -276,
"jsHeapTotalBytes": -1769472,
"scriptDurationMs": 33.502,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536587,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "large-graph-idle",
"durationMs": 2027.6160000000232,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.514,
"layouts": 8,
"layoutDurationMs": 2.351,
"taskDurationMs": 501.726,
"heapDeltaBytes": 297704,
"heapUsedBytes": 110911300,
"domNodes": -296,
"jsHeapTotalBytes": -983040,
"scriptDurationMs": 34.507000000000005,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665573770491804,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2718.517999999989,
"styleRecalcs": 70,
"styleRecalcDurationMs": 9.523,
"layouts": 8,
"layoutDurationMs": 1.919,
"taskDurationMs": 1471.3120000000001,
"heapDeltaBytes": -8431780,
"heapUsedBytes": 114155008,
"domNodes": -276,
"jsHeapTotalBytes": -118784,
"scriptDurationMs": 668.585,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666257668711655,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2767.8909999999632,
"styleRecalcs": 69,
"styleRecalcDurationMs": 9.514999999999999,
"layouts": 8,
"layoutDurationMs": 1.943,
"taskDurationMs": 1457.721,
"heapDeltaBytes": -15429204,
"heapUsedBytes": 108425560,
"domNodes": -297,
"jsHeapTotalBytes": -905216,
"scriptDurationMs": 680.11,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666265060240967,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3511.5990000000465,
"styleRecalcs": 70,
"styleRecalcDurationMs": 9.198000000000002,
"layouts": 63,
"layoutDurationMs": 9.624,
"taskDurationMs": 1513.822,
"heapDeltaBytes": -19404672,
"heapUsedBytes": 87013000,
"domNodes": -272,
"jsHeapTotalBytes": -1347584,
"scriptDurationMs": 649.647,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.745238095238093,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3308.3770000000072,
"styleRecalcs": 73,
"styleRecalcDurationMs": 11.199,
"layouts": 66,
"layoutDurationMs": 11.324999999999998,
"taskDurationMs": 1423.296,
"heapDeltaBytes": -13110792,
"heapUsedBytes": 100501692,
"domNodes": -272,
"jsHeapTotalBytes": 196608,
"scriptDurationMs": 660.1290000000001,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.7502538071066,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 2559.1890000000035,
"styleRecalcs": 46,
"styleRecalcDurationMs": 5.303,
"layouts": 7,
"layoutDurationMs": 1.5340000000000003,
"taskDurationMs": 1539.496,
"heapDeltaBytes": -11650168,
"heapUsedBytes": 103736568,
"domNodes": 0,
"jsHeapTotalBytes": 7081984,
"scriptDurationMs": 826.2689999999999,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.775000000000002,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2677.3529999999823,
"styleRecalcs": 46,
"styleRecalcDurationMs": 5.632,
"layouts": 6,
"layoutDurationMs": 1.5199999999999996,
"taskDurationMs": 1687.351,
"heapDeltaBytes": -12261572,
"heapUsedBytes": 102884932,
"domNodes": 0,
"jsHeapTotalBytes": 6295552,
"scriptDurationMs": 793.581,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.876100628930814,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2050.5600000000186,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.19,
"layouts": 8,
"layoutDurationMs": 1.9080000000000001,
"taskDurationMs": 557.5310000000001,
"heapDeltaBytes": -27153012,
"heapUsedBytes": 97062560,
"domNodes": -296,
"jsHeapTotalBytes": -1130496,
"scriptDurationMs": 29.156000000000002,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536584,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2038.7620000000197,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.214,
"layouts": 9,
"layoutDurationMs": 2.412,
"taskDurationMs": 477.719,
"heapDeltaBytes": -30057892,
"heapUsedBytes": 89611112,
"domNodes": -296,
"jsHeapTotalBytes": -2256896,
"scriptDurationMs": 37.499,
"eventListeners": -130,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536584,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 547.1579999999676,
"styleRecalcs": 47,
"styleRecalcDurationMs": 4.636,
"layouts": 9,
"layoutDurationMs": 2.023,
"taskDurationMs": 361.79499999999996,
"heapDeltaBytes": -1357412,
"heapUsedBytes": 89796280,
"domNodes": 0,
"jsHeapTotalBytes": 8388608,
"scriptDurationMs": 120.46500000000002,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666682,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 526.6149999999925,
"styleRecalcs": 46,
"styleRecalcDurationMs": 4.915,
"layouts": 9,
"layoutDurationMs": 2.2659999999999996,
"taskDurationMs": 327.889,
"heapDeltaBytes": -657060,
"heapUsedBytes": 90251740,
"domNodes": 0,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 122.552,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66562499999999,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2025.7110000000011,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.4469999999999996,
"layouts": 9,
"layoutDurationMs": 2.135,
"taskDurationMs": 378.079,
"heapDeltaBytes": 6181784,
"heapUsedBytes": 96994760,
"domNodes": -218,
"jsHeapTotalBytes": 1900544,
"scriptDurationMs": 9.069999999999999,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66639344262295,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2025.9880000000408,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.3159999999999994,
"layouts": 9,
"layoutDurationMs": 1.965,
"taskDurationMs": 505.46900000000005,
"heapDeltaBytes": -2555252,
"heapUsedBytes": 88891304,
"domNodes": -218,
"jsHeapTotalBytes": 1376256,
"scriptDurationMs": 9.892999999999999,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6655737704918,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1724.8899999999878,
"styleRecalcs": 76,
"styleRecalcDurationMs": 12.786,
"layouts": 9,
"layoutDurationMs": 2.1189999999999993,
"taskDurationMs": 760.0849999999999,
"heapDeltaBytes": 5260448,
"heapUsedBytes": 107451796,
"domNodes": -203,
"jsHeapTotalBytes": 11677696,
"scriptDurationMs": 94.64800000000001,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846153,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1724.410999999975,
"styleRecalcs": 76,
"styleRecalcDurationMs": 13.466000000000003,
"layouts": 9,
"layoutDurationMs": 2.0989999999999998,
"taskDurationMs": 771.299,
"heapDeltaBytes": -2408812,
"heapUsedBytes": 88462240,
"domNodes": -210,
"jsHeapTotalBytes": 1900544,
"scriptDurationMs": 96.26,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667307692307695,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 917.9159999999911,
"styleRecalcs": 20,
"styleRecalcDurationMs": 20.621000000000002,
"layouts": 5,
"layoutDurationMs": 12.283999999999999,
"taskDurationMs": 708.737,
"heapDeltaBytes": 35781500,
"heapUsedBytes": 139850592,
"domNodes": 16030,
"jsHeapTotalBytes": 16392192,
"scriptDurationMs": 23.153,
"eventListeners": 3244,
"totalBlockingTimeMs": 113,
"frameDurationMs": 20.37111111111111,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8194.809999999961,
"styleRecalcs": 250,
"styleRecalcDurationMs": 29.934999999999995,
"layouts": 8,
"layoutDurationMs": 1.921,
"taskDurationMs": 4175.752,
"heapDeltaBytes": 3299724,
"heapUsedBytes": 113431872,
"domNodes": -277,
"jsHeapTotalBytes": 28672,
"scriptDurationMs": 2110.688,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536584,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8210.618999999951,
"styleRecalcs": 250,
"styleRecalcDurationMs": 31.236,
"layouts": 8,
"layoutDurationMs": 2.0629999999999997,
"taskDurationMs": 4382.857,
"heapDeltaBytes": 3146196,
"heapUsedBytes": 113520960,
"domNodes": -296,
"jsHeapTotalBytes": -757760,
"scriptDurationMs": 2157.826,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665922920892495,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 14452.844999999968,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13864.716999999999,
"heapDeltaBytes": -41684952,
"heapUsedBytes": 292447204,
"domNodes": -3344,
"jsHeapTotalBytes": 40620032,
"scriptDurationMs": 206.15,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 25.8025,
"p95FrameDurationMs": 50
},
{
"name": "vue-large-graph-idle",
"durationMs": 19798.035999999913,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 19205.98,
"heapDeltaBytes": -41153776,
"heapUsedBytes": 278500740,
"domNodes": -3344,
"jsHeapTotalBytes": 19124224,
"scriptDurationMs": 266.17999999999995,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 36.094535519125685,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-large-graph-pan",
"durationMs": 23554.79200000002,
"styleRecalcs": 181,
"styleRecalcDurationMs": 22.758,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 23353.229,
"heapDeltaBytes": -24224064,
"heapUsedBytes": 294949912,
"domNodes": -3344,
"jsHeapTotalBytes": 10739712,
"scriptDurationMs": 769.3530000000001,
"eventListeners": -651,
"totalBlockingTimeMs": 35,
"frameDurationMs": 45.14501915708812,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "vue-large-graph-pan",
"durationMs": 23625.182999999994,
"styleRecalcs": 180,
"styleRecalcDurationMs": 22.451999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 23376.333,
"heapDeltaBytes": -30476864,
"heapUsedBytes": 294191924,
"domNodes": -3344,
"jsHeapTotalBytes": 11522048,
"scriptDurationMs": 771.5120000000001,
"eventListeners": -651,
"totalBlockingTimeMs": 56,
"frameDurationMs": 44.64234404536862,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "vue-node-resize-workload",
"durationMs": 7073.802000000001,
"styleRecalcs": 20,
"styleRecalcDurationMs": 51.532999999999994,
"layouts": 20,
"layoutDurationMs": 23.54500000000001,
"taskDurationMs": 6968.949,
"heapDeltaBytes": -48344460,
"heapUsedBytes": 280578552,
"domNodes": -3344,
"jsHeapTotalBytes": 19648512,
"scriptDurationMs": 124.08200000000001,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 40.15056818181818,
"p95FrameDurationMs": 83.30000000000109
},
{
"name": "vue-node-resize-workload",
"durationMs": 7015.811000000099,
"styleRecalcs": 20,
"styleRecalcDurationMs": 65.02200000000002,
"layouts": 20,
"layoutDurationMs": 27.467000000000006,
"taskDurationMs": 6901.987999999999,
"heapDeltaBytes": -41340468,
"heapUsedBytes": 279222468,
"domNodes": -3344,
"jsHeapTotalBytes": 15978496,
"scriptDurationMs": 99.74299999999998,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 39.54689265536724,
"p95FrameDurationMs": 83.30000000000109
},
{
"name": "vue-zoom-out-idle",
"durationMs": 9835.628999999983,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9545.189,
"heapDeltaBytes": 279092,
"heapUsedBytes": 292641616,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 130.594,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 36.553903345724905,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-zoom-out-idle",
"durationMs": 7199.486999999976,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6864.626999999999,
"heapDeltaBytes": 10261300,
"heapUsedBytes": 310519808,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 97.584,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 25.028222996515673,
"p95FrameDurationMs": 50
},
{
"name": "workflow-execution",
"durationMs": 103.44199999997272,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.188000000000002,
"layouts": 7,
"layoutDurationMs": 4.66,
"taskDurationMs": 83.68899999999998,
"heapDeltaBytes": 4966272,
"heapUsedBytes": 95568184,
"domNodes": 124,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 10.308,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 115.42600000007042,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.9030000000000005,
"layouts": 8,
"layoutDurationMs": 2.798,
"taskDurationMs": 85.36300000000001,
"heapDeltaBytes": 4682472,
"heapUsedBytes": 107114336,
"domNodes": 95,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 6.067000000000001,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.657142857142844,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 289.4450000000006,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.633,
"layouts": 76,
"layoutDurationMs": 11.662,
"taskDurationMs": 249.72,
"heapDeltaBytes": 10261856,
"heapUsedBytes": 99005760,
"domNodes": 4,
"jsHeapTotalBytes": 9961472,
"scriptDurationMs": 114.678,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 298.4189999999671,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.612,
"layouts": 76,
"layoutDurationMs": 11.547,
"taskDurationMs": 254.206,
"heapDeltaBytes": -19705064,
"heapUsedBytes": 69558040,
"domNodes": 4,
"jsHeapTotalBytes": 11010048,
"scriptDurationMs": 116.788,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666693,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 346.1660000000393,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.6980000000000002,
"layouts": 76,
"layoutDurationMs": 11.280999999999999,
"taskDurationMs": 307.99899999999997,
"heapDeltaBytes": -1319600,
"heapUsedBytes": 115624280,
"domNodes": 4,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 108.861,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 364.55900000009933,
"styleRecalcs": 5,
"styleRecalcDurationMs": 2.141,
"layouts": 76,
"layoutDurationMs": 11.171000000000001,
"taskDurationMs": 331.902,
"heapDeltaBytes": -1142816,
"heapUsedBytes": 115818152,
"domNodes": 4,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 121.077,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663636363636382,
"p95FrameDurationMs": 16.799999999999272
}
]
}🔬 E2E CoverageLine coverage: 63.7% Coverage totals
Top 10 files by uncovered lines
🎭 Playwright: ✅ 2985 passed, 0 failed · 2 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 2b6a504b0287562689fd0ed9cecc0e2d8f281c85
Full docs: ADR-DEVEX-LINT-0015 🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (131)
Reproduce locallypnpm architecture:checkFull docs: Frontend domain catalog |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## cloud/1.58 #22103 +/- ##
=============================================
Coverage ? 84.53%
=============================================
Files ? 3094
Lines ? 162941
Branches ? 38939
=============================================
Hits ? 137750
Misses ? 24800
Partials ? 391
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.58 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):
Unanchored: none — the one finding is anchored inline below.
…ed schema zPersistedThinkingEntry now extends ingest-types' zAgentThinkingEntry, overriding only tool_call_id to .nullish(), the same way zPersistedToolCallSummary extends zToolCallSummary. A unit case pins the explicit-null tool_call_id that the override exists for. (cherry picked from commit f3ae8d8)
dante01yoon
left a comment
There was a problem hiding this comment.
The author response is verified: this exact cloud/1.58 head now extends the generated zAgentThinkingEntry, so the earlier hand-declared-schema finding is addressed. I am not repeating that finding.
The remaining blocker is the added regular code comments under this branch's explicit engineering rule, anchored below. Remove the new three-line schema explanation and the revised release-note comment in the browser spec; the PR description already holds that rationale. No functional regression was established.
Own validation on d68f13f1ae6a73eb96ca2e3a32109f5cac39eddf, after fetching main and a separate frozen install: PASS 225 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 225. Removing thinking restoration fails 3 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.
Current external CI remains FAIL: the desktop job could not log in to ghcr.io before tests ran. No rerun was requested.
Drop the inline comment (repo rule) and narrow the generated schema to the field the reader uses, so a later regen that adds a required field does not drop historical thinking rows on reload. (cherry picked from commit 498373f)
Repo rule: no added non-JSDoc comments. The branch-specific trace rationale is in the PR description.
Stale over exact head 6a14b9c: the added schema explanation and revised browser-spec comment named by this review were removed; all review threads are resolved and current-head checks are green.
There was a problem hiding this comment.
Both earlier findings are resolved at this head. zPersistedThinkingEntry now picks text from the generated zAgentThinkingEntry, which this branch has through #21764, and only tool_call_id is overridden with .nullish(). The added schema comment and the release-note comment in the spec are both gone.
This matches #21600 (merged as 5d44835). The agentTranscript.ts, agentConversationStore.ts and agentConversationStore.test.ts hunks are identical to upstream. The browser spec is the upstream change adapted to this branch's existing toolNotConfirmedOnCanvas label on the Add node row. There are two intentional differences from upstream: the schema derivation, and one extra unit case for an explicit-null tool_call_id, both taken from #22109. The extra case is the whole +15 line gap between this PR and the 1.57 backports.
Checks: the transcript, conversation-store and schema tests pass locally (225). If zPersistedThinkingEntry is reduced to plain zAgentThinkingEntry, only the explicit-null case fails, so that test covers the .nullish() override. CI is green.
| * 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 = zAgentThinkingEntry |
There was a problem hiding this comment.
suggestion: this derivation and the explicit-null test come from #22109, which is still open on main. Could #22109 merge before this one, or together with it? Otherwise this release branch uses the generated schema while main keeps the hand-declared z.object, and the next backport of #21600-area code will conflict here.
…ed schema (Comfy-Org#22109) - Persisted thinking schema now extends the generated `zAgentThinkingEntry` instead of redeclaring it - Only `tool_call_id` is overridden (`.nullish()`), same as `zPersistedToolCallSummary` - No behavior change; unit case pins the explicit-null `tool_call_id` Review follow-up on Comfy-Org#21600, raised on its backports Comfy-Org#22103 and Comfy-Org#22104. Part of https://linear.app/comfyorg/issue/PM-2271. <details><summary>Full context for agent readers</summary> `@comfyorg/ingest-types` generates `zAgentThinkingEntry = z.object({ text: z.string(), tool_call_id: z.string().optional() })` from the `AgentMessage.content.thinking` OpenAPI schema (Comfy-Org/cloud#14903). Comfy-Org#21600 declared its own copy, so a future contract change to `text` or a new field would not show up here. Extending the generated schema keeps `text` sourced from the contract. `.nullish()` stays because a Go pointer serialized without `omitempty` sends an explicit `null`, which `.optional()` rejects; `safeParse` would then drop that round's thinking. The new case in `agentTranscript.test.ts` covers that null and passes before and after this change (it is a guard, not a red test, since behavior is unchanged). Verification: hosted CI. Local install could not finish on this host (heavily loaded), so hooks were skipped on push. The same change goes onto the 1.58 backports. The 1.57 branches do not have `zAgentThinkingEntry` in their generated types, so their backports keep the local declaration. </details>
Backport of #21600 to
cloud/1.58.Full context for agent readers
Why this train.
cloud/1.58is 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).