Repository navigation
[backport cloud/1.60] fix(agent): empty composer on New Chat, keep the draft across a refresh (#21588, #22821) - #22940
Conversation
## Summary New Chat now starts with an empty composer. Before, it retargeted to the tab on screen (PM-1321) but kept the unsent draft, so text written about workflow A followed the user into a new chat on workflow B. **Design call for review:** this reverses one part of #18693, which deliberately carried the draft (and its node references, with their original target) through New Chat. PM-2251 and the original PM-1321 acceptance both ask for an empty composer, so the two cannot both hold. Needs a yes/no from the agent UI owner before merge. Fixes PM-2251 <details><summary>Full context</summary> ### What changed - `agentComposerStore.clearDraft()` resets text, references (workflow, node, asset, skill), attachments, insertion point and prompt origin. - `AgentPanelRoot.onNewChat()` calls it instead of only clearing workflow references, and always resumes following the visible workflow. The old `retainWorkflowTarget()` branch existed only for node references carried by the draft; none survive now. ### Behaviour change versus #18693 | Case | Before | After | | --- | --- | --- | | Unsent text, switch tab, New Chat | text kept, now aimed at the new tab | empty composer, follows the new tab | | Unsent text with node references, New Chat | draft and chips kept, target stays on the original workflow | empty composer, follows the visible tab | | Fresh chat, switch tabs (no New Chat) | draft kept while following | unchanged | | Switch chats via history | draft kept | unchanged (not in PM-2251's acceptance; flagged there as worth a separate look) | Three `AgentPanelRoot.test.ts` cases asserted the carry-through; they now assert the empty composer. The node-reference case now asserts the chip is dropped and the target follows the tab on screen. ### Verification - Browser harness, `agentNewChatTargetWorkflow.spec.ts` PM-1322 case extended to leave an unsent draft before switching tabs: - parent `606fbc634c`: fails at `expect(composer).toHaveText('')`, received `Only edit workflow A`; PM-1415 control passes - this branch: 2/2 pass. The spec attaches before/after New Chat screenshots to the CI report; after shows the placeholder and target `Unsaved Workflow (2)`. - Adjacent agent specs that press New Chat (10 files, 21 tests): all pass locally on cloud distribution. - `vitest run src/workbench/extensions/agent/`: 178 files, 4037 passed. - `pnpm typecheck`, eslint, oxfmt, pre-push knip/fallow: clean. ### Related - PM-1321 / PM-1322: same QA case; target half fixed in #18196. - PM-2002 (draft lost on refresh) pulls the other way on the same state. This PR does not add draft persistence. </details> (cherry picked from commit 5d8e08b)
## Summary Refreshing the page no longer wipes an unsent Agent chat draft. The draft comes back in the same chat after a reload; New Chat and a successful send still clear it. - Restored: typed text and workflow `@` mentions. - Not restored: attachments (in-memory blobs, they would come back as broken thumbnails), node mentions (tied to a tab instance), and skill mentions (tied to the skill-pack scope loaded at runtime). They are dropped; the text stays. - Keeps #21588: `clearDraft()` on New Chat clears the saved draft, so it does not come back after a reload. Fixes PM-2002 ## Verification - New black-box spec `browser_tests/tests/agent/agentComposerDraftSurvivesReload.spec.ts`: type a draft, reload, the composer shows it; New Chat, reload, the composer is empty with its placeholder. **Red on `main`** (`Expected: "Make the background a sunset over the ocean"`, `Received: ""`), **green on this branch**. - A version that kept the draft after New Chat fails the spec's second step. - Unit tests in `agentComposerStore.test.ts` cover what the browser case cannot reach: no restore into a different chat, node mentions and attachments dropped, the saved draft forgotten after send and after `clearDraft()`, and a malformed saved draft discarded without breaking the composer. Each one fails against a specific wrong implementation. - Also ran `agentNewChatTargetWorkflow.spec.ts` and `agentChatRefreshPersistence.spec.ts`: green. `pnpm typecheck`, `typecheck:browser` and lint are clean. <details><summary>Full context for agent readers</summary> ### How it works - `agentComposerStore` keeps the draft in `localStorage` under `StorageKeys.agentComposerDraft(workspaceId)` as `{ threadId, text, workflowReferences }`. It writes `null` once the draft is empty, so a send (`startSubmission`) or New Chat (`clearDraft`) removes it. - Nothing is written until `AgentPanelRoot` reports the open chat through `trackDraftThread(threadId)`. That call is registered right after `useAgentSession.start()`, which has already moved `threadId` to the chat being restored (`Comfy.Agent.ThreadId:*`). This prevents the empty composer on a fresh page load from overwriting the draft before it is restored. - The first `trackDraftThread` call restores the saved draft only if its `threadId` matches the open chat (a new chat with no thread matches `null`) and the composer is empty. Later calls retag the saved draft to whichever chat the composer is in, so it matches what the user sees in memory. - The restore goes through the existing `replaceDraft()` / `snapshotReferences()` path with `attachments: []`. - The saved value is parsed with a zod schema before restoring. A wrong shape (for example `null` text) is removed from localStorage and nothing is restored, so a bad entry cannot throw on every panel start. - `clearAllWorkspaceStorage()` now also clears `Comfy.Agent.ComposerDraft:*`, matching the other per-workspace Agent keys. ### Review route `src/platform/workflow/persistence/base/storageKeys.ts` and `storageIO.ts` are owned only by `@Comfy-Org/comfy_frontend_devs`, so the program-owned route does not apply. Assigned to @dante01yoon. ### Known limits - A draft that is mid-send when the page reloads is not restored. The send already cleared it, and a failed send restores it in memory only. - If the restored thread fails to hydrate and the session falls back to a new chat, the draft stays in the composer (retagged to the new chat). This matches how the in-memory draft already behaves when you switch chats. </details> (cherry picked from commit 70046f1)
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords: 2
Please check the settings in the CodeRabbit UI or the
|
📦 Bundle: ⏳ Size data collection in progress…⚡ Performance: ❌ 7 below 52 FPS target · ℹ️ No baseline — significance unavailable
DetailsScenario timings
Absolute values
Raw data{
"timestamp": "2026-11-05T01:04:22.625Z",
"gitSha": "e067c492a29d23c3222678590a749e43f060fd24",
"branch": "backport-21588-to-cloud-1.60",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2024.3939999999725,
"styleRecalcs": 9,
"styleRecalcDurationMs": 1.8679999999999999,
"layouts": 9,
"layoutDurationMs": 1.9149999999999998,
"taskDurationMs": 554.092,
"heapDeltaBytes": -2039384,
"heapUsedBytes": 60333004,
"domNodes": -178,
"jsHeapTotalBytes": 8126464,
"scriptDurationMs": 9.972,
"eventListeners": -69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6655737704918,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "canvas-idle",
"durationMs": 2040.3929999999946,
"styleRecalcs": 9,
"styleRecalcDurationMs": 1.8660000000000005,
"layouts": 9,
"layoutDurationMs": 1.7510000000000001,
"taskDurationMs": 486.27099999999996,
"heapDeltaBytes": -25891732,
"heapUsedBytes": 52206920,
"domNodes": -178,
"jsHeapTotalBytes": 9961472,
"scriptDurationMs": 8.456999999999997,
"eventListeners": -69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665573770491804,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1708.3179999999913,
"styleRecalcs": 73,
"styleRecalcDurationMs": 10.825999999999999,
"layouts": 9,
"layoutDurationMs": 1.7650000000000001,
"taskDurationMs": 770.3389999999999,
"heapDeltaBytes": 658136,
"heapUsedBytes": 61416596,
"domNodes": 0,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 132.62500000000003,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1717.4939999999879,
"styleRecalcs": 73,
"styleRecalcDurationMs": 9.238,
"layouts": 8,
"layoutDurationMs": 1.4850000000000003,
"taskDurationMs": 727.445,
"heapDeltaBytes": 10788780,
"heapUsedBytes": 71130184,
"domNodes": -178,
"jsHeapTotalBytes": 3407872,
"scriptDurationMs": 114.875,
"eventListeners": -69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666990291262138,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1724.3070000000102,
"styleRecalcs": 18,
"styleRecalcDurationMs": 5.011999999999999,
"layouts": 12,
"layoutDurationMs": 2.675,
"taskDurationMs": 377.57099999999997,
"heapDeltaBytes": 7234568,
"heapUsedBytes": 84257208,
"domNodes": 57,
"jsHeapTotalBytes": 9699328,
"scriptDurationMs": 11.92,
"eventListeners": 43,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846156,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1725.6909999999834,
"styleRecalcs": 18,
"styleRecalcDurationMs": 3.718,
"layouts": 11,
"layoutDurationMs": 2.286,
"taskDurationMs": 347.331,
"heapDeltaBytes": 7804908,
"heapUsedBytes": 84310160,
"domNodes": 57,
"jsHeapTotalBytes": 10485760,
"scriptDurationMs": 10.754,
"eventListeners": 43,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666346153846153,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-clipping",
"durationMs": 575.0149999999792,
"styleRecalcs": 14,
"styleRecalcDurationMs": 1.9589999999999999,
"layouts": 10,
"layoutDurationMs": 1.9430000000000003,
"taskDurationMs": 422.94200000000006,
"heapDeltaBytes": 6695784,
"heapUsedBytes": 76303896,
"domNodes": 0,
"jsHeapTotalBytes": 8650752,
"scriptDurationMs": 138.911,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.668571428571433,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 574.8320000000149,
"styleRecalcs": 13,
"styleRecalcDurationMs": 1.4819999999999998,
"layouts": 8,
"layoutDurationMs": 1.3800000000000001,
"taskDurationMs": 390.228,
"heapDeltaBytes": 2727800,
"heapUsedBytes": 63205328,
"domNodes": 0,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 126.11999999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667647058823537,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1117.8359999999827,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 769.564,
"heapDeltaBytes": 14020976,
"heapUsedBytes": 101921532,
"domNodes": -148,
"jsHeapTotalBytes": 21786624,
"scriptDurationMs": 46.027,
"eventListeners": -107,
"totalBlockingTimeMs": 479,
"frameDurationMs": 32.841176470588245,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1047.1830000000182,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 710.0829999999999,
"heapDeltaBytes": 23693432,
"heapUsedBytes": 86307476,
"domNodes": 0,
"jsHeapTotalBytes": 10649600,
"scriptDurationMs": 55.285000000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 416,
"frameDurationMs": 30.88235294117647,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 746.8100000000106,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 374.9870000000004,
"heapDeltaBytes": -2804156,
"heapUsedBytes": 72879236,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 112.44500000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 133,
"frameDurationMs": 22.058823529411764,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 778.7940000000049,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 446.0519999999999,
"heapDeltaBytes": -27261148,
"heapUsedBytes": 66682356,
"domNodes": -208,
"jsHeapTotalBytes": 4587520,
"scriptDurationMs": 118.87899999999999,
"eventListeners": -107,
"totalBlockingTimeMs": 134,
"frameDurationMs": 22.380000000000006,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "extension-clean-combined-draw",
"durationMs": 8797.00299999999,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.2000000000000005,
"layouts": 1,
"layoutDurationMs": 0.2170000000000002,
"taskDurationMs": 7835.337,
"heapDeltaBytes": 59974748,
"heapUsedBytes": 142566312,
"domNodes": -274,
"jsHeapTotalBytes": 60944384,
"scriptDurationMs": 5965.248,
"eventListeners": -69,
"totalBlockingTimeMs": 147,
"frameDurationMs": 25.286206896551725,
"p95FrameDurationMs": 50
},
{
"name": "extension-clean-combined-draw",
"durationMs": 7377.0150000000285,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.22199999999999998,
"layouts": 1,
"layoutDurationMs": 0.20300000000000007,
"taskDurationMs": 6548.669999999999,
"heapDeltaBytes": 26575868,
"heapUsedBytes": 121607236,
"domNodes": -274,
"jsHeapTotalBytes": 56487936,
"scriptDurationMs": 4917.478,
"eventListeners": -69,
"totalBlockingTimeMs": 65,
"frameDurationMs": 24.20655737704918,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 8097.598000000005,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.053000000000000096,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7254.998,
"heapDeltaBytes": 78527460,
"heapUsedBytes": 155036108,
"domNodes": -274,
"jsHeapTotalBytes": 71692288,
"scriptDurationMs": 5525.090999999999,
"eventListeners": -69,
"totalBlockingTimeMs": 132,
"frameDurationMs": 24.947222222222223,
"p95FrameDurationMs": 33.5
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 7139.184,
"styleRecalcs": 3,
"styleRecalcDurationMs": 0.5320000000000004,
"layouts": 2,
"layoutDurationMs": 0.5369999999999997,
"taskDurationMs": 6362.552,
"heapDeltaBytes": 44107656,
"heapUsedBytes": 120089416,
"domNodes": -274,
"jsHeapTotalBytes": 52293632,
"scriptDurationMs": 4772.693,
"eventListeners": -69,
"totalBlockingTimeMs": 88,
"frameDurationMs": 24.59689655172414,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "large-combo-open",
"durationMs": 190.0579999999934,
"styleRecalcs": 20,
"styleRecalcDurationMs": 10.997,
"layouts": 8,
"layoutDurationMs": 2.352,
"taskDurationMs": 130.28500000000003,
"heapDeltaBytes": 14873340,
"heapUsedBytes": 75521796,
"domNodes": 936,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 8.169999999999998,
"eventListeners": 205,
"totalBlockingTimeMs": 0,
"frameDurationMs": 22.92500000000001,
"p95FrameDurationMs": 66.59999999999991
},
{
"name": "large-combo-open",
"durationMs": 187.02799999999797,
"styleRecalcs": 22,
"styleRecalcDurationMs": 11.070999999999998,
"layouts": 11,
"layoutDurationMs": 2.72,
"taskDurationMs": 151.45199999999997,
"heapDeltaBytes": 14707200,
"heapUsedBytes": 90736776,
"domNodes": 936,
"jsHeapTotalBytes": 2097152,
"scriptDurationMs": 7.393999999999999,
"eventListeners": 205,
"totalBlockingTimeMs": 0,
"frameDurationMs": 22.912500000000023,
"p95FrameDurationMs": 66.60000000000036
},
{
"name": "large-graph-idle",
"durationMs": 2041.9479999999908,
"styleRecalcs": 8,
"styleRecalcDurationMs": 1.698,
"layouts": 8,
"layoutDurationMs": 1.8330000000000002,
"taskDurationMs": 593.6339999999999,
"heapDeltaBytes": 7113600,
"heapUsedBytes": 82348620,
"domNodes": -274,
"jsHeapTotalBytes": 3010560,
"scriptDurationMs": 32.70799999999999,
"eventListeners": -69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536587,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2034.0630000000033,
"styleRecalcs": 9,
"styleRecalcDurationMs": 1.6030000000000002,
"layouts": 8,
"layoutDurationMs": 1.6139999999999999,
"taskDurationMs": 542.486,
"heapDeltaBytes": 6301428,
"heapUsedBytes": 80862784,
"domNodes": -274,
"jsHeapTotalBytes": 4059136,
"scriptDurationMs": 29.969999999999995,
"eventListeners": -69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66639344262295,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2205.381999999986,
"styleRecalcs": 70,
"styleRecalcDurationMs": 7.699,
"layouts": 9,
"layoutDurationMs": 1.8210000000000002,
"taskDurationMs": 1426.097,
"heapDeltaBytes": -21472808,
"heapUsedBytes": 62423340,
"domNodes": -274,
"jsHeapTotalBytes": 4321280,
"scriptDurationMs": 650.2379999999999,
"eventListeners": -67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66590909090909,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2225.33599999997,
"styleRecalcs": 70,
"styleRecalcDurationMs": 8.427999999999999,
"layouts": 9,
"layoutDurationMs": 2.132,
"taskDurationMs": 1439.921,
"heapDeltaBytes": -21337304,
"heapUsedBytes": 62634220,
"domNodes": -274,
"jsHeapTotalBytes": 4845568,
"scriptDurationMs": 659.5219999999999,
"eventListeners": -67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665413533834588,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "large-graph-zoom",
"durationMs": 3425.6579999999985,
"styleRecalcs": 72,
"styleRecalcDurationMs": 10.38,
"layouts": 65,
"layoutDurationMs": 11.689,
"taskDurationMs": 1629.175,
"heapDeltaBytes": -8654796,
"heapUsedBytes": 84164948,
"domNodes": -250,
"jsHeapTotalBytes": 3571712,
"scriptDurationMs": 664.6189999999999,
"eventListeners": -69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536587,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3309.29100000003,
"styleRecalcs": 71,
"styleRecalcDurationMs": 10.037999999999998,
"layouts": 65,
"layoutDurationMs": 11.119,
"taskDurationMs": 1496.1349999999998,
"heapDeltaBytes": 12421436,
"heapUsedBytes": 97199696,
"domNodes": 24,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 640.509,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666161616161613,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2496.2919999999826,
"styleRecalcs": 46,
"styleRecalcDurationMs": 4.782,
"layouts": 6,
"layoutDurationMs": 1.1679999999999997,
"taskDurationMs": 1623.3359999999998,
"heapDeltaBytes": -4365984,
"heapUsedBytes": 74113480,
"domNodes": 0,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 743.186,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.88866666666667,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2350.648999999976,
"styleRecalcs": 46,
"styleRecalcDurationMs": 4.4460000000000015,
"layouts": 7,
"layoutDurationMs": 1.265,
"taskDurationMs": 1557.6619999999998,
"heapDeltaBytes": -6023116,
"heapUsedBytes": 80818168,
"domNodes": 0,
"jsHeapTotalBytes": 6778880,
"scriptDurationMs": 732.5160000000001,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.7863309352518,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-geometry-cadence",
"durationMs": 3040.88299999998,
"styleRecalcs": 8,
"styleRecalcDurationMs": 1.6059999999999999,
"layouts": 8,
"layoutDurationMs": 1.802,
"taskDurationMs": 738.697,
"heapDeltaBytes": -9176720,
"heapUsedBytes": 75646172,
"domNodes": -274,
"jsHeapTotalBytes": 3796992,
"scriptDurationMs": 328.013,
"eventListeners": -69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-geometry-cadence",
"durationMs": 3005.589999999984,
"styleRecalcs": 9,
"styleRecalcDurationMs": 1.5299999999999991,
"layouts": 9,
"layoutDurationMs": 1.9390000000000003,
"taskDurationMs": 703.4710000000001,
"heapDeltaBytes": -4032276,
"heapUsedBytes": 81395512,
"domNodes": -274,
"jsHeapTotalBytes": 3272704,
"scriptDurationMs": 309.82,
"eventListeners": -69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665745856353592,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2034.542999999985,
"styleRecalcs": 9,
"styleRecalcDurationMs": 2.0869999999999993,
"layouts": 8,
"layoutDurationMs": 1.7710000000000001,
"taskDurationMs": 565.2009999999999,
"heapDeltaBytes": -3395564,
"heapUsedBytes": 82290964,
"domNodes": -274,
"jsHeapTotalBytes": 3272704,
"scriptDurationMs": 31.79,
"eventListeners": -69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6655737704918,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2051.152000000002,
"styleRecalcs": 8,
"styleRecalcDurationMs": 1.4169999999999998,
"layouts": 8,
"layoutDurationMs": 1.5510000000000004,
"taskDurationMs": 533.47,
"heapDeltaBytes": 6661200,
"heapUsedBytes": 84460420,
"domNodes": -274,
"jsHeapTotalBytes": 4321280,
"scriptDurationMs": 29.124999999999993,
"eventListeners": -69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-progress-execution-cadence",
"durationMs": 3012.473,
"styleRecalcs": 28,
"styleRecalcDurationMs": 11.092999999999998,
"layouts": 9,
"layoutDurationMs": 1.727,
"taskDurationMs": 542.8230000000001,
"heapDeltaBytes": -17744252,
"heapUsedBytes": 73961360,
"domNodes": 19,
"jsHeapTotalBytes": 4755456,
"scriptDurationMs": 163.708,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665555555555557,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-progress-execution-cadence",
"durationMs": 2756.7739999999503,
"styleRecalcs": 28,
"styleRecalcDurationMs": 11.015,
"layouts": 9,
"layoutDurationMs": 1.879,
"taskDurationMs": 538.901,
"heapDeltaBytes": -6162080,
"heapUsedBytes": 77645088,
"domNodes": -257,
"jsHeapTotalBytes": 4321280,
"scriptDurationMs": 153.744,
"eventListeners": -69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.76768292682927,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-topology-cadence",
"durationMs": 3191.5620000000044,
"styleRecalcs": 9,
"styleRecalcDurationMs": 1.6290000000000002,
"layouts": 8,
"layoutDurationMs": 1.385,
"taskDurationMs": 850.3320000000001,
"heapDeltaBytes": -549844,
"heapUsedBytes": 82741432,
"domNodes": -274,
"jsHeapTotalBytes": 3534848,
"scriptDurationMs": 315.184,
"eventListeners": -69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666145833333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-topology-cadence",
"durationMs": 3193.9949999999726,
"styleRecalcs": 8,
"styleRecalcDurationMs": 1.319,
"layouts": 8,
"layoutDurationMs": 1.5769999999999997,
"taskDurationMs": 833.261,
"heapDeltaBytes": 4355644,
"heapUsedBytes": 82141520,
"domNodes": -274,
"jsHeapTotalBytes": 4321280,
"scriptDurationMs": 328.02200000000005,
"eventListeners": -69,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.753403141361257,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 552.7320000000486,
"styleRecalcs": 47,
"styleRecalcDurationMs": 4.235999999999999,
"layouts": 10,
"layoutDurationMs": 2.0829999999999997,
"taskDurationMs": 333.663,
"heapDeltaBytes": 24810940,
"heapUsedBytes": 87875772,
"domNodes": 0,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 123.453,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663636363636353,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 542.2399999999925,
"styleRecalcs": 47,
"styleRecalcDurationMs": 3.9910000000000005,
"layouts": 9,
"layoutDurationMs": 1.748,
"taskDurationMs": 366.17400000000004,
"heapDeltaBytes": 3530500,
"heapUsedBytes": 68312836,
"domNodes": 0,
"jsHeapTotalBytes": 8912896,
"scriptDurationMs": 118.22200000000001,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663636363636368,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2023.175999999978,
"styleRecalcs": 10,
"styleRecalcDurationMs": 1.8599999999999997,
"layouts": 9,
"layoutDurationMs": 1.9009999999999998,
"taskDurationMs": 478.95799999999997,
"heapDeltaBytes": -15495700,
"heapUsedBytes": 63310772,
"domNodes": 0,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 7.842999999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666942148760327,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2040.395999999987,
"styleRecalcs": 9,
"styleRecalcDurationMs": 1.7249999999999999,
"layouts": 9,
"layoutDurationMs": 1.872,
"taskDurationMs": 477.138,
"heapDeltaBytes": 9763000,
"heapUsedBytes": 72250844,
"domNodes": -200,
"jsHeapTotalBytes": 2621440,
"scriptDurationMs": 7.85,
"eventListeners": -116,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1724.3679999999983,
"styleRecalcs": 76,
"styleRecalcDurationMs": 11.666,
"layouts": 10,
"layoutDurationMs": 2.002,
"taskDurationMs": 756.592,
"heapDeltaBytes": -8587184,
"heapUsedBytes": 62985288,
"domNodes": -200,
"jsHeapTotalBytes": 10747904,
"scriptDurationMs": 86.248,
"eventListeners": -116,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667307692307695,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1712.2760000000312,
"styleRecalcs": 77,
"styleRecalcDurationMs": 11.737,
"layouts": 10,
"layoutDurationMs": 2,
"taskDurationMs": 737.4810000000001,
"heapDeltaBytes": 16076932,
"heapUsedBytes": 77925124,
"domNodes": -200,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 79.459,
"eventListeners": -116,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66504854368932,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-transition-enter",
"durationMs": 1480.4090000000087,
"styleRecalcs": 18,
"styleRecalcDurationMs": 19.753000000000004,
"layouts": 5,
"layoutDurationMs": 12.588999999999999,
"taskDurationMs": 1065.2689999999998,
"heapDeltaBytes": -5799788,
"heapUsedBytes": 80521460,
"domNodes": 9216,
"jsHeapTotalBytes": 16515072,
"scriptDurationMs": 28.189000000000007,
"eventListeners": 3566,
"totalBlockingTimeMs": 163,
"frameDurationMs": 19.777333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8272.402999999997,
"styleRecalcs": 251,
"styleRecalcDurationMs": 31.221000000000004,
"layouts": 9,
"layoutDurationMs": 1.9820000000000002,
"taskDurationMs": 5373.255999999999,
"heapDeltaBytes": -18510512,
"heapUsedBytes": 64263540,
"domNodes": -274,
"jsHeapTotalBytes": 2748416,
"scriptDurationMs": 2348.882,
"eventListeners": -67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.699797979797978,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "viewport-pan-sweep",
"durationMs": 8247.323999999991,
"styleRecalcs": 251,
"styleRecalcDurationMs": 30.078,
"layouts": 9,
"layoutDurationMs": 1.6840000000000002,
"taskDurationMs": 5132.092999999999,
"heapDeltaBytes": -20002828,
"heapUsedBytes": 62486060,
"domNodes": -274,
"jsHeapTotalBytes": 5632000,
"scriptDurationMs": 2272.1250000000005,
"eventListeners": -67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66578947368421,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 18999.17799999997,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 18226.632,
"heapDeltaBytes": -23058940,
"heapUsedBytes": 287291860,
"domNodes": -3482,
"jsHeapTotalBytes": 8896512,
"scriptDurationMs": 273.579,
"eventListeners": -661,
"totalBlockingTimeMs": 0,
"frameDurationMs": 32.72960413080895,
"p95FrameDurationMs": 66.69999999999709
},
{
"name": "vue-large-graph-idle",
"durationMs": 12960.285,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12359.270000000002,
"heapDeltaBytes": 11224840,
"heapUsedBytes": 292537308,
"domNodes": -3482,
"jsHeapTotalBytes": 15196160,
"scriptDurationMs": 185.39700000000002,
"eventListeners": -661,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.72734899328859,
"p95FrameDurationMs": 33.400000000001455
},
{
"name": "vue-large-graph-pan",
"durationMs": 21862.713000000043,
"styleRecalcs": 170,
"styleRecalcDurationMs": 19.63000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21442.307,
"heapDeltaBytes": -10869336,
"heapUsedBytes": 273630524,
"domNodes": -3482,
"jsHeapTotalBytes": 14663680,
"scriptDurationMs": 798.618,
"eventListeners": -659,
"totalBlockingTimeMs": 13,
"frameDurationMs": 40.49222222222222,
"p95FrameDurationMs": 83.30000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 23287.17699999993,
"styleRecalcs": 177,
"styleRecalcDurationMs": 21.569000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22870.829999999998,
"heapDeltaBytes": -11469768,
"heapUsedBytes": 271399548,
"domNodes": -3482,
"jsHeapTotalBytes": 15192064,
"scriptDurationMs": 849.6320000000001,
"eventListeners": -659,
"totalBlockingTimeMs": 17,
"frameDurationMs": 42.87716390423573,
"p95FrameDurationMs": 83.40000000000146
},
{
"name": "vue-node-resize-workload",
"durationMs": 6566.569000000016,
"styleRecalcs": 20,
"styleRecalcDurationMs": 72.348,
"layouts": 20,
"layoutDurationMs": 23.965,
"taskDurationMs": 6434.287,
"heapDeltaBytes": -2182080,
"heapUsedBytes": 281686344,
"domNodes": -3482,
"jsHeapTotalBytes": 14925824,
"scriptDurationMs": 131.90999999999997,
"eventListeners": -661,
"totalBlockingTimeMs": 103,
"frameDurationMs": 37.42742857142857,
"p95FrameDurationMs": 83.29999999999927
},
{
"name": "vue-node-resize-workload",
"durationMs": 7088.4099999999535,
"styleRecalcs": 20,
"styleRecalcDurationMs": 49.16799999999999,
"layouts": 20,
"layoutDurationMs": 22.229,
"taskDurationMs": 6968.253999999999,
"heapDeltaBytes": -21917748,
"heapUsedBytes": 261688656,
"domNodes": -3482,
"jsHeapTotalBytes": 17551360,
"scriptDurationMs": 114.482,
"eventListeners": -661,
"totalBlockingTimeMs": 0,
"frameDurationMs": 40.47485714285715,
"p95FrameDurationMs": 83.39999999999964
},
{
"name": "vue-zoom-out-idle",
"durationMs": 9196.18399999996,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8846.098000000002,
"heapDeltaBytes": -10135592,
"heapUsedBytes": 275122072,
"domNodes": 0,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 128.234,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 30.712374581939798,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-zoom-out-idle",
"durationMs": 9717.028000000028,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9519.533000000001,
"heapDeltaBytes": -1686268,
"heapUsedBytes": 281421092,
"domNodes": 0,
"jsHeapTotalBytes": 9175040,
"scriptDurationMs": 139.54500000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 33.736805555555556,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "workflow-execution",
"durationMs": 474.61000000004105,
"styleRecalcs": 19,
"styleRecalcDurationMs": 10.162,
"layouts": 12,
"layoutDurationMs": 3.853,
"taskDurationMs": 140.919,
"heapDeltaBytes": -8791288,
"heapUsedBytes": 65827092,
"domNodes": 136,
"jsHeapTotalBytes": 8650752,
"scriptDurationMs": 12.704000000000002,
"eventListeners": 7,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665517241379316,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 139.54499999999825,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.236,
"layouts": 9,
"layoutDurationMs": 6.232,
"taskDurationMs": 89.629,
"heapDeltaBytes": 4853436,
"heapUsedBytes": 72256892,
"domNodes": 125,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 5.161999999999998,
"eventListeners": 5,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 434.8850000000084,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.703,
"layouts": 76,
"layoutDurationMs": 14.09,
"taskDurationMs": 394.09499999999997,
"heapDeltaBytes": -3581616,
"heapUsedBytes": 41746640,
"domNodes": 4,
"jsHeapTotalBytes": 1310720,
"scriptDurationMs": 180.62800000000001,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.662962962962983,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 361.95199999997385,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.653,
"layouts": 76,
"layoutDurationMs": 12.768,
"taskDurationMs": 328.92099999999994,
"heapDeltaBytes": -4601648,
"heapUsedBytes": 39156120,
"domNodes": 4,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 147.225,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663636363636382,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 488.99199999993925,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.6869999999999998,
"layouts": 76,
"layoutDurationMs": 13.069,
"taskDurationMs": 457.845,
"heapDeltaBytes": 1165524,
"heapUsedBytes": 102104944,
"domNodes": 4,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 176.568,
"eventListeners": 296,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 436.73599999999624,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.638,
"layouts": 76,
"layoutDurationMs": 13.004,
"taskDurationMs": 398.75300000000004,
"heapDeltaBytes": 748516,
"heapUsedBytes": 101083040,
"domNodes": 4,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 150.28,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66538461538462,
"p95FrameDurationMs": 16.700000000000728
}
]
}🔬 E2E Coverage: 🟡 59.3% of linesCoverage totals
Top 10 files by uncovered lines
🎭 Playwright: ✅ 3222 passed, 0 failed · 1 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure
Findings and check detailsExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight The matrix runs on same-repository version-bump PRs with relevant changes, main-branch pushes, and manual dispatches. This candidate does not qualify, so every expensive stage was skipped. Full docs: scripts/registry-census/README.md 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
🌾 Fallow: ✅ PassedFindings and check detailsFallow 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. Full docs: ADR-DEVEX-LINT-0015 Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 2dcef6cbca1278c5214b2858aaf02b2700d7de3a
🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (356)
Full docs: Frontend domain catalog Reproduce locallypnpm architecture:check |
Swarmhost agentic reviewThe detailed evaluation is available to employees in the internal Slack review thread. Evaluation budget remaining for this pull request: 98 automatic and 99 manual. Updated by Swarmhost's agentic review process. |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## cloud/1.60 #22940 +/- ##
=============================================
Coverage ? 87.51%
=============================================
Files ? 2889
Lines ? 159433
Branches ? 42704
=============================================
Hits ? 139521
Misses ? 19149
Partials ? 763
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
dante01yoon
left a comment
There was a problem hiding this comment.
Reviewed 7de4512 against cloud/1.60, the carried behavioral tests and startup/restoration callers, with the prior #21588/#22821 discussions. New Chat clears the draft and cancels uploads, history Back preserves it, and reload restoration validates saved text/workflow references. No code blockers found.
The upstream author's red/green evidence and carried regressions cover the change. Exact-head unit shards (8/8), package tests, unit aggregate, lint and both type checks passed. Remaining E2E jobs are pending, not claimed as passed. Reviewer execution of tests, builds, type checks, mutations, browser QA and live-backend checks: NOT_RUN.
comfy-greenlight-bot
left a comment
There was a problem hiding this comment.
This pull request at head commit 7de4512 has been reviewed and approved by Swarmhost's agentic review process.
The detailed evaluation is available to employees in the internal Slack review thread.
|
Merging at 7de4512: the base gained one commit since this branch was cut (the agent sidebar-tab extension fix), and it touches none of this PR's files, so there is zero file overlap. Required checks are green and the PR is approved at this head. |
Backport of #21588
Backport of #22821
Two fixes to the Agent chat composer, in source order:
Switching between existing chats through history still keeps the draft (unchanged, intended).
Conflicts: none; both commits cherry-pick cleanly.
Tests carried:
AgentPanelRoot.test.ts,AgentPanel.test.ts,agentComposerStore.test.ts(PM-2002 cases), and the browser specsagentNewChatTargetWorkflow.spec.ts,agentAttachmentUpload.spec.ts,agentComposerDraftSurvivesReload.spec.ts.