Repository navigation
feat: use generated ToolCallSummary type for persisted tool-call schema - #19585
Conversation
Replaces the interim hand-written zPersistedToolCallSummary zod schema in
agentApiSchema.ts with zToolCallSummary from @comfyorg/ingest-types/zod, now
that Comfy-Org/cloud#10360 added the ToolCallSummary OpenAPI schema and it
propagated into this package.
- zPersistedToolCallSummary now aliases the generated zToolCallSummary
directly, closing status to 'success' | 'error' and requiring
tool_call_id (previously an optional legacy-row fallback).
- Re-widens AgentMessage.content with a local zAgentMessageContent
(tool_calls typed via zToolCallSummary, .passthrough() for the rest) to
bridge a codegen gap: the generated TS type keeps a
`[key: string]: unknown` index signature for content, but the generated
zod schema for it dropped z.record(z.unknown()) in favor of a bare
{ tool_calls } object with no .passthrough(), which would otherwise
reject every other content field (text, attachments, workflow_references,
...) used elsewhere in this file.
- Updates agentTranscript.ts's parseToolCallEntry now that tool_call_id is
guaranteed and status is closed, and updates agentTranscript.test.ts /
agentEventTransport.test.ts / agentConversationStore.test.ts fixtures to
match the tightened contract.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🌐 Website E2ETip All tests passed.
🎭 Playwright: ✅ 2160 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🌾 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 d249ea24a95fff38cecff811582d2abf510cb8d8
Full docs: ADR-DEVEX-LINT-0015 📦 Bundle: 10 MB gzip 🔴 +355 kBDetailsSummary
Category Glance App Entry Points — 3.77 kB (baseline 3.73 kB) • 🔴 +38 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.46 MB (baseline 1.43 MB) • 🔴 +32.1 kBGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 133 kB (baseline 124 kB) • 🔴 +9.54 kBTop-level views, pages, and routed surfaces
Status: 17 added / 16 removed / 1 unchanged Panels & Settings — 643 kB (baseline 621 kB) • 🔴 +21.7 kBConfiguration panels, inspectors, and settings screens
Status: 28 added / 27 removed User & Accounts — 39.4 kB (baseline 27.8 kB) • 🔴 +11.6 kBAuthentication, profile, and account management bundles
Status: 9 added / 9 removed / 2 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • 🔴 +691 BModals, dialogs, drawers, and in-app editors
Status: 8 added / 8 removed UI Components — 125 kB (baseline 117 kB) • 🔴 +8.07 kBReusable component library chunks
Status: 16 added / 15 removed Data & Services — 4.09 MB (baseline 3.6 MB) • 🔴 +492 kBStores, services, APIs, and repositories
Status: 15 added / 16 removed Utilities & Hooks — 582 kB (baseline 559 kB) • 🔴 +23.3 kBHelpers, composables, and utility bundles
Status: 31 added / 30 removed / 6 unchanged Vendor & Third-Party — 17.4 MB (baseline 18.1 MB) • 🟢 -689 kBExternal libraries and shared vendor chunks
Status: 13 added / 13 removed / 5 unchanged Other — 17.9 MB (baseline 16.4 MB) • 🔴 +1.55 MBBundles that do not match a named category
Status: 178 added / 174 removed / 122 unchanged ⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-09-30T08:05:25.296Z",
"gitSha": "f78d6fec7e2f9ff64adc6a139048f91a657f8e4e",
"branch": "feat/toolcallsummary-generated-type",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2013.1069999999909,
"styleRecalcs": 13,
"styleRecalcDurationMs": 5.3740000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 364.726,
"heapDeltaBytes": -2539676,
"heapUsedBytes": 76446616,
"domNodes": -228,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 12.076,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2032.3589999999285,
"styleRecalcs": 10,
"styleRecalcDurationMs": 4.038999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 424.97,
"heapDeltaBytes": -2162768,
"heapUsedBytes": 77738548,
"domNodes": -228,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 13.319,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6655737704918,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1738.771999999983,
"styleRecalcs": 72,
"styleRecalcDurationMs": 16.32,
"layouts": 12,
"layoutDurationMs": 4.11,
"taskDurationMs": 615.996,
"heapDeltaBytes": -3998100,
"heapUsedBytes": 74918856,
"domNodes": -228,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 115.96800000000002,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846156,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1753.1529999999975,
"styleRecalcs": 72,
"styleRecalcDurationMs": 18.09,
"layouts": 12,
"layoutDurationMs": 4.589,
"taskDurationMs": 693.6719999999999,
"heapDeltaBytes": -972608,
"heapUsedBytes": 78810940,
"domNodes": -228,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 130.74,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665714285714284,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1713.6940000000322,
"styleRecalcs": 31,
"styleRecalcDurationMs": 9.332,
"layouts": 6,
"layoutDurationMs": 1.2329999999999999,
"taskDurationMs": 272.58700000000005,
"heapDeltaBytes": 1792720,
"heapUsedBytes": 81802320,
"domNodes": 53,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 14.817,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666019417475724,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1721.0679999999456,
"styleRecalcs": 31,
"styleRecalcDurationMs": 9.520000000000001,
"layouts": 6,
"layoutDurationMs": 1.1179999999999999,
"taskDurationMs": 211.08700000000002,
"heapDeltaBytes": 1536792,
"heapUsedBytes": 80745456,
"domNodes": 53,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 10.145,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384617,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 538.4379999999851,
"styleRecalcs": 13,
"styleRecalcDurationMs": 3.941,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 319.38800000000003,
"heapDeltaBytes": 18242264,
"heapUsedBytes": 97491740,
"domNodes": 0,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 112.29100000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.668750000000003,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 540.0319999999965,
"styleRecalcs": 13,
"styleRecalcDurationMs": 4.646000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 338.609,
"heapDeltaBytes": 18277308,
"heapUsedBytes": 97877076,
"domNodes": 0,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 116.52699999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.668750000000003,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 947.6850000000354,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 561.2629999999999,
"heapDeltaBytes": 10185076,
"heapUsedBytes": 85727576,
"domNodes": 0,
"jsHeapTotalBytes": 4096000,
"scriptDurationMs": 44.932,
"eventListeners": 0,
"totalBlockingTimeMs": 328,
"frameDurationMs": 27.941176470588236,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 949.1839999999456,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 586.513,
"heapDeltaBytes": 6420128,
"heapUsedBytes": 83600776,
"domNodes": 0,
"jsHeapTotalBytes": 3047424,
"scriptDurationMs": 44.613,
"eventListeners": 0,
"totalBlockingTimeMs": 336,
"frameDurationMs": 28.79090909090909,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 704.5550000000276,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 297.44800000000015,
"heapDeltaBytes": 15680868,
"heapUsedBytes": 90326464,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 97.79599999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 94,
"frameDurationMs": 20.58823529411765,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 716.6700000000219,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 312.86199999999997,
"heapDeltaBytes": 13819744,
"heapUsedBytes": 92673360,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 98.214,
"eventListeners": 0,
"totalBlockingTimeMs": 96,
"frameDurationMs": 21.079411764705878,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6235.763999999961,
"styleRecalcs": 4,
"styleRecalcDurationMs": 1.5510000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5000.737,
"heapDeltaBytes": -14217120,
"heapUsedBytes": 82601592,
"domNodes": -228,
"jsHeapTotalBytes": 651264,
"scriptDurationMs": 3875.723,
"eventListeners": -164,
"totalBlockingTimeMs": 7,
"frameDurationMs": 20.315032679738565,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6110.149999999976,
"styleRecalcs": 2,
"styleRecalcDurationMs": 0.4720000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4953.335,
"heapDeltaBytes": -8682348,
"heapUsedBytes": 72507868,
"domNodes": 0,
"jsHeapTotalBytes": -15466496,
"scriptDurationMs": 3838.806,
"eventListeners": 0,
"totalBlockingTimeMs": 16,
"frameDurationMs": 20.87542662116041,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 6568.656000000033,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.06300000000000056,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5414.822,
"heapDeltaBytes": 4533936,
"heapUsedBytes": 85008092,
"domNodes": 0,
"jsHeapTotalBytes": -16515072,
"scriptDurationMs": 4166.448,
"eventListeners": 0,
"totalBlockingTimeMs": 19,
"frameDurationMs": 21.250485436893204,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 6526.202000000012,
"styleRecalcs": 2,
"styleRecalcDurationMs": 0.42599999999999927,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5396.875000000001,
"heapDeltaBytes": 10700968,
"heapUsedBytes": 91217916,
"domNodes": 0,
"jsHeapTotalBytes": -17301504,
"scriptDurationMs": 4101.098999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 20.68698412698412,
"p95FrameDurationMs": 33.40000000000009
},
{
"name": "large-graph-idle",
"durationMs": 2026.6849999999863,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.81,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 344.604,
"heapDeltaBytes": -36854060,
"heapUsedBytes": 82431624,
"domNodes": -228,
"jsHeapTotalBytes": 163840,
"scriptDurationMs": 25.581999999999994,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66639344262295,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2047.5360000000364,
"styleRecalcs": 9,
"styleRecalcDurationMs": 3.4349999999999987,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 496.62800000000004,
"heapDeltaBytes": -37462208,
"heapUsedBytes": 82858120,
"domNodes": -228,
"jsHeapTotalBytes": -884736,
"scriptDurationMs": 30.32,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2139.624000000026,
"styleRecalcs": 68,
"styleRecalcDurationMs": 11.503000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1204.229,
"heapDeltaBytes": 20328600,
"heapUsedBytes": 83237768,
"domNodes": 0,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 610.597,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665625000000002,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "large-graph-pan",
"durationMs": 2126.1180000000195,
"styleRecalcs": 70,
"styleRecalcDurationMs": 13.418,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1255.971,
"heapDeltaBytes": 20332604,
"heapUsedBytes": 82570260,
"domNodes": -228,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 601.602,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666141732283467,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3102.305000000001,
"styleRecalcs": 64,
"styleRecalcDurationMs": 12.760000000000002,
"layouts": 60,
"layoutDurationMs": 15.624,
"taskDurationMs": 1238.7679999999998,
"heapDeltaBytes": 12622876,
"heapUsedBytes": 76762312,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 540.7330000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666129032258063,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3137.9349999999704,
"styleRecalcs": 66,
"styleRecalcDurationMs": 13.878,
"layouts": 60,
"layoutDurationMs": 15.366,
"taskDurationMs": 1206.9709999999998,
"heapDeltaBytes": 8225832,
"heapUsedBytes": 72376860,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 538.631,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66595744680851,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2197.2900000000095,
"styleRecalcs": 44,
"styleRecalcDurationMs": 7.070000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1342.6719999999998,
"heapDeltaBytes": 17622508,
"heapUsedBytes": 82820892,
"domNodes": 0,
"jsHeapTotalBytes": 679936,
"scriptDurationMs": 661.889,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66641221374046,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2239.7600000000466,
"styleRecalcs": 45,
"styleRecalcDurationMs": 7.607000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1453.257,
"heapDeltaBytes": 17519724,
"heapUsedBytes": 81797880,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 707.9,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.790225563909775,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2018.0819999999926,
"styleRecalcs": 7,
"styleRecalcDurationMs": 2.811000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 414.6099999999999,
"heapDeltaBytes": 20658340,
"heapUsedBytes": 84146908,
"domNodes": -228,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 27.978,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666942148760327,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "minimap-idle",
"durationMs": 2031.4569999999321,
"styleRecalcs": 7,
"styleRecalcDurationMs": 2.4200000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 336.963,
"heapDeltaBytes": 21097632,
"heapUsedBytes": 83746368,
"domNodes": -228,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 27.052,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 497.44900000001735,
"styleRecalcs": 48,
"styleRecalcDurationMs": 7.242,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 304.69899999999996,
"heapDeltaBytes": 12477576,
"heapUsedBytes": 93950544,
"domNodes": 0,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 106.20100000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 432.2069999999485,
"styleRecalcs": 49,
"styleRecalcDurationMs": 6.38,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 276.599,
"heapDeltaBytes": 12411056,
"heapUsedBytes": 93964484,
"domNodes": 0,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 98.187,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66538461538462,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2008.3549999999946,
"styleRecalcs": 12,
"styleRecalcDurationMs": 4.076,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 282.68399999999997,
"heapDeltaBytes": -2135040,
"heapUsedBytes": 79533456,
"domNodes": -244,
"jsHeapTotalBytes": -262144,
"scriptDurationMs": 7.384999999999999,
"eventListeners": -210,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666942148760334,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2026.8100000000686,
"styleRecalcs": 11,
"styleRecalcDurationMs": 4.273000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 441.28899999999993,
"heapDeltaBytes": -27893660,
"heapUsedBytes": 53838608,
"domNodes": -244,
"jsHeapTotalBytes": -1048576,
"scriptDurationMs": 12.884000000000004,
"eventListeners": -210,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665573770491804,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1694.563999999957,
"styleRecalcs": 75,
"styleRecalcDurationMs": 16.473000000000003,
"layouts": 16,
"layoutDurationMs": 5.271000000000001,
"taskDurationMs": 520.4369999999999,
"heapDeltaBytes": -24700820,
"heapUsedBytes": 56785404,
"domNodes": -244,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 81.167,
"eventListeners": -210,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66568627450981,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1711.9400000000269,
"styleRecalcs": 74,
"styleRecalcDurationMs": 19.178,
"layouts": 16,
"layoutDurationMs": 6.043,
"taskDurationMs": 631.31,
"heapDeltaBytes": -3627988,
"heapUsedBytes": 77989932,
"domNodes": -244,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 97.366,
"eventListeners": -210,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665048543689323,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-transition-enter",
"durationMs": 818.9149999999472,
"styleRecalcs": 18,
"styleRecalcDurationMs": 20.763000000000005,
"layouts": 5,
"layoutDurationMs": 8.519,
"taskDurationMs": 635.138,
"heapDeltaBytes": 23160176,
"heapUsedBytes": 104317816,
"domNodes": 13667,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 21.703,
"eventListeners": 2383,
"totalBlockingTimeMs": 68,
"frameDurationMs": 18.99302325581395,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8178.92599999999,
"styleRecalcs": 250,
"styleRecalcDurationMs": 41.645,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4427.062,
"heapDeltaBytes": -36484716,
"heapUsedBytes": 83346548,
"domNodes": -228,
"jsHeapTotalBytes": 389120,
"scriptDurationMs": 1997.1680000000003,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665918367346936,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8140.105000000062,
"styleRecalcs": 250,
"styleRecalcDurationMs": 37.926,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3853.129,
"heapDeltaBytes": 20921780,
"heapUsedBytes": 82797940,
"domNodes": -228,
"jsHeapTotalBytes": 487424,
"scriptDurationMs": 1896.777,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66611909650924,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 12258.958000000006,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12068.544,
"heapDeltaBytes": -26089176,
"heapUsedBytes": 187802488,
"domNodes": -8049,
"jsHeapTotalBytes": -8708096,
"scriptDurationMs": 175.69400000000002,
"eventListeners": -14923,
"totalBlockingTimeMs": 0,
"frameDurationMs": 24.160946745562132,
"p95FrameDurationMs": 33.5
},
{
"name": "vue-large-graph-idle",
"durationMs": 12050.009000000045,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11568.368,
"heapDeltaBytes": -58040236,
"heapUsedBytes": 182092756,
"domNodes": -8049,
"jsHeapTotalBytes": -16715776,
"scriptDurationMs": 169.504,
"eventListeners": -14923,
"totalBlockingTimeMs": 0,
"frameDurationMs": 22.36672897196262,
"p95FrameDurationMs": 33.400000000001455
},
{
"name": "vue-large-graph-pan",
"durationMs": 15027.81600000003,
"styleRecalcs": 71,
"styleRecalcDurationMs": 16.031000000000017,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14951.896999999999,
"heapDeltaBytes": -44514620,
"heapUsedBytes": 189218544,
"domNodes": -8049,
"jsHeapTotalBytes": -12955648,
"scriptDurationMs": 653.4580000000001,
"eventListeners": -14923,
"totalBlockingTimeMs": 11,
"frameDurationMs": 30.24688128772636,
"p95FrameDurationMs": 66.69999999999891
},
{
"name": "vue-large-graph-pan",
"durationMs": 13532.455999999911,
"styleRecalcs": 66,
"styleRecalcDurationMs": 12.909000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13342.527,
"heapDeltaBytes": -42696548,
"heapUsedBytes": 183678336,
"domNodes": -3046,
"jsHeapTotalBytes": 5435392,
"scriptDurationMs": 631.168,
"eventListeners": -14915,
"totalBlockingTimeMs": 38,
"frameDurationMs": 26.042581888246627,
"p95FrameDurationMs": 50
},
{
"name": "vue-node-resize-workload",
"durationMs": 4415.763000000026,
"styleRecalcs": 20,
"styleRecalcDurationMs": 58.54400000000001,
"layouts": 20,
"layoutDurationMs": 24.293999999999997,
"taskDurationMs": 4392.041,
"heapDeltaBytes": 25002236,
"heapUsedBytes": 199906560,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 74.278,
"eventListeners": 0,
"totalBlockingTimeMs": 51,
"frameDurationMs": 27.776729559748432,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "vue-node-resize-workload",
"durationMs": 4085.397999999941,
"styleRecalcs": 20,
"styleRecalcDurationMs": 51.96799999999999,
"layouts": 20,
"layoutDurationMs": 20.607999999999993,
"taskDurationMs": 3981.504,
"heapDeltaBytes": 743644,
"heapUsedBytes": 199334628,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 64.00099999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 1,
"frameDurationMs": 25.7373417721519,
"p95FrameDurationMs": 50
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6214.093999999988,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6173.548000000001,
"heapDeltaBytes": -23924164,
"heapUsedBytes": 169948964,
"domNodes": 0,
"jsHeapTotalBytes": -26214400,
"scriptDurationMs": 95.06500000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 24.89839357429719,
"p95FrameDurationMs": 33.5
},
{
"name": "vue-zoom-out-idle",
"durationMs": 4836.815999999999,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.09900000000001574,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4534.8,
"heapDeltaBytes": -46059612,
"heapUsedBytes": 180180580,
"domNodes": -3046,
"jsHeapTotalBytes": 11403264,
"scriptDurationMs": 70.61399999999995,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.45402298850575,
"p95FrameDurationMs": 33.29999999999927
},
{
"name": "workflow-execution",
"durationMs": 442.25000000000136,
"styleRecalcs": 17,
"styleRecalcDurationMs": 21.621000000000002,
"layouts": 3,
"layoutDurationMs": 1.2920000000000003,
"taskDurationMs": 117.96399999999998,
"heapDeltaBytes": -14422200,
"heapUsedBytes": 82557880,
"domNodes": 102,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 11.578999999999999,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "workflow-execution",
"durationMs": 444.8330000000169,
"styleRecalcs": 18,
"styleRecalcDurationMs": 15.792999999999997,
"layouts": 3,
"layoutDurationMs": 1.239,
"taskDurationMs": 110.19199999999998,
"heapDeltaBytes": -14387552,
"heapUsedBytes": 83258840,
"domNodes": 99,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 7.9159999999999995,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 465.3530000000501,
"styleRecalcs": 78,
"styleRecalcDurationMs": 83.33,
"layouts": 76,
"layoutDurationMs": 21.84,
"taskDurationMs": 421.52099999999996,
"heapDeltaBytes": -16335276,
"heapUsedBytes": 70689016,
"domNodes": 76,
"jsHeapTotalBytes": 12320768,
"scriptDurationMs": 140.725,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66428571428573,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 368.0500000000393,
"styleRecalcs": 78,
"styleRecalcDurationMs": 71.165,
"layouts": 76,
"layoutDurationMs": 17.347,
"taskDurationMs": 341.163,
"heapDeltaBytes": -10181484,
"heapUsedBytes": 76618776,
"domNodes": 76,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 106.631,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665217391304356,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 727.3629999999685,
"styleRecalcs": 78,
"styleRecalcDurationMs": 202.768,
"layouts": 76,
"layoutDurationMs": 23.621,
"taskDurationMs": 694.605,
"heapDeltaBytes": 8900400,
"heapUsedBytes": 129489668,
"domNodes": 76,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 173.946,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665909090909075,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 654.3060000000196,
"styleRecalcs": 78,
"styleRecalcDurationMs": 179.458,
"layouts": 76,
"layoutDurationMs": 22.425,
"taskDurationMs": 619.888,
"heapDeltaBytes": 8061724,
"heapUsedBytes": 128719524,
"domNodes": 76,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 151.57199999999997,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667500000000018,
"p95FrameDurationMs": 16.700000000000728
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🧩 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #19585 +/- ##
==========================================
- Coverage 84.37% 84.36% -0.01%
==========================================
Files 3325 3325
Lines 160345 160346 +1
Branches 43655 41753 -1902
==========================================
- Hits 135286 135280 -6
- Misses 23159 23166 +7
Partials 1900 1900
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 6 files with indirect coverage changes 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
typecheck-aux (pnpm typecheck:browser) failed because this branch's ingest-types codegen bump closed ToolCallSummary.status to 'success' | 'error' and made tool_call_id required. The persistence test's mocked API response still used the legacy 'ok' status and omitted tool_call_id, which the main `pnpm typecheck` never caught since browser_tests has its own tsconfig/typecheck target. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
|
This was caused by this PR's own Pushed a fix ( |
|
Website E2E failures are unrelated to this PRInvestigated the two non-screenshot failures flagged on
Both are razor-thin perf/CLS budget assertions on the marketing site's This is also reproducible on No fix pushed here — the two failures are pre-existing website-catalogue budget flakiness on Generated by Claude Code |
Playwright videos for new testsDownload the recorded videos and HTML report Recorded projects: cloud Recorded test titles:
|
|
|
|
|
…ma (#19585) Replaces the interim hand-written zPersistedToolCallSummary zod schema in agentApiSchema.ts with the generated zToolCallSummary from @comfyorg/ingest-types/zod, now that Comfy-Org/cloud#10360 added the ToolCallSummary OpenAPI schema for persisted tool-call history. Backport of #19585 to core/1.55. Manual backport: the automated bot's cherry-pick conflicted in packages/ingest-types/src/{types,zod}.gen.ts. The conflict was unrelated codegen drift (an unrelated RenewalInvoice billing type present on main but not yet generated on core/1.55) rather than a real conflict with this PR's change. Resolved by keeping only this PR's actual addition (ToolCallSummary type/schema, AgentMessage.content.tool_calls field) and dropping the unrelated RenewalInvoice hunk. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
…ma (#19585) Replaces the interim hand-written `zPersistedToolCallSummary` zod schema in `agentApiSchema.ts` with the generated `zToolCallSummary` from `@comfyorg/ingest-types/zod`, now that [Comfy-Org/cloud#10360](Comfy-Org/cloud#10360) added the `ToolCallSummary` OpenAPI schema for persisted tool-call history. `main` does not yet have `ToolCallSummary` in `packages/ingest-types` — the automated type-update PR that adds it, #19526, is still open (unmerged) at the time of this PR. Its single commit (`c819ad46`) is a pure, isolated `packages/ingest-types` regen with no conflicts against `main`'s tip, so I cherry-picked just that commit onto a fresh branch off `main` rather than basing on #19526's own branch, to keep this PR's history clean and independent of that bot-managed branch's future churn. If #19526 merges first, this PR's first commit becomes a no-op on rebase; if this merges first, #19526 will need a trivial rebase. - **What**: - `zPersistedToolCallSummary` now aliases the generated `zToolCallSummary` directly instead of a hand-rolled permissive schema. - Fixed a codegen gap this surfaced: `AgentMessage.content`'s generated **TS type** keeps a `[key: string]: unknown` index signature, but its generated **zod schema** dropped `z.record(z.unknown())` for a bare `{ tool_calls }` object with no `.passthrough()` — which would otherwise reject every other `content` field (`text`, `attachments`, `workflow_references`, ...) this file relies on. Added a local `zAgentMessageContent` (tool_calls typed via `zToolCallSummary`, `.passthrough()` for the rest) to bridge it. - Updated `agentTranscript.ts`'s `parseToolCallEntry`/`toolCallPartState`/`toolCallOk` now that `tool_call_id` is guaranteed present and `status` is closed to `'success' | 'error'` (previously `z.string().optional()` with an `id`-fallback for pre-`tool_call_id` rows). - Updated test fixtures in `agentTranscript.test.ts`, `agentEventTransport.test.ts`, and `agentConversationStore.test.ts` to match the tightened contract (valid fixtures now include `tool_call_id` + `'success'/'error'` status; fixtures deliberately testing malformed/legacy shapes now assert the entry is **dropped** rather than rendered with a broadened status vocabulary, matching the generated schema's own docstring: "a row a dead turn left in pending/running ... is dropped rather than shown as a perpetual-progress chip"). - **Breaking**: None externally — this is FE-internal parsing of already-persisted rows. Behavior only changes for the never-before-possible edge cases the interim schema was defensively permissive about (a persisted row missing `tool_call_id`, or carrying a non-terminal/unrecognized `status`): those are now dropped instead of rendered, matching what the finalized backend contract guarantees can no longer occur. - **Dependencies**: None new — `@comfyorg/ingest-types` is an existing workspace dependency; only its generated content changed (via cherry-picked commit). **Before** (`agentApiSchema.ts`): ```ts export const zPersistedToolCallSummary = z .object({ id: z.string(), tool_call_id: z.string().optional(), tool_name: z.string(), status: z.string().optional(), duration_ms: z.unknown().optional() }) .passthrough() ``` **After**: ```ts import { zToolCallSummary } from '@comfyorg/ingest-types/zod' // ... export const zPersistedToolCallSummary = zToolCallSummary ``` - The codegen-gap fix (`zAgentMessageContent`) is the part most worth a second look — it's necessary for anything to compile/parse once `content`'s zod schema tightened, but it's patching a mismatch between the OpenAPI-generated TS type and its zod counterpart rather than something this PR set out to change. Cloud/codegen maintainers may want to fix this upstream (route `additionalProperties`/index-signature cases through `.passthrough()` in the zod plugin) so future consumers don't need this kind of local patch. - `tool_call_id` is now required and `status` is a closed `'success' | 'error'` enum — I removed the old `id`-fallback and broadened-status-vocabulary handling in `agentTranscript.ts` accordingly, trusting the backend's own docstring that only terminal, `tool_call_id`-bearing rows are ever persisted. Worth a sanity check against how `services/agent/internal/persist.ToolCallSummary` actually writes these rows. - Verification: `pnpm typecheck` (repo-wide, clean) and `pnpm test:unit` for every changed/affected file — `agentApiSchema.test.ts`, `agentTranscript.test.ts` (34 tests), `agentEventTransport.test.ts`, `agentConversationStore.test.ts` — all green. Did not run the full unit suite; a large, pre-existing and unrelated set of `.vue`-component test files fail in this environment with `Cannot find package '@vue/compiler-sfc'` even on unmodified `main` (verified via `git stash`), so that failure is not from this change. --- _Requested by **Christian Byrne** · #comfy-agent-user-feedback_ --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org>
…ma (#19585) ## Summary Replaces the interim hand-written `zPersistedToolCallSummary` zod schema in `agentApiSchema.ts` with the generated `zToolCallSummary` from `@comfyorg/ingest-types/zod`, now that [Comfy-Org/cloud#10360](Comfy-Org/cloud#10360) added the `ToolCallSummary` OpenAPI schema for persisted tool-call history. ## Base branch note `main` does not yet have `ToolCallSummary` in `packages/ingest-types` — the automated type-update PR that adds it, #19526, is still open (unmerged) at the time of this PR. Its single commit (`c819ad46`) is a pure, isolated `packages/ingest-types` regen with no conflicts against `main`'s tip, so I cherry-picked just that commit onto a fresh branch off `main` rather than basing on #19526's own branch, to keep this PR's history clean and independent of that bot-managed branch's future churn. If #19526 merges first, this PR's first commit becomes a no-op on rebase; if this merges first, #19526 will need a trivial rebase. ## Changes - **What**: - `zPersistedToolCallSummary` now aliases the generated `zToolCallSummary` directly instead of a hand-rolled permissive schema. - Fixed a codegen gap this surfaced: `AgentMessage.content`'s generated **TS type** keeps a `[key: string]: unknown` index signature, but its generated **zod schema** dropped `z.record(z.unknown())` for a bare `{ tool_calls }` object with no `.passthrough()` — which would otherwise reject every other `content` field (`text`, `attachments`, `workflow_references`, ...) this file relies on. Added a local `zAgentMessageContent` (tool_calls typed via `zToolCallSummary`, `.passthrough()` for the rest) to bridge it. - Updated `agentTranscript.ts`'s `parseToolCallEntry`/`toolCallPartState`/`toolCallOk` now that `tool_call_id` is guaranteed present and `status` is closed to `'success' | 'error'` (previously `z.string().optional()` with an `id`-fallback for pre-`tool_call_id` rows). - Updated test fixtures in `agentTranscript.test.ts`, `agentEventTransport.test.ts`, and `agentConversationStore.test.ts` to match the tightened contract (valid fixtures now include `tool_call_id` + `'success'/'error'` status; fixtures deliberately testing malformed/legacy shapes now assert the entry is **dropped** rather than rendered with a broadened status vocabulary, matching the generated schema's own docstring: "a row a dead turn left in pending/running ... is dropped rather than shown as a perpetual-progress chip"). - **Breaking**: None externally — this is FE-internal parsing of already-persisted rows. Behavior only changes for the never-before-possible edge cases the interim schema was defensively permissive about (a persisted row missing `tool_call_id`, or carrying a non-terminal/unrecognized `status`): those are now dropped instead of rendered, matching what the finalized backend contract guarantees can no longer occur. - **Dependencies**: None new — `@comfyorg/ingest-types` is an existing workspace dependency; only its generated content changed (via cherry-picked commit). ## Before / After **Before** (`agentApiSchema.ts`): ```ts export const zPersistedToolCallSummary = z .object({ id: z.string(), tool_call_id: z.string().optional(), tool_name: z.string(), status: z.string().optional(), duration_ms: z.unknown().optional() }) .passthrough() ``` **After**: ```ts import { zToolCallSummary } from '@comfyorg/ingest-types/zod' // ... export const zPersistedToolCallSummary = zToolCallSummary ``` ## Review Focus - The codegen-gap fix (`zAgentMessageContent`) is the part most worth a second look — it's necessary for anything to compile/parse once `content`'s zod schema tightened, but it's patching a mismatch between the OpenAPI-generated TS type and its zod counterpart rather than something this PR set out to change. Cloud/codegen maintainers may want to fix this upstream (route `additionalProperties`/index-signature cases through `.passthrough()` in the zod plugin) so future consumers don't need this kind of local patch. - `tool_call_id` is now required and `status` is a closed `'success' | 'error'` enum — I removed the old `id`-fallback and broadened-status-vocabulary handling in `agentTranscript.ts` accordingly, trusting the backend's own docstring that only terminal, `tool_call_id`-bearing rows are ever persisted. Worth a sanity check against how `services/agent/internal/persist.ToolCallSummary` actually writes these rows. - Verification: `pnpm typecheck` (repo-wide, clean) and `pnpm test:unit` for every changed/affected file — `agentApiSchema.test.ts`, `agentTranscript.test.ts` (34 tests), `agentEventTransport.test.ts`, `agentConversationStore.test.ts` — all green. Did not run the full unit suite; a large, pre-existing and unrelated set of `.vue`-component test files fail in this environment with `Cannot find package '@vue/compiler-sfc'` even on unmodified `main` (verified via `git stash`), so that failure is not from this change. --- _Requested by **Christian Byrne** · #comfy-agent-user-feedback_ --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org>
…rsisted tool-call schema (#19606) Backport of #19585 to `cloud/1.54` Automatically created by backport workflow. Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org>
…sisted tool-call schema (#19585) (#19608) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://Comfy-Org.slack.com/archives/C0BGH348Z0C/p1789885354111069)_ Backport of #19585 to `core/1.54`. ## Conflict resolution note The automated `pr-backport.yaml` bot attempted this backport and failed with cherry-pick conflicts in two generated OpenAPI files: `packages/ingest-types/src/types.gen.ts` and `packages/ingest-types/src/zod.gen.ts`. The conflicts were **not** logical conflicts with this PR's change. `core/1.54`'s `packages/ingest-types` was generated from an older spec snapshot that predates an unrelated `RenewalInvoice` billing type present on `main`. A naive cherry-pick would have spliced that unrelated type into this branch's generated client alongside the actual fix. Resolution: kept only #19585's actual change (the `ToolCallSummary` type/schema addition and the `AgentMessage.content.tool_calls` field + docstring update), dropped the unrelated `RenewalInvoice` hunk that doesn't belong on this branch. Verified the resulting diff against `origin/core/1.54` is minimal and matches exactly what #19585 needs (`git diff --stat`: 2 files, +50/-2). ## Verification - `pnpm typecheck` — clean - `pnpm test:unit` on the 4 changed/affected test files (`agentApiSchema.test.ts`, `agentTranscript.test.ts`, `agentEventTransport.test.ts`, `agentConversationStore.test.ts`) — 163 passed 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb --- _Generated by [Claude Code](https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb)_ Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org>
…ma (#19585) Replaces the interim hand-written zPersistedToolCallSummary zod schema in agentApiSchema.ts with the generated zToolCallSummary from @comfyorg/ingest-types/zod, now that Comfy-Org/cloud#10360 added the ToolCallSummary OpenAPI schema for persisted tool-call history. Backport of #19585 to core/1.55. Manual backport: the automated bot's cherry-pick conflicted in packages/ingest-types/src/{types,zod}.gen.ts. The conflict was unrelated codegen drift (an unrelated RenewalInvoice billing type present on main but not yet generated on core/1.55) rather than a real conflict with this PR's change. Resolved by keeping only this PR's actual addition (ToolCallSummary type/schema, AgentMessage.content.tool_calls field) and dropping the unrelated RenewalInvoice hunk. Claude-Session: https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
…ma (#19585) ## Summary Replaces the interim hand-written `zPersistedToolCallSummary` zod schema in `agentApiSchema.ts` with the generated `zToolCallSummary` from `@comfyorg/ingest-types/zod`, now that [Comfy-Org/cloud#10360](Comfy-Org/cloud#10360) added the `ToolCallSummary` OpenAPI schema for persisted tool-call history. ## Base branch note `main` does not yet have `ToolCallSummary` in `packages/ingest-types` — the automated type-update PR that adds it, #19526, is still open (unmerged) at the time of this PR. Its single commit (`c819ad46`) is a pure, isolated `packages/ingest-types` regen with no conflicts against `main`'s tip, so I cherry-picked just that commit onto a fresh branch off `main` rather than basing on #19526's own branch, to keep this PR's history clean and independent of that bot-managed branch's future churn. If #19526 merges first, this PR's first commit becomes a no-op on rebase; if this merges first, #19526 will need a trivial rebase. ## Changes - **What**: - `zPersistedToolCallSummary` now aliases the generated `zToolCallSummary` directly instead of a hand-rolled permissive schema. - Fixed a codegen gap this surfaced: `AgentMessage.content`'s generated **TS type** keeps a `[key: string]: unknown` index signature, but its generated **zod schema** dropped `z.record(z.unknown())` for a bare `{ tool_calls }` object with no `.passthrough()` — which would otherwise reject every other `content` field (`text`, `attachments`, `workflow_references`, ...) this file relies on. Added a local `zAgentMessageContent` (tool_calls typed via `zToolCallSummary`, `.passthrough()` for the rest) to bridge it. - Updated `agentTranscript.ts`'s `parseToolCallEntry`/`toolCallPartState`/`toolCallOk` now that `tool_call_id` is guaranteed present and `status` is closed to `'success' | 'error'` (previously `z.string().optional()` with an `id`-fallback for pre-`tool_call_id` rows). - Updated test fixtures in `agentTranscript.test.ts`, `agentEventTransport.test.ts`, and `agentConversationStore.test.ts` to match the tightened contract (valid fixtures now include `tool_call_id` + `'success'/'error'` status; fixtures deliberately testing malformed/legacy shapes now assert the entry is **dropped** rather than rendered with a broadened status vocabulary, matching the generated schema's own docstring: "a row a dead turn left in pending/running ... is dropped rather than shown as a perpetual-progress chip"). - **Breaking**: None externally — this is FE-internal parsing of already-persisted rows. Behavior only changes for the never-before-possible edge cases the interim schema was defensively permissive about (a persisted row missing `tool_call_id`, or carrying a non-terminal/unrecognized `status`): those are now dropped instead of rendered, matching what the finalized backend contract guarantees can no longer occur. - **Dependencies**: None new — `@comfyorg/ingest-types` is an existing workspace dependency; only its generated content changed (via cherry-picked commit). ## Before / After **Before** (`agentApiSchema.ts`): ```ts export const zPersistedToolCallSummary = z .object({ id: z.string(), tool_call_id: z.string().optional(), tool_name: z.string(), status: z.string().optional(), duration_ms: z.unknown().optional() }) .passthrough() ``` **After**: ```ts import { zToolCallSummary } from '@comfyorg/ingest-types/zod' // ... export const zPersistedToolCallSummary = zToolCallSummary ``` ## Review Focus - The codegen-gap fix (`zAgentMessageContent`) is the part most worth a second look — it's necessary for anything to compile/parse once `content`'s zod schema tightened, but it's patching a mismatch between the OpenAPI-generated TS type and its zod counterpart rather than something this PR set out to change. Cloud/codegen maintainers may want to fix this upstream (route `additionalProperties`/index-signature cases through `.passthrough()` in the zod plugin) so future consumers don't need this kind of local patch. - `tool_call_id` is now required and `status` is a closed `'success' | 'error'` enum — I removed the old `id`-fallback and broadened-status-vocabulary handling in `agentTranscript.ts` accordingly, trusting the backend's own docstring that only terminal, `tool_call_id`-bearing rows are ever persisted. Worth a sanity check against how `services/agent/internal/persist.ToolCallSummary` actually writes these rows. - Verification: `pnpm typecheck` (repo-wide, clean) and `pnpm test:unit` for every changed/affected file — `agentApiSchema.test.ts`, `agentTranscript.test.ts` (34 tests), `agentEventTransport.test.ts`, `agentConversationStore.test.ts` — all green. Did not run the full unit suite; a large, pre-existing and unrelated set of `.vue`-component test files fail in this environment with `Cannot find package '@vue/compiler-sfc'` even on unmodified `main` (verified via `git stash`), so that failure is not from this change. --- _Requested by **Christian Byrne** · #comfy-agent-user-feedback_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb --- _Generated by [Claude Code](https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb)_ --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org>
…rsisted tool-call schema (#19607) Backport of #19585 to `cloud/1.55` Automatically created by backport workflow. Justification: Agent release-backport authority covers cloud/1.55. Exact head 30c177d is tree-equivalent to the reviewed carrier except prohibited co-author trailers, has 112 terminal success/neutral/skipped checks, no unresolved reviewer objection, and passed the target-aware gate against cloud/1.55@7e2d6c9a81dc295270e2a67bcbc2bb6d081f7044. --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: Claude <noreply@anthropic.com>
|
|
|
…ma (#19585) Replaces the interim hand-written zPersistedToolCallSummary zod schema in agentApiSchema.ts with the generated zToolCallSummary from @comfyorg/ingest-types/zod, now that Comfy-Org/cloud#10360 added the ToolCallSummary OpenAPI schema for persisted tool-call history. Backport of #19585 to core/1.55. Manual backport: the automated bot's cherry-pick conflicted in packages/ingest-types/src/{types,zod}.gen.ts. The conflict was unrelated codegen drift (an unrelated RenewalInvoice billing type present on main but not yet generated on core/1.55) rather than a real conflict with this PR's change. Resolved by keeping only this PR's actual addition (ToolCallSummary type/schema, AgentMessage.content.tool_calls field) and dropping the unrelated RenewalInvoice hunk. Claude-Session: https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
…sisted tool-call schema (#19585) (#19609) Backport of #19585 to `core/1.55`. ## Scope Carries the merged generated `ToolCallSummary` persisted-history contract and its existing tests across nine files: - generated ingest types/schema exports and `AgentMessage.content.tool_calls` - Agent persisted-schema and transcript normalization updates - transcript, event-transport, and conversation-store unit coverage - `agentToolCallHistoryPersistence.spec.ts` black-box reload/chat-switch proof The generated-file conflict was target drift: `main` also contained an unrelated `RenewalInvoice` type absent from `core/1.55`. This carrier keeps only #19585 content and does not import that unrelated generated hunk. A scope repair removed four unrelated follow-up commits (website catalog count, billing checkout re-quote, malformed historical-row compatibility policy, and Agent paywall restoration). The resulting range is one commit based directly on the current `core/1.55` tip. ## Verification - 130 focused transcript/event/store unit tests passed - `pnpm typecheck:browser` passed - `agentToolCallHistoryPersistence.spec.ts` passed on the cloud Playwright project - Hosted checks must re-run at the repaired exact head before landing Co-authored-by: Claude <noreply@anthropic.com>
Port #18152's own delta onto cloud/1.54, rebased onto 22e29bc so the branch fast-forwards. Eight files carry the source's added and removed lines unchanged; useAgentSession.ts and its test carry three adaptations, each for an API main has and this release line does not: - THREAD_STORAGE_KEY (the unscoped key this branch already uses) in place of StorageKeys.agentThread(), which comes from #17765. (g15) asserts that key. - The recovery reportError omits `surface`, which comes from #19230. - agentTranscript.ts keeps this branch's pre-#19585 zPersistedToolCallSummary handling (the .pick(), the `toolCallId ?? id` fallback, and the `ok` success alias); only #18152's own hunks are applied, including the toolCallPartState doc-comment correction, worded onto this branch's text. Resolved against #19734, which landed on cloud/1.54 after the previous head was built: start() keeps that PR's initializeWorkflowContext/{restore} shape with #18152's `connection = 'initial'`, and hydrateFromServer keeps its readyThreadId/workflowReady block with reconcileLiveTurns() at the source's position. Because #19734 introduced onThreadActivated, forgetDeletedThread now carries the source's onThreadActivated?.(null) instead of dropping it. Addresses #19697 (review) Addresses #19697 (review)
…reconnect (#19697) Manual backport of #18152 after the automated cherry-pick conflicted. Preserves active Agent turns across transient socket disconnects and reconciles them from persisted REST history. Original: #18152 ## What this branch contains #18152's own delta, cherry-picked onto `cloud/1.54` and rebased onto `22e29bc94e` so the branch fast-forwards. Eight of the eleven files carry the source's added and removed lines unchanged: `agentTurnLockFixture.ts`, both browser specs, `agentRestClient.ts` and its test, `agentTranscript.test.ts`, and `agentConversationStore.ts` and its test. ## Adaptations, and why each one is needed Each of these stands in for an API that exists on `main` and not on this release line. | Adaptation | Reason | | --- | --- | | `THREAD_STORAGE_KEY` (the unscoped key this branch already uses) in place of `StorageKeys.agentThread()`; `(g15)` asserts that key | Workspace-scoped agent thread storage comes from #17765, which is not on this line | | The recovery `reportError` omits `surface` | `ReportErrorOptions.surface` comes from #19230 | | `agentTranscript.ts` keeps this branch's pre-#19585 `zPersistedToolCallSummary` handling — the `.pick()`, the `toolCallId ?? id` fallback, and the `ok` success alias. Only #18152's own hunks are applied, including the `toolCallPartState` doc-comment correction, worded onto this branch's text | The generated `ToolCallSummary` schema change comes from #19585; on this line `tool_call_id` is still optional | Nothing else diverges from the source: `useAgentSession.ts`'s and `agentTranscript.ts`'s remaining added and removed lines are the source's, and all 22 source test additions are present with the `(g3)`/`(g4)` pins un-failed. ## Conflict resolution against #19734 #19734 landed on `cloud/1.54` after the previous head was built, and is what the branch conflicted with. - `start()` keeps #19734's `initializeWorkflowContext` / `{ restore }` shape and takes #18152's one change to it, `everLive = false` → `connection = 'initial'`. - `hydrateFromServer()` keeps #19734's `readyThreadId` / `workflowReady` block and takes `reconcileLiveTurns()` at the source's position, immediately after `conversationStore.hydrate(history)`. - #19734 also introduced `onThreadActivated`, so `forgetDeletedThread` now carries the source's `onThreadActivated?.(null)` rather than dropping it. That drop was a necessary adaptation against the previous merge base and is no longer one. ## Verification at this head - `vue-tsc --noEmit`: clean. - `vitest run` over `useAgentSession.test.ts`, `services/agent/`, and `stores/agent/`: 556 passed across 21 files. - `oxfmt --check`, `oxlint --type-aware`, `oxlint:audit`, `eslint`: clean. - `agentTurnSurvivesSocketDrop.spec.ts` + `agentApprovalSurvivesSocketDrop.spec.ts` on the `cloud` project against a `DISTRIBUTION=cloud` dev server: **10/10 passed**. - Red-on-parent control: with only the four production files reverted to `cloud/1.54` and the specs kept, **6 of those 10 fail** and the 4 socket-never-drops / normal-completion controls still pass — so the reconnect behaviour this backport carries is what the specs are measuring.
dante01yoon's second review round on #19621 found that status was the one field in zPersistedToolCallSummary not restored to the pre-#19585 baseline's tolerance: it stayed required/non-nullable while tool_call_id and duration_ms were already .nullish(). A historical row missing status, or carrying status: null (a Go pointer field serialized without omitempty), still failed safeParse and dropped the tool-call chip from the restored transcript -- the exact bug class this PR fixes, just not fully closed. Also documents the non-blocking nit: isTerminalStatus(undefined) is true by design, so a tool part reached through an untracked path is treated as already-settled and never overwritten by appendAssistantContent's dedupe. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
dante01yoon's second review round on #19621 found that status was the one field in zPersistedToolCallSummary not restored to the pre-#19585 baseline's tolerance: it stayed required/non-nullable while tool_call_id and duration_ms were already .nullish(). A historical row missing status, or carrying status: null (a Go pointer field serialized without omitempty), still failed safeParse and dropped the tool-call chip from the restored transcript -- the exact bug class this PR fixes, just not fully closed. Also documents the non-blocking nit: isTerminalStatus(undefined) is true by design, so a tool part reached through an untracked path is treated as already-settled and never overwritten by appendAssistantContent's dedupe. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
…ad (#19621) ## Summary A single malformed historical tool-call row in a persisted agent conversation throws during schema validation and fails loading the **entire** conversation's message history, instead of degrading just that one entry. ## Changes - **What**: Relaxes the message-parse boundary's `content.tool_calls` field (`agentApiSchema.ts`) from the strict generated schema to `z.unknown().optional()`, so a malformed entry can never throw inside `zAgentMessages.parse()` (called, not safe-parsed, by `agentRestClient.ts`'s `getMessages()`). `agentTranscript.ts`'s `parseToolCallEntry` now validates only the fields it actually reads (via `.pick()` against a relaxed `zPersistedToolCallSummary`), restores the `tool_call_id ?? id` fallback for rows that predate `tool_call_id`, and treats the older `'ok'` status alias the same as `'success'`. - **Breaking**: None. - **Dependencies**: None. ## Review Focus This is a regression from #19585, which tightened `content.tool_calls` to the generated schema (`z.array(zToolCallSummary)` — requires `tool_call_id`, closes `status` to `'success' | 'error'`, requires an integer `duration_ms`). Any historical row that predates one of those fields, or uses the older `'ok'` status alias, now throws during `.parse()` and fails the whole array/message/response parse — surfacing as `agent_history_load_failed` for the **entire conversation** rather than degrading gracefully. `agentTranscript.test.ts` adds a regression test that exercises the actual `zAgentMessages.parse()` boundary with a malformed row, confirming the whole history still loads and only that one tool-call entry degrades. **Before**: one malformed historical tool-call row → the whole conversation's history fails to load. **After**: only that one tool-call entry degrades; the rest of the conversation loads normally. ## Screenshots (if applicable) N/A — schema/parsing fix, no visual change. <!-- ccr-slack-attribution --> _Requested by **Christian Byrne**_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb --- _Generated by [Claude Code](https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb)_ --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Summary
Replaces the interim hand-written
zPersistedToolCallSummaryzod schema inagentApiSchema.tswith the generatedzToolCallSummaryfrom@comfyorg/ingest-types/zod, now that Comfy-Org/cloud#10360 added theToolCallSummaryOpenAPI schema for persisted tool-call history.Base branch note
maindoes not yet haveToolCallSummaryinpackages/ingest-types— the automated type-update PR that adds it, #19526, is still open (unmerged) at the time of this PR. Its single commit (c819ad46) is a pure, isolatedpackages/ingest-typesregen with no conflicts againstmain's tip, so I cherry-picked just that commit onto a fresh branch offmainrather than basing on #19526's own branch, to keep this PR's history clean and independent of that bot-managed branch's future churn. If #19526 merges first, this PR's first commit becomes a no-op on rebase; if this merges first, #19526 will need a trivial rebase.Changes
zPersistedToolCallSummarynow aliases the generatedzToolCallSummarydirectly instead of a hand-rolled permissive schema.AgentMessage.content's generated TS type keeps a[key: string]: unknownindex signature, but its generated zod schema droppedz.record(z.unknown())for a bare{ tool_calls }object with no.passthrough()— which would otherwise reject every othercontentfield (text,attachments,workflow_references, ...) this file relies on. Added a localzAgentMessageContent(tool_calls typed viazToolCallSummary,.passthrough()for the rest) to bridge it.agentTranscript.ts'sparseToolCallEntry/toolCallPartState/toolCallOknow thattool_call_idis guaranteed present andstatusis closed to'success' | 'error'(previouslyz.string().optional()with anid-fallback for pre-tool_call_idrows).agentTranscript.test.ts,agentEventTransport.test.ts, andagentConversationStore.test.tsto match the tightened contract (valid fixtures now includetool_call_id+'success'/'error'status; fixtures deliberately testing malformed/legacy shapes now assert the entry is dropped rather than rendered with a broadened status vocabulary, matching the generated schema's own docstring: "a row a dead turn left in pending/running ... is dropped rather than shown as a perpetual-progress chip").tool_call_id, or carrying a non-terminal/unrecognizedstatus): those are now dropped instead of rendered, matching what the finalized backend contract guarantees can no longer occur.@comfyorg/ingest-typesis an existing workspace dependency; only its generated content changed (via cherry-picked commit).Before / After
Before (
agentApiSchema.ts):After:
Review Focus
zAgentMessageContent) is the part most worth a second look — it's necessary for anything to compile/parse oncecontent's zod schema tightened, but it's patching a mismatch between the OpenAPI-generated TS type and its zod counterpart rather than something this PR set out to change. Cloud/codegen maintainers may want to fix this upstream (routeadditionalProperties/index-signature cases through.passthrough()in the zod plugin) so future consumers don't need this kind of local patch.tool_call_idis now required andstatusis a closed'success' | 'error'enum — I removed the oldid-fallback and broadened-status-vocabulary handling inagentTranscript.tsaccordingly, trusting the backend's own docstring that only terminal,tool_call_id-bearing rows are ever persisted. Worth a sanity check against howservices/agent/internal/persist.ToolCallSummaryactually writes these rows.pnpm typecheck(repo-wide, clean) andpnpm test:unitfor every changed/affected file —agentApiSchema.test.ts,agentTranscript.test.ts(34 tests),agentEventTransport.test.ts,agentConversationStore.test.ts— all green. Did not run the full unit suite; a large, pre-existing and unrelated set of.vue-component test files fail in this environment withCannot find package '@vue/compiler-sfc'even on unmodifiedmain(verified viagit stash), so that failure is not from this change.Requested by Christian Byrne · #comfy-agent-user-feedback
🤖 Generated with Claude Code
https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
Generated by Claude Code