Repository navigation
[backport core/1.57] fix(agent): restore a completed turn's thinking on reload and chat switch (PM-717) (#21600) - #22106
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
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-10-28T03:00:16.243Z",
"gitSha": "dbec2f45bd1c6a9f9c6f8d2322593f9414df8e3c",
"branch": "backport-21600-to-core-1.57",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2013.8299999999845,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.247,
"layouts": 8,
"layoutDurationMs": 2.3850000000000002,
"taskDurationMs": 490.46500000000003,
"heapDeltaBytes": 22220312,
"heapUsedBytes": 88109888,
"domNodes": 0,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 8.791,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66528925619835,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2018.603999999982,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.4739999999999998,
"layouts": 8,
"layoutDurationMs": 2.605,
"taskDurationMs": 530.7719999999999,
"heapDeltaBytes": 22125280,
"heapUsedBytes": 88393932,
"domNodes": 0,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 11.165000000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666942148760327,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1759.8859999999945,
"styleRecalcs": 74,
"styleRecalcDurationMs": 14.81,
"layouts": 9,
"layoutDurationMs": 3.145,
"taskDurationMs": 843.226,
"heapDeltaBytes": -2866252,
"heapUsedBytes": 72523704,
"domNodes": 0,
"jsHeapTotalBytes": 11534336,
"scriptDurationMs": 161.276,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66698113207547,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2020.4380000000128,
"styleRecalcs": 83,
"styleRecalcDurationMs": 16.278000000000002,
"layouts": 9,
"layoutDurationMs": 3.122,
"taskDurationMs": 980.931,
"heapDeltaBytes": 15695320,
"heapUsedBytes": 81532304,
"domNodes": 0,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 173.88199999999998,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198342,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1721.5180000000032,
"styleRecalcs": 19,
"styleRecalcDurationMs": 5.9639999999999995,
"layouts": 11,
"layoutDurationMs": 3.0379999999999994,
"taskDurationMs": 415.235,
"heapDeltaBytes": -4509336,
"heapUsedBytes": 69977424,
"domNodes": 47,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 13.338,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66601941747573,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1731.5830000000005,
"styleRecalcs": 18,
"styleRecalcDurationMs": 5.706,
"layouts": 11,
"layoutDurationMs": 3.443,
"taskDurationMs": 417.1929999999999,
"heapDeltaBytes": 18387352,
"heapUsedBytes": 84334044,
"domNodes": 47,
"jsHeapTotalBytes": 3407872,
"scriptDurationMs": 13.183999999999997,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384614,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 646.3069999999789,
"styleRecalcs": 14,
"styleRecalcDurationMs": 2.745,
"layouts": 9,
"layoutDurationMs": 2.133,
"taskDurationMs": 476.491,
"heapDeltaBytes": 3928532,
"heapUsedBytes": 78781296,
"domNodes": 0,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 166.69899999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664102564102556,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 724.1520000000037,
"styleRecalcs": 14,
"styleRecalcDurationMs": 2.7539999999999996,
"layouts": 9,
"layoutDurationMs": 2.528,
"taskDurationMs": 511.15,
"heapDeltaBytes": 2430112,
"heapUsedBytes": 77140512,
"domNodes": 0,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 166.70499999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66744186046512,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1243.551000000025,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 936.8969999999999,
"heapDeltaBytes": 457196,
"heapUsedBytes": 81409272,
"domNodes": -212,
"jsHeapTotalBytes": 15212544,
"scriptDurationMs": 86.287,
"eventListeners": -106,
"totalBlockingTimeMs": 558,
"frameDurationMs": 33.78108108108107,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1220.2180000000453,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 924.477,
"heapDeltaBytes": 1132348,
"heapUsedBytes": 80987788,
"domNodes": -192,
"jsHeapTotalBytes": 13639680,
"scriptDurationMs": 74.07,
"eventListeners": -106,
"totalBlockingTimeMs": 525,
"frameDurationMs": 32.88378378378378,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 846.9800000000305,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 435.16699999999986,
"heapDeltaBytes": -4716080,
"heapUsedBytes": 76057812,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 152.00799999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 215,
"frameDurationMs": 24.9970588235294,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 872.5559999999177,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 485.09199999999987,
"heapDeltaBytes": -4311204,
"heapUsedBytes": 76629712,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 171.48400000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 236,
"frameDurationMs": 25.488235294117658,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11127.14600000001,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10230.725000000002,
"heapDeltaBytes": -1984888,
"heapUsedBytes": 97485320,
"domNodes": -278,
"jsHeapTotalBytes": 5369856,
"scriptDurationMs": 8266.362000000001,
"eventListeners": -68,
"totalBlockingTimeMs": 1342,
"frameDurationMs": 31.991091954022988,
"p95FrameDurationMs": 66.69999999999891
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10439.597999999989,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.04399999999999977,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9516.752,
"heapDeltaBytes": -16461912,
"heapUsedBytes": 83148952,
"domNodes": -278,
"jsHeapTotalBytes": 6680576,
"scriptDurationMs": 8051.411,
"eventListeners": -68,
"totalBlockingTimeMs": 1314,
"frameDurationMs": 31.71094224924012,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10454.202000000008,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9675.206000000002,
"heapDeltaBytes": -15371692,
"heapUsedBytes": 72044292,
"domNodes": -278,
"jsHeapTotalBytes": 3272704,
"scriptDurationMs": 7862.414000000001,
"eventListeners": -68,
"totalBlockingTimeMs": 1081,
"frameDurationMs": 31.569788519637463,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10218.61100000001,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9437.607999999998,
"heapDeltaBytes": 10556616,
"heapUsedBytes": 97712364,
"domNodes": -258,
"jsHeapTotalBytes": 4583424,
"scriptDurationMs": 7641.9580000000005,
"eventListeners": -68,
"totalBlockingTimeMs": 915,
"frameDurationMs": 31.434769230769227,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "large-combo-open",
"durationMs": 250.33999999999423,
"styleRecalcs": 24,
"styleRecalcDurationMs": 18.886,
"layouts": 12,
"layoutDurationMs": 4.67,
"taskDurationMs": 181.813,
"heapDeltaBytes": -7602692,
"heapUsedBytes": 80181324,
"domNodes": 917,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 9.308999999999997,
"eventListeners": 196,
"totalBlockingTimeMs": 9,
"frameDurationMs": 25,
"p95FrameDurationMs": 99.90000000000055
},
{
"name": "large-combo-open",
"durationMs": 241.13599999998314,
"styleRecalcs": 25,
"styleRecalcDurationMs": 16.148000000000003,
"layouts": 12,
"layoutDurationMs": 3.564,
"taskDurationMs": 178.093,
"heapDeltaBytes": -8086724,
"heapUsedBytes": 79749372,
"domNodes": 917,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 9.617999999999999,
"eventListeners": 196,
"totalBlockingTimeMs": 3,
"frameDurationMs": 23.33000000000002,
"p95FrameDurationMs": 66.69999999999982
},
{
"name": "large-graph-idle",
"durationMs": 2041.6920000000118,
"styleRecalcs": 8,
"styleRecalcDurationMs": 1.9649999999999996,
"layouts": 8,
"layoutDurationMs": 1.9779999999999998,
"taskDurationMs": 457.82599999999985,
"heapDeltaBytes": -4730576,
"heapUsedBytes": 74356368,
"domNodes": -278,
"jsHeapTotalBytes": 2486272,
"scriptDurationMs": 34.858999999999995,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2056.6390000000183,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.9320000000000004,
"layouts": 9,
"layoutDurationMs": 2.8589999999999995,
"taskDurationMs": 671.776,
"heapDeltaBytes": -23575080,
"heapUsedBytes": 73307656,
"domNodes": -278,
"jsHeapTotalBytes": 4358144,
"scriptDurationMs": 34.885999999999996,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2543.065000000013,
"styleRecalcs": 68,
"styleRecalcDurationMs": 5.872999999999999,
"layouts": 7,
"layoutDurationMs": 1.626,
"taskDurationMs": 1749.6209999999999,
"heapDeltaBytes": -11888884,
"heapUsedBytes": 68552196,
"domNodes": -258,
"jsHeapTotalBytes": 3534848,
"scriptDurationMs": 828.32,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.887999999999998,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2459.176999999954,
"styleRecalcs": 67,
"styleRecalcDurationMs": 5.872999999999998,
"layouts": 6,
"layoutDurationMs": 1.481,
"taskDurationMs": 1678.1750000000002,
"heapDeltaBytes": -11838852,
"heapUsedBytes": 68711932,
"domNodes": -258,
"jsHeapTotalBytes": 4845568,
"scriptDurationMs": 798.677,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.895862068965513,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3720.4790000000116,
"styleRecalcs": 70,
"styleRecalcDurationMs": 7.34,
"layouts": 64,
"layoutDurationMs": 10.759,
"taskDurationMs": 1770.1180000000002,
"heapDeltaBytes": -5308556,
"heapUsedBytes": 76609908,
"domNodes": -254,
"jsHeapTotalBytes": 4059136,
"scriptDurationMs": 766.182,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665919282511215,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3752.8539999999566,
"styleRecalcs": 70,
"styleRecalcDurationMs": 7.541000000000001,
"layouts": 63,
"layoutDurationMs": 10.949,
"taskDurationMs": 1815.0330000000001,
"heapDeltaBytes": -5178320,
"heapUsedBytes": 76665288,
"domNodes": -254,
"jsHeapTotalBytes": 4321280,
"scriptDurationMs": 785.4620000000001,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.740625,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3000.6649999999695,
"styleRecalcs": 43,
"styleRecalcDurationMs": 4.382000000000001,
"layouts": 4,
"layoutDurationMs": 1.54,
"taskDurationMs": 1952.2820000000004,
"heapDeltaBytes": 4341472,
"heapUsedBytes": 83217660,
"domNodes": 0,
"jsHeapTotalBytes": 2097152,
"scriptDurationMs": 969.9220000000001,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.85337078651685,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3135.372000000075,
"styleRecalcs": 45,
"styleRecalcDurationMs": 5.194999999999999,
"layouts": 6,
"layoutDurationMs": 1.7019999999999995,
"taskDurationMs": 2010.971,
"heapDeltaBytes": 5845248,
"heapUsedBytes": 84794024,
"domNodes": 0,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 979.3969999999999,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.845945945945946,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2057.622999999978,
"styleRecalcs": 7,
"styleRecalcDurationMs": 2.8460000000000005,
"layouts": 6,
"layoutDurationMs": 1.9100000000000001,
"taskDurationMs": 669.965,
"heapDeltaBytes": -26379248,
"heapUsedBytes": 73119004,
"domNodes": -278,
"jsHeapTotalBytes": 4882432,
"scriptDurationMs": 32.599,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66612903225806,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2050.3420000000006,
"styleRecalcs": 8,
"styleRecalcDurationMs": 2.4130000000000003,
"layouts": 7,
"layoutDurationMs": 2.313,
"taskDurationMs": 495.298,
"heapDeltaBytes": -2405200,
"heapUsedBytes": 79423488,
"domNodes": -258,
"jsHeapTotalBytes": 4059136,
"scriptDurationMs": 38.315000000000005,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 652.9769999999644,
"styleRecalcs": 45,
"styleRecalcDurationMs": 4.226999999999999,
"layouts": 8,
"layoutDurationMs": 1.9689999999999994,
"taskDurationMs": 457.93600000000004,
"heapDeltaBytes": 21668896,
"heapUsedBytes": 88523412,
"domNodes": 0,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 147.961,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 551.1440000000221,
"styleRecalcs": 47,
"styleRecalcDurationMs": 5.1770000000000005,
"layouts": 10,
"layoutDurationMs": 2.727,
"taskDurationMs": 387.286,
"heapDeltaBytes": 21652800,
"heapUsedBytes": 88562860,
"domNodes": 0,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 150.782,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2008.3030000000122,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.444,
"layouts": 9,
"layoutDurationMs": 2.5109999999999997,
"taskDurationMs": 492.399,
"heapDeltaBytes": 22448920,
"heapUsedBytes": 89417216,
"domNodes": 0,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 8.591000000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2008.758999999941,
"styleRecalcs": 11,
"styleRecalcDurationMs": 3.346000000000001,
"layouts": 11,
"layoutDurationMs": 3.546,
"taskDurationMs": 549.739,
"heapDeltaBytes": -275644,
"heapUsedBytes": 76873420,
"domNodes": 0,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 10.719000000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1972.846000000004,
"styleRecalcs": 87,
"styleRecalcDurationMs": 16.837999999999997,
"layouts": 10,
"layoutDurationMs": 2.586,
"taskDurationMs": 1067.078,
"heapDeltaBytes": 11684872,
"heapUsedBytes": 79086176,
"domNodes": 0,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 114.68,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66610169491526,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1972.949999999969,
"styleRecalcs": 87,
"styleRecalcDurationMs": 16.989,
"layouts": 9,
"layoutDurationMs": 2.7920000000000003,
"taskDurationMs": 1054.5410000000002,
"heapDeltaBytes": 11590096,
"heapUsedBytes": 79126328,
"domNodes": 0,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 118.312,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66610169491526,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1454.3329999999628,
"styleRecalcs": 18,
"styleRecalcDurationMs": 28.574999999999996,
"layouts": 5,
"layoutDurationMs": 16.729,
"taskDurationMs": 1120.73,
"heapDeltaBytes": 7205456,
"heapUsedBytes": 103486728,
"domNodes": 15953,
"jsHeapTotalBytes": 17698816,
"scriptDurationMs": 31.557000000000002,
"eventListeners": 3244,
"totalBlockingTimeMs": 180,
"frameDurationMs": 20.090410958904116,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 9330.078000000014,
"styleRecalcs": 249,
"styleRecalcDurationMs": 18.744999999999997,
"layouts": 7,
"layoutDurationMs": 1.9960000000000004,
"taskDurationMs": 5867.324,
"heapDeltaBytes": 8397044,
"heapUsedBytes": 87364184,
"domNodes": -258,
"jsHeapTotalBytes": 3989504,
"scriptDurationMs": 2667.643,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.726032315978454,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 9558.952999999974,
"styleRecalcs": 251,
"styleRecalcDurationMs": 18.848999999999997,
"layouts": 8,
"layoutDurationMs": 2.283,
"taskDurationMs": 6117.264999999999,
"heapDeltaBytes": -19093868,
"heapUsedBytes": 78225760,
"domNodes": -278,
"jsHeapTotalBytes": 5074944,
"scriptDurationMs": 2768.7019999999998,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.72434325744308,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 23117.346999999994,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22588.546000000002,
"heapDeltaBytes": -19545560,
"heapUsedBytes": 281105164,
"domNodes": -3330,
"jsHeapTotalBytes": 12046336,
"scriptDurationMs": 326.851,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 39.99273356401384,
"p95FrameDurationMs": 83.29999999999927
},
{
"name": "vue-large-graph-idle",
"durationMs": 22957.163000000037,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22277.563000000002,
"heapDeltaBytes": -19629968,
"heapUsedBytes": 281391724,
"domNodes": -3330,
"jsHeapTotalBytes": 15978496,
"scriptDurationMs": 313.593,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 40.0390243902439,
"p95FrameDurationMs": 83.29999999999927
},
{
"name": "vue-large-graph-pan",
"durationMs": 27723.43699999999,
"styleRecalcs": 180,
"styleRecalcDurationMs": 15.840999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 27368.896,
"heapDeltaBytes": -19646720,
"heapUsedBytes": 275645728,
"domNodes": -3330,
"jsHeapTotalBytes": 7327744,
"scriptDurationMs": 858.797,
"eventListeners": -651,
"totalBlockingTimeMs": 8,
"frameDurationMs": 52.22636534839924,
"p95FrameDurationMs": 100.10000000000036
},
{
"name": "vue-large-graph-pan",
"durationMs": 27969.450999999935,
"styleRecalcs": 181,
"styleRecalcDurationMs": 24.032999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 27600.707,
"heapDeltaBytes": -24076220,
"heapUsedBytes": 272920476,
"domNodes": -3330,
"jsHeapTotalBytes": 3395584,
"scriptDurationMs": 992.7869999999998,
"eventListeners": -651,
"totalBlockingTimeMs": 95,
"frameDurationMs": 51.502025782688754,
"p95FrameDurationMs": 100.10000000000218
},
{
"name": "vue-node-resize-workload",
"durationMs": 8242.306999999983,
"styleRecalcs": 20,
"styleRecalcDurationMs": 91.023,
"layouts": 20,
"layoutDurationMs": 29.34099999999999,
"taskDurationMs": 8139.4209999999985,
"heapDeltaBytes": -3556476,
"heapUsedBytes": 283097696,
"domNodes": -307,
"jsHeapTotalBytes": 17551360,
"scriptDurationMs": 124.37899999999999,
"eventListeners": -7,
"totalBlockingTimeMs": 0,
"frameDurationMs": 45.99497206703911,
"p95FrameDurationMs": 100
},
{
"name": "vue-node-resize-workload",
"durationMs": 8244.479999999952,
"styleRecalcs": 20,
"styleRecalcDurationMs": 91.18900000000002,
"layouts": 20,
"layoutDurationMs": 33.322,
"taskDurationMs": 8102.156000000001,
"heapDeltaBytes": -3840464,
"heapUsedBytes": 272522928,
"domNodes": -3330,
"jsHeapTotalBytes": 16240640,
"scriptDurationMs": 121.361,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 46.25280898876405,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "vue-zoom-out-idle",
"durationMs": 11450.54799999997,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11200.448000000002,
"heapDeltaBytes": -8893284,
"heapUsedBytes": 265138944,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 156.60700000000006,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 38.94421768707484,
"p95FrameDurationMs": 83.29999999999927
},
{
"name": "vue-zoom-out-idle",
"durationMs": 11347.949000000084,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10908.225999999999,
"heapDeltaBytes": -20333560,
"heapUsedBytes": 252757876,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 150.63499999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 38.86849315068494,
"p95FrameDurationMs": 83.29999999999927
},
{
"name": "workflow-execution",
"durationMs": 520.6949999999892,
"styleRecalcs": 22,
"styleRecalcDurationMs": 13.144,
"layouts": 10,
"layoutDurationMs": 4.415000000000001,
"taskDurationMs": 162.026,
"heapDeltaBytes": 7117352,
"heapUsedBytes": 79432772,
"domNodes": 124,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 18.139000000000003,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000013,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 125.21400000002814,
"styleRecalcs": 8,
"styleRecalcDurationMs": 9.280999999999999,
"layouts": 7,
"layoutDurationMs": 2.2729999999999997,
"taskDurationMs": 93.124,
"heapDeltaBytes": -15613856,
"heapUsedBytes": 68058016,
"domNodes": 94,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 6.939999999999999,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 19.04285714285717,
"p95FrameDurationMs": 33.40000000000009
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 490.5559999999696,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.9309999999999999,
"layouts": 76,
"layoutDurationMs": 14.947999999999999,
"taskDurationMs": 446.972,
"heapDeltaBytes": -21089776,
"heapUsedBytes": 72565692,
"domNodes": 4,
"jsHeapTotalBytes": 11272192,
"scriptDurationMs": 223.316,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 434.66000000000804,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.278,
"layouts": 76,
"layoutDurationMs": 14.501999999999999,
"taskDurationMs": 390.833,
"heapDeltaBytes": 11093496,
"heapUsedBytes": 104040220,
"domNodes": 4,
"jsHeapTotalBytes": 11534336,
"scriptDurationMs": 186.29600000000002,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 503.14700000001267,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.857,
"layouts": 76,
"layoutDurationMs": 13.568,
"taskDurationMs": 472.16600000000005,
"heapDeltaBytes": -304340,
"heapUsedBytes": 131104796,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 189.858,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66451612903227,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 643.6449999999923,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.903,
"layouts": 76,
"layoutDurationMs": 15.498,
"taskDurationMs": 579.4979999999999,
"heapDeltaBytes": 430696,
"heapUsedBytes": 131822868,
"domNodes": 4,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 244.25900000000001,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.56486486486488,
"p95FrameDurationMs": 33.30000000000018
}
]
}🔬 E2E CoverageLine coverage: 64.7% 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 c8449b14996eb828d2fae6d642b90863cdec26f1
Full docs: ADR-DEVEX-LINT-0015 |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## core/1.57 #22106 +/- ##
=============================================
- Coverage 84.09% 84.07% -0.03%
=============================================
Files 2990 2990
Lines 159391 159413 +22
Branches 40727 40735 +8
=============================================
- Hits 134043 134028 -15
- Misses 24958 24995 +37
Partials 390 390
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 18 files with indirect coverage changes 🚀 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 core/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 core/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 #22106 (comment) rather than duplicating it.
Own validation on 490efdb0793221a2863e542a68d36a482d958043, 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 (#22106 (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
|
Backport of #21600 to
core/1.57.Full context for agent readers
Why this train.
core/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).