Skip to content

[backport cloud/1.54] fix(agent): keep the turn live across a socket reconnect - #19697

Merged
christian-byrne merged 2 commits into
cloud/1.54from
backport-18152-to-cloud-1.54
Oct 1, 2026
Merged

christian-byrne merged 2 commits into
cloud/1.54from
backport-18152-to-cloud-1.54

Conversation

@christian-byrne

@christian-byrne christian-byrne commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

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.

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.

@christian-byrne christian-byrne added backport Backporting a PR onto a release candidate cursor-review Trigger multi-model Cursor agent review on this PR greenlight labels Oct 1, 2026
@DrJKL
DrJKL self-requested a review October 1, 2026 04:52
@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
billing-web Ignored Ignored Oct 1, 2026 5:55pm UTC
billing-web-test Ignored Ignored Oct 1, 2026 5:55pm UTC

Request Review

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ✅ 1980 passed, 0 failed · 1 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1959 / ❌ 0 / ⚠️ 1 / ⏭️ 4)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 10/01/2026, 05:57:45 PM UTC

Links

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 62.4 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 71.3 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 72.2 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 82.1 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 82.6 MB heap
large-graph-pan: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 85.4 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.0 MB heap
legacy-node-drag: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 90.8 MB heap
minimap-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 81.1 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 84.2 MB heap
subgraph-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.1 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.5 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 99ms TBT · 85.5 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.4 MB heap
vue-large-graph-idle: · 59.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 173.9 MB heap
vue-large-graph-pan: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 33ms TBT · 159.4 MB heap
vue-node-resize-workload: · 58.1 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 70ms TBT · 173.3 MB heap
vue-zoom-out-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 174.0 MB heap
workflow-execution: · 59.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.4 MB heap

ℹ️ No baseline found — significance unavailable.

Absolute values
Metric Value
canvas-idle: avg frame time 17ms
canvas-idle: p95 frame time 17ms
canvas-idle: layout duration 0ms
canvas-idle: style recalc duration 5ms
canvas-idle: layout count 0
canvas-idle: style recalc count 10
canvas-idle: task duration 390ms
canvas-idle: script duration 7ms
canvas-idle: TBT 0ms
canvas-idle: heap used 62.4 MB
canvas-idle: DOM nodes -130
canvas-idle: event listeners -98
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 3ms
canvas-mouse-sweep: style recalc duration 17ms
canvas-mouse-sweep: layout count 14
canvas-mouse-sweep: style recalc count 74
canvas-mouse-sweep: task duration 627ms
canvas-mouse-sweep: script duration 93ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 71.3 MB
canvas-mouse-sweep: DOM nodes -279
canvas-mouse-sweep: event listeners -178
canvas-zoom-sweep: avg frame time 17ms
canvas-zoom-sweep: p95 frame time 17ms
canvas-zoom-sweep: layout duration 1ms
canvas-zoom-sweep: style recalc duration 10ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 31
canvas-zoom-sweep: task duration 252ms
canvas-zoom-sweep: script duration 9ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 72.2 MB
canvas-zoom-sweep: DOM nodes 76
canvas-zoom-sweep: event listeners 19
dom-widget-clipping: avg frame time 17ms
dom-widget-clipping: p95 frame time 17ms
dom-widget-clipping: layout duration 0ms
dom-widget-clipping: style recalc duration 8ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 12
dom-widget-clipping: task duration 313ms
dom-widget-clipping: script duration 102ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 82.1 MB
dom-widget-clipping: DOM nodes 19
dom-widget-clipping: event listeners 1
large-graph-idle: avg frame time 17ms
large-graph-idle: p95 frame time 17ms
large-graph-idle: layout duration 0ms
large-graph-idle: style recalc duration 7ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 9
large-graph-idle: task duration 455ms
large-graph-idle: script duration 30ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 82.6 MB
large-graph-idle: DOM nodes -266
large-graph-idle: event listeners -176
large-graph-pan: avg frame time 17ms
large-graph-pan: p95 frame time 17ms
large-graph-pan: layout duration 0ms
large-graph-pan: style recalc duration 12ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 68
large-graph-pan: task duration 1173ms
large-graph-pan: script duration 554ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 85.4 MB
large-graph-pan: DOM nodes -272
large-graph-pan: event listeners -92
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 12ms
large-graph-zoom: style recalc duration 13ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 65
large-graph-zoom: task duration 1244ms
large-graph-zoom: script duration 527ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 70.0 MB
large-graph-zoom: DOM nodes -140
large-graph-zoom: event listeners -94
legacy-node-drag: avg frame time 17ms
legacy-node-drag: p95 frame time 17ms
legacy-node-drag: layout duration 0ms
legacy-node-drag: style recalc duration 6ms
legacy-node-drag: layout count 0
legacy-node-drag: style recalc count 45
legacy-node-drag: task duration 1267ms
legacy-node-drag: script duration 596ms
legacy-node-drag: TBT 0ms
legacy-node-drag: heap used 90.8 MB
legacy-node-drag: DOM nodes 9
legacy-node-drag: event listeners 186
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 4ms
minimap-idle: layout count 0
minimap-idle: style recalc count 8
minimap-idle: task duration 443ms
minimap-idle: script duration 27ms
minimap-idle: TBT 0ms
minimap-idle: heap used 81.1 MB
minimap-idle: DOM nodes -271
minimap-idle: event listeners -191
subgraph-dom-widget-clipping: avg frame time 17ms
subgraph-dom-widget-clipping: p95 frame time 17ms
subgraph-dom-widget-clipping: layout duration 0ms
subgraph-dom-widget-clipping: style recalc duration 7ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 48
subgraph-dom-widget-clipping: task duration 276ms
subgraph-dom-widget-clipping: script duration 87ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 84.2 MB
subgraph-dom-widget-clipping: DOM nodes 21
subgraph-dom-widget-clipping: event listeners 7
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 6ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 11
subgraph-idle: task duration 357ms
subgraph-idle: script duration 6ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 61.1 MB
subgraph-idle: DOM nodes -295
subgraph-idle: event listeners -242
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 3ms
subgraph-mouse-sweep: style recalc duration 18ms
subgraph-mouse-sweep: layout count 18
subgraph-mouse-sweep: style recalc count 78
subgraph-mouse-sweep: task duration 576ms
subgraph-mouse-sweep: script duration 68ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 67.5 MB
subgraph-mouse-sweep: DOM nodes -297
subgraph-mouse-sweep: event listeners -225
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 10ms
subgraph-transition-enter: style recalc duration 22ms
subgraph-transition-enter: layout count 16
subgraph-transition-enter: style recalc count 20
subgraph-transition-enter: task duration 636ms
subgraph-transition-enter: script duration 20ms
subgraph-transition-enter: TBT 99ms
subgraph-transition-enter: heap used 85.5 MB
subgraph-transition-enter: DOM nodes 13831
subgraph-transition-enter: event listeners 2385
viewport-pan-sweep: avg frame time 17ms
viewport-pan-sweep: p95 frame time 17ms
viewport-pan-sweep: layout duration 0ms
viewport-pan-sweep: style recalc duration 35ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 250
viewport-pan-sweep: task duration 3994ms
viewport-pan-sweep: script duration 1759ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 73.4 MB
viewport-pan-sweep: DOM nodes -272
viewport-pan-sweep: event listeners -176
vue-large-graph-idle: avg frame time 17ms
vue-large-graph-idle: p95 frame time 17ms
vue-large-graph-idle: layout duration 0ms
vue-large-graph-idle: style recalc duration 0ms
vue-large-graph-idle: layout count 0
vue-large-graph-idle: style recalc count 0
vue-large-graph-idle: task duration 10185ms
vue-large-graph-idle: script duration 153ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 173.9 MB
vue-large-graph-idle: DOM nodes -8068
vue-large-graph-idle: event listeners -14933
vue-large-graph-pan: avg frame time 17ms
vue-large-graph-pan: p95 frame time 17ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 13ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 68
vue-large-graph-pan: task duration 13275ms
vue-large-graph-pan: script duration 703ms
vue-large-graph-pan: TBT 33ms
vue-large-graph-pan: heap used 159.4 MB
vue-large-graph-pan: DOM nodes -8068
vue-large-graph-pan: event listeners -14930
vue-node-resize-workload: avg frame time 17ms
vue-node-resize-workload: p95 frame time 17ms
vue-node-resize-workload: layout duration 23ms
vue-node-resize-workload: style recalc duration 55ms
vue-node-resize-workload: layout count 20
vue-node-resize-workload: style recalc count 20
vue-node-resize-workload: task duration 3925ms
vue-node-resize-workload: script duration 67ms
vue-node-resize-workload: TBT 70ms
vue-node-resize-workload: heap used 173.3 MB
vue-node-resize-workload: DOM nodes -8070
vue-node-resize-workload: event listeners -14933
vue-zoom-out-idle: avg frame time 17ms
vue-zoom-out-idle: p95 frame time 17ms
vue-zoom-out-idle: layout duration 0ms
vue-zoom-out-idle: style recalc duration 0ms
vue-zoom-out-idle: layout count 0
vue-zoom-out-idle: style recalc count 0
vue-zoom-out-idle: task duration 5450ms
vue-zoom-out-idle: script duration 82ms
vue-zoom-out-idle: TBT 0ms
vue-zoom-out-idle: heap used 174.0 MB
vue-zoom-out-idle: DOM nodes 0
vue-zoom-out-idle: event listeners -9
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 14ms
workflow-execution: layout count 3
workflow-execution: style recalc count 13
workflow-execution: task duration 71ms
workflow-execution: script duration 6ms
workflow-execution: TBT 0ms
workflow-execution: heap used 69.4 MB
workflow-execution: DOM nodes 136
workflow-execution: event listeners 42
Raw data
{
  "timestamp": "2026-10-01T18:06:35.285Z",
  "gitSha": "09d898e50b94f800bf2ff9a2a029ccc197007c9a",
  "branch": "backport-18152-to-cloud-1.54",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2134.824999999978,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 4.615999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 471.568,
      "heapDeltaBytes": -11546932,
      "heapUsedBytes": 59368980,
      "domNodes": -282,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 7.37,
      "eventListeners": -202,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-idle",
      "durationMs": 2005.404999999996,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 5.473,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 309.191,
      "heapDeltaBytes": 1744844,
      "heapUsedBytes": 71586936,
      "domNodes": 22,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 6.805000000000001,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1770.341999999971,
      "styleRecalcs": 74,
      "styleRecalcDurationMs": 17.332,
      "layouts": 14,
      "layoutDurationMs": 2.863,
      "taskDurationMs": 648.106,
      "heapDeltaBytes": -5028552,
      "heapUsedBytes": 65909716,
      "domNodes": -277,
      "jsHeapTotalBytes": 6807552,
      "scriptDurationMs": 97.46400000000001,
      "eventListeners": -192,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1693.0659999999307,
      "styleRecalcs": 73,
      "styleRecalcDurationMs": 16.615,
      "layouts": 14,
      "layoutDurationMs": 2.7430000000000003,
      "taskDurationMs": 606.7360000000001,
      "heapDeltaBytes": 13498800,
      "heapUsedBytes": 83522388,
      "domNodes": -280,
      "jsHeapTotalBytes": 5758976,
      "scriptDurationMs": 89.04500000000002,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1711.7910000000052,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 10.772,
      "layouts": 6,
      "layoutDurationMs": 1.096,
      "taskDurationMs": 252.323,
      "heapDeltaBytes": 4567968,
      "heapUsedBytes": 75701184,
      "domNodes": 76,
      "jsHeapTotalBytes": 6029312,
      "scriptDurationMs": 8.929,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1657.6599999999644,
      "styleRecalcs": 29,
      "styleRecalcDurationMs": 9.671,
      "layouts": 6,
      "layoutDurationMs": 0.9219999999999998,
      "taskDurationMs": 252.44100000000003,
      "heapDeltaBytes": 4664012,
      "heapUsedBytes": 75707108,
      "domNodes": 76,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 8.499,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 524.2319999999836,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 11.677999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 326.182,
      "heapDeltaBytes": 18899640,
      "heapUsedBytes": 88912672,
      "domNodes": 18,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 103.77900000000001,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000273
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 520.9229999999252,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 4.86,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 300.78499999999997,
      "heapDeltaBytes": 18716640,
      "heapUsedBytes": 83319268,
      "domNodes": 20,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 100.491,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000273
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2037.193000000002,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 5.233,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 452.063,
      "heapDeltaBytes": -15510500,
      "heapUsedBytes": 87532572,
      "domNodes": -263,
      "jsHeapTotalBytes": -589824,
      "scriptDurationMs": 31.633999999999997,
      "eventListeners": -162,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2040.6959999999117,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 8.079999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 457.651,
      "heapDeltaBytes": 9514160,
      "heapUsedBytes": 85669016,
      "domNodes": -268,
      "jsHeapTotalBytes": -1150976,
      "scriptDurationMs": 28.388000000000005,
      "eventListeners": -190,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2150.4540000000247,
      "styleRecalcs": 69,
      "styleRecalcDurationMs": 12.804,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1173.512,
      "heapDeltaBytes": 11511512,
      "heapUsedBytes": 88856704,
      "domNodes": -272,
      "jsHeapTotalBytes": 385024,
      "scriptDurationMs": 542.5340000000001,
      "eventListeners": -190,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2092.604999999935,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 10.499999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1173.1850000000002,
      "heapDeltaBytes": 23835884,
      "heapUsedBytes": 90303236,
      "domNodes": -272,
      "jsHeapTotalBytes": 225280,
      "scriptDurationMs": 564.894,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3075.4400000000146,
      "styleRecalcs": 63,
      "styleRecalcDurationMs": 11.575000000000001,
      "layouts": 60,
      "layoutDurationMs": 11.945,
      "taskDurationMs": 1187.5959999999998,
      "heapDeltaBytes": 8223492,
      "heapUsedBytes": 76268396,
      "domNodes": 8,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 511.292,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3140.5690000000277,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 13.934999999999997,
      "layouts": 60,
      "layoutDurationMs": 12.232,
      "taskDurationMs": 1300.894,
      "heapDeltaBytes": -8619068,
      "heapUsedBytes": 70566820,
      "domNodes": -288,
      "jsHeapTotalBytes": 3829760,
      "scriptDurationMs": 541.846,
      "eventListeners": -196,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 2096.192999999971,
      "styleRecalcs": 42,
      "styleRecalcDurationMs": 4.961,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1286.63,
      "heapDeltaBytes": 21053368,
      "heapUsedBytes": 89214828,
      "domNodes": 4,
      "jsHeapTotalBytes": 417792,
      "scriptDurationMs": 608.686,
      "eventListeners": 186,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 2151.6279999999597,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 8.014999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1247.34,
      "heapDeltaBytes": 19862380,
      "heapUsedBytes": 101272280,
      "domNodes": 14,
      "jsHeapTotalBytes": 5922816,
      "scriptDurationMs": 584.04,
      "eventListeners": 186,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "minimap-idle",
      "durationMs": 2015.3080000000045,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 5.267000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 458.86600000000004,
      "heapDeltaBytes": 1710568,
      "heapUsedBytes": 82332668,
      "domNodes": -272,
      "jsHeapTotalBytes": -888832,
      "scriptDurationMs": 28.435000000000002,
      "eventListeners": -192,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2031.5400000000636,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 3.668000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 427.07399999999996,
      "heapDeltaBytes": 9862504,
      "heapUsedBytes": 87724368,
      "domNodes": -270,
      "jsHeapTotalBytes": -2199552,
      "scriptDurationMs": 25.999000000000002,
      "eventListeners": -190,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 465.0940000000219,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 6.803,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 279.115,
      "heapDeltaBytes": 14814104,
      "heapUsedBytes": 88541628,
      "domNodes": 20,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 86.484,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000273
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 427.4990000000116,
      "styleRecalcs": 48,
      "styleRecalcDurationMs": 7.375,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 273.231,
      "heapDeltaBytes": 15114672,
      "heapUsedBytes": 88109296,
      "domNodes": 22,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 87.674,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66666666666665,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2005.6690000000117,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 5.916000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 356.12300000000005,
      "heapDeltaBytes": -8814200,
      "heapUsedBytes": 64559748,
      "domNodes": -294,
      "jsHeapTotalBytes": 5496832,
      "scriptDurationMs": 5.8,
      "eventListeners": -242,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 1993.7720000000354,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 5.2250000000000005,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 358.26000000000005,
      "heapDeltaBytes": -9181896,
      "heapUsedBytes": 63577052,
      "domNodes": -296,
      "jsHeapTotalBytes": 5496832,
      "scriptDurationMs": 5.892000000000001,
      "eventListeners": -242,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1694.7729999999979,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 18.957,
      "layouts": 18,
      "layoutDurationMs": 3.933,
      "taskDurationMs": 594.857,
      "heapDeltaBytes": 5981040,
      "heapUsedBytes": 78388364,
      "domNodes": -296,
      "jsHeapTotalBytes": 5496832,
      "scriptDurationMs": 72.644,
      "eventListeners": -210,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1711.0509999999977,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 16.944,
      "layouts": 18,
      "layoutDurationMs": 2.9330000000000007,
      "taskDurationMs": 557.421,
      "heapDeltaBytes": -10309260,
      "heapUsedBytes": 63272640,
      "domNodes": -297,
      "jsHeapTotalBytes": 5234688,
      "scriptDurationMs": 64.121,
      "eventListeners": -240,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 866.1539999999377,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 21.901999999999997,
      "layouts": 16,
      "layoutDurationMs": 9.654,
      "taskDurationMs": 636.2289999999999,
      "heapDeltaBytes": -5125188,
      "heapUsedBytes": 89601104,
      "domNodes": 13831,
      "jsHeapTotalBytes": 11796480,
      "scriptDurationMs": 19.639000000000003,
      "eventListeners": 2385,
      "totalBlockingTimeMs": 99,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8151.2869999999675,
      "styleRecalcs": 249,
      "styleRecalcDurationMs": 31.214,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 3898.313,
      "heapDeltaBytes": -7996472,
      "heapUsedBytes": 67745796,
      "domNodes": -282,
      "jsHeapTotalBytes": -364544,
      "scriptDurationMs": 1702.61,
      "eventListeners": -176,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8161.462000000029,
      "styleRecalcs": 251,
      "styleRecalcDurationMs": 38,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 4088.97,
      "heapDeltaBytes": 9564064,
      "heapUsedBytes": 86278232,
      "domNodes": -262,
      "jsHeapTotalBytes": -139264,
      "scriptDurationMs": 1815.261,
      "eventListeners": -176,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 11470.226999999966,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 10482.410999999998,
      "heapDeltaBytes": -39225428,
      "heapUsedBytes": 179048672,
      "domNodes": -8067,
      "jsHeapTotalBytes": -11792384,
      "scriptDurationMs": 162.79399999999998,
      "eventListeners": -14933,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.223333333333358,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 10890.21200000002,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 9888.027999999998,
      "heapDeltaBytes": -18897580,
      "heapUsedBytes": 185607916,
      "domNodes": -8068,
      "jsHeapTotalBytes": -3403776,
      "scriptDurationMs": 142.27200000000002,
      "eventListeners": -14933,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 13809.776999999996,
      "styleRecalcs": 67,
      "styleRecalcDurationMs": 13.431999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 13297.401999999998,
      "heapDeltaBytes": -38365756,
      "heapUsedBytes": 166452304,
      "domNodes": -8068,
      "jsHeapTotalBytes": -13148160,
      "scriptDurationMs": 756.03,
      "eventListeners": -14929,
      "totalBlockingTimeMs": 66,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 13868.86800000002,
      "styleRecalcs": 68,
      "styleRecalcDurationMs": 13.078000000000007,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 13251.829000000002,
      "heapDeltaBytes": -39165864,
      "heapUsedBytes": 167893472,
      "domNodes": -8068,
      "jsHeapTotalBytes": -13918208,
      "scriptDurationMs": 649.9970000000001,
      "eventListeners": -14931,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 3960.0510000000213,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 54.96700000000001,
      "layouts": 20,
      "layoutDurationMs": 21.391999999999996,
      "taskDurationMs": 3831.9770000000003,
      "heapDeltaBytes": -34472896,
      "heapUsedBytes": 184746168,
      "domNodes": -8068,
      "jsHeapTotalBytes": 13410304,
      "scriptDurationMs": 63.62800000000001,
      "eventListeners": -14933,
      "totalBlockingTimeMs": 59,
      "frameDurationMs": 17.220000000000013,
      "p95FrameDurationMs": 16.80000000000109
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 4183.152000000064,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 55.675000000000004,
      "layouts": 20,
      "layoutDurationMs": 25.32799999999999,
      "taskDurationMs": 4017.4,
      "heapDeltaBytes": -39487424,
      "heapUsedBytes": 178729736,
      "domNodes": -8072,
      "jsHeapTotalBytes": 18878464,
      "scriptDurationMs": 69.897,
      "eventListeners": -14933,
      "totalBlockingTimeMs": 80,
      "frameDurationMs": 17.223333333333358,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 5567.930000000047,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 5260.124,
      "heapDeltaBytes": 11266548,
      "heapUsedBytes": 179776396,
      "domNodes": 0,
      "jsHeapTotalBytes": -22020096,
      "scriptDurationMs": 80.79000000000003,
      "eventListeners": -10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 6141.9329999999945,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 5639.673,
      "heapDeltaBytes": 13170452,
      "heapUsedBytes": 185116532,
      "domNodes": 0,
      "jsHeapTotalBytes": -2097152,
      "scriptDurationMs": 84.01599999999992,
      "eventListeners": -8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333326,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "workflow-execution",
      "durationMs": 80.2209999999377,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 11.418000000000001,
      "layouts": 3,
      "layoutDurationMs": 1.119,
      "taskDurationMs": 54.82299999999999,
      "heapDeltaBytes": 3090116,
      "heapUsedBytes": 71710724,
      "domNodes": 127,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 4.297000000000001,
      "eventListeners": 17,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.220000000000013,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "workflow-execution",
      "durationMs": 437.01400000009016,
      "styleRecalcs": 18,
      "styleRecalcDurationMs": 16.358999999999998,
      "layouts": 3,
      "layoutDurationMs": 1.3259999999999998,
      "taskDurationMs": 88.12800000000001,
      "heapDeltaBytes": 5002936,
      "heapUsedBytes": 73778044,
      "domNodes": 144,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 6.898,
      "eventListeners": 67,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000273
    }
  ]
}

🔬 E2E Coverage

Note

Shard completeness could not be verified for this run, so these totals may not be comparable with a whole merge.

Metric Covered Total Pct
Lines 50811 76088 66.8% 🟡
Functions 0 0 — —
Branches 0 0 — —
Top 10 files by uncovered lines
File Coverage Missed
src/LGraphCanvas.ts 67.5% 1156
src/LGraphNode.ts 69.5% 390
src/extensions/core/cameraInfo/CameraInfoViewport.ts 2.0% 343
src/renderer/extensions/layerEditor/composables/useLayerEditorSession.ts 40.1% 332
src/platform/workspace/stores/billingOperationStore.ts 7.9% 313
src/platform/workspace/stores/workspaceAuthStore.ts 36.0% 288
src/LGraph.ts 77.8% 272
src/platform/workspace/stores/teamWorkspaceStore.ts 37.7% 261
src/scripts/app.ts 72.3% 253
src/scripts/pnginfo.ts 21.4% 221

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (2)
  • [release]
  • [backport

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: c2736e81-ed50-4398-8dda-ab2d43906478

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@datadog-official

This comment has been minimized.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Cursor Review — Consolidated panel

Triggered by @christian-byrne.

Found 10 finding(s).

Severity Count
🟠 High 3
🟡 Medium 6
🟢 Low 1

Panel: 8/8 reviewers contributed findings.

DrJKL
DrJKL previously requested changes Oct 1, 2026

@DrJKL DrJKL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: Request changes. This branch replaces four files with main's post-#18152 contents instead of porting #18152's delta, which pulls in main-only changes that cloud/1.54 lacks and breaks typecheck and the unit tests.

I compared this branch, against its merge base 327e65b (the current cloud/1.54 tip), with #18152's merged diff (d90c109 against its parent 1519cc0).

What matches: agentTurnLockFixture.ts, agentTurnSurvivesSocketDrop.spec.ts, the approval spec (renamed to agentApprovalSurvivesSocketDrop.spec.ts on this branch), agentRestClient.ts and its test, agentTranscript.test.ts, and agentConversationStore.test.ts carry exactly the source's added and removed lines.

What diverges:

  • useAgentSession.ts, useAgentSession.test.ts, agentTranscript.ts, and agentConversationStore.ts are byte-identical to their contents at d90c109 on main. The source changes these files by +223/-26, +752/-90, +14/-24, and +195/-15. Here they change by +391/-122, +1045/-188, +115/-80, and +228/-26. The extra lines are the gap between cloud/1.54 and main's pre-image of these files, about +606/-272 lines. That gap includes workspace-scoped agent thread storage (#17765), error surface tags (#19230), the generated ToolCallSummary schema (#19585), and the store's per-thread attachment-name memory.
  • Checks at this head fail. Hosted setup / typecheck reports 30 errors, all in these files or in AgentPanelRoot.vue, which consumes them. Hosted test reports 494 failed out of 22,453. Locally at d97f80c, vitest run over useAgentSession.test.ts, agentTranscript.test.ts, and agentConversationStore.test.ts gives 152 failed and 98 passed. 135 of those failures are TypeError: StorageKeys.agentThread is not a function. Lint, build, and e2e jobs fail downstream.

The inline comments point at representative lines; each one marks a whole class of the same problem. The fix is to cherry-pick #18152's own delta onto cloud/1.54 and resolve each conflict against the API this branch actually has. Each adaptation should then be named in the description.

@github-actions
github-actions Bot requested a review from ryan-di October 1, 2026 08:43
@christian-byrne christian-byrne removed their assignment Oct 1, 2026
christian-byrne added a commit that referenced this pull request Oct 1, 2026
Port the source PR hunks onto the cloud 1.54 APIs while retaining its approval, telemetry, and request-handling behavior.

Addresses #19697 (review)
@christian-byrne
christian-byrne force-pushed the backport-18152-to-cloud-1.54 branch from d97f80c to f1319d2 Compare October 1, 2026 08:57
@christian-byrne
christian-byrne requested a review from DrJKL October 1, 2026 08:57
@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Oct 1, 2026
@codecov

codecov Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.39655% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...sions/agent/stores/agent/agentConversationStore.ts 90.56% 10 Missing ⚠️
...ensions/agent/composables/agent/useAgentSession.ts 97.47% 3 Missing ⚠️
@@              Coverage Diff              @@
##             cloud/1.54   #19697   +/-   ##
=============================================
  Coverage              ?   84.06%           
=============================================
  Files                 ?     2123           
  Lines                 ?   127472           
  Branches              ?    34262           
=============================================
  Hits                  ?   107153           
  Misses                ?    20140           
  Partials              ?      179           
Flag Coverage Δ
e2e 66.83% <ø> (?)
unit 79.24% <94.39%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...extensions/agent/services/agent/agentRestClient.ts 99.36% <100.00%> (ø)
...extensions/agent/services/agent/agentTranscript.ts 97.70% <100.00%> (ø)
...ensions/agent/composables/agent/useAgentSession.ts 98.67% <97.47%> (ø)
...sions/agent/stores/agent/agentConversationStore.ts 95.79% <90.56%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

DrJKL
DrJKL previously requested changes Oct 1, 2026

@DrJKL DrJKL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: Request changes. The new head is now a real port of #18152 and fixes the whole-file copy, but it drops three source hunks that apply cleanly to cloud/1.54.

I compared this branch, at f1319d2 against its merge base 327e65b, with #18152's merged diff (d90c109 against its parent 1519cc0). The branch merges cleanly into the current cloud/1.54 tip, 2b4f09c.

What matches:

  • Eight files carry exactly the source's added and removed lines: agentTurnLockFixture.ts, both browser specs, agentRestClient.ts and its test, agentTranscript.test.ts, and agentConversationStore.ts and its test.
  • In useAgentSession.ts and its test, these adaptations account for something cloud/1.54 lacks:
    • The unscoped THREAD_STORAGE_KEY replaces StorageKeys.agentThread(), and (g15) asserts that key.
    • onThreadActivated?.(null) is dropped.
    • The recovery reportError omits surface.
      All three are main-only APIs here.
  • All 22 source test additions are present, and the pins are un-failed.
  • At f1319d2: vitest run over useAgentSession.test.ts, services/agent/, and stores/agent/ passed 547/547 across 21 files, and vue-tsc --noEmit passed. All hosted checks at this head passed.

What diverges is inline.

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)
@christian-byrne
christian-byrne force-pushed the backport-18152-to-cloud-1.54 branch from f1319d2 to d433e54 Compare October 1, 2026 12:09
DrJKL
DrJKL previously requested changes Oct 1, 2026

@DrJKL DrJKL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: Request changes. The rebased port of #18152 is faithful in production code, but (g15) still drops the source's onThreadActivated assertion, which cloud/1.54 now supports.

I compared this branch, at d433e54 against its merge base 22e29bc (the current cloud/1.54 tip), with #18152's merged diff (d90c109 against its parent 1519cc0).

What matches:

  • Eight files carry exactly the source's added and removed lines: agentTurnLockFixture.ts, both browser specs, agentRestClient.ts and its test, agentTranscript.test.ts, and agentConversationStore.ts and its test.
  • The rebase onto #19734 brought onThreadActivated to this branch, so forgetDeletedThread now carries the source's onThreadActivated?.(null). The SessionNotice un-export and the handleMessageDone switch to markStoppedTurnReady are carried too, which resolves my earlier comments.
  • Remaining adaptations in useAgentSession.ts:
    • The unscoped THREAD_STORAGE_KEY replaces StorageKeys.agentThread(), because workspace-scoped storage is not on cloud/1.54.
    • The recovery reportError omits surface, because this branch's ReportErrorOptions has no such field.
    • In agentTranscript.ts, the toolCallPartState comment edit is applied to this branch's older wording of that comment.
  • All 22 source test additions are present, and the pins are un-failed.
  • At d433e54: vitest run over useAgentSession.test.ts, services/agent/, and stores/agent/ passed 556/556 across 21 files, and vue-tsc --noEmit passed. When I posted, hosted checks had no failures so far and some were still running.

What diverges is inline.

christian-byrne added a commit that referenced this pull request Oct 1, 2026
Preserve locally streamed content when a terminal history row is empty, retain successor recovery ownership, and cover refresh-only completion in the browser harness.\n\nReview: https://github.com/Comfy-Org/ComfyUI_frontend/pull/19697#discussion_r4152078247\nReview: #19697 (comment)
@christian-byrne
christian-byrne dismissed stale reviews from DrJKL, DrJKL, and DrJKL October 1, 2026 18:12

Superseded by the exact-head adapted port at e357667: all review threads are resolved, the requested onThreadActivated assertion is present, and exact-head CI has no failures. Dismissing this stale review so current checks govern merge readiness.

@christian-byrne
christian-byrne merged commit da27da8 into cloud/1.54 Oct 1, 2026
106 checks passed
@christian-byrne
christian-byrne deleted the backport-18152-to-cloud-1.54 branch October 1, 2026 18:19

@DrJKL DrJKL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: Approve. This is a faithful backport of #18152 to cloud/1.54, with each adaptation accounted for by the target.

I compared this branch, at e357667 against its merge base 22e29bc, with #18152's merged diff (d90c109 against its parent 1519cc0). e357667 restores the source's onThreadActivated setup and its toHaveBeenLastCalledWith(null) assertion in (g15), which resolves my earlier comment.

Eight files carry exactly the source's added and removed lines: agentTurnLockFixture.ts, both browser specs, agentRestClient.ts and its test, agentTranscript.test.ts, and agentConversationStore.ts and its test. In useAgentSession.ts, the source's SessionNotice un-export, the handleMessageDone switch to markStoppedTurnReady, and onThreadActivated?.(null) are carried as written.

Adaptations:

  • The unscoped THREAD_STORAGE_KEY replaces StorageKeys.agentThread() in forgetDeletedThread, and (g15) asserts that key. Workspace-scoped agent thread storage is not on cloud/1.54.
  • The recovery job's reportError omits surface, because this branch's ReportErrorOptions has no such field.
  • In agentTranscript.ts, the toolCallPartState comment edit is applied to this branch's older wording of that comment.

All 22 source test additions are present, and the it.fails / test.fail pins are un-failed.

Checks:

  • I merged the current cloud/1.54 tip, 01475ca, into this head locally. The merge is clean.
  • On the merged tree, vitest run over useAgentSession.test.ts, services/agent/, and stores/agent/ passed 559/559 across 21 files, and vue-tsc --noEmit passed.
  • All PR checks at this head passed.

The PR merged at 18:19Z, as da27da8, while I was waiting on the last check, so this review is post-merge verification. The only red run on this SHA is the post-merge Cloud Backport Tag / create-tag job. It reported that it could not verify da27da8 on cloud/1.54, but that commit is the current cloud/1.54 tip, so this looks like a timing race in the tag job rather than a problem with the backport.

@DrJKL DrJKL removed their assignment Oct 1, 2026
christian-byrne added a commit that referenced this pull request Oct 7, 2026
…1998) (#19901)

## Summary

A `409 TURN_IN_PROGRESS` on send was a dead end; it now re-attaches to
the turn that is holding the thread, so the user gets a Stop control
instead of a raw server string. FE-1998.

## Changes

- **What**: `useAgentSession` reads the 409 conflict body the agent
service has sent since
[cloud#8275](Comfy-Org/cloud#8275) (`type:
"TURN_IN_PROGRESS"`, `active_message_id`, `turn_id`) and re-reads the
thread on it. The re-read adopts the still-running assistant row as the
active turn, which is what puts **Stop** where Send was; when that turn
settles the composer unlocks on its own. The notice copy changes from
the raw server message to `agent.sendTurnInProgress`.
- **Dependencies**: none.

### Why the refusal was terminal

The server's single-active-turn signal is a `status='streaming'`
assistant row, durable in Postgres and deliberately surviving a worker
restart (`services/agent/server/agent_handler.go`, `ThreadActiveTurn` →
`rejectTurnInProgress`). So the thread stays locked until that row goes
terminal, and nothing the user could reach from the panel cleared it: no
stop control, no retry, and no way to tell a working turn from a dead
one.

## Review Focus

**Scope — this is the 409 route that composer gating does not close.** A
turn *this* client can see already renders Stop and never offers Send,
so it cannot reach the guard; #19697/#18152 and #18154 closed the reload
and socket-drop routes. What remains is a turn started from a second
tab, window or device: this client has no local signal, offers Send, and
is refused. That is what the new spec exercises, and it is the only
shape that can reach the refusal path at all now.

**The re-read is bounded, on `reconcileSnapshotTurn`'s reasoning.**
`performSend` awaits it and the composer sits in `sending` until it
returns, so an unbounded await would let a slow workflow restore hold
the one control the user needs. If the bound wins before the transcript
lands, the reattachment is invalidated and the late snapshot is
discarded. If the transcript has already landed and only workflow
restore is still outstanding, the active turn remains adopted and the
send reports that reattachment.

**It goes through `hydrateFromServer`, not a bare `getMessages` +
`hydrate`.** That is the one path which arms the hydration mailbox, so
WS frames for the running turn that land during the GET are replayed
rather than dropped. A second re-attach path would drift from it.

**The discriminator is load-bearing** and has its own negative test: a
409 from another endpoint, or one whose body this client cannot parse,
stays an ordinary send failure and triggers no re-read.

**Fixture fidelity (please look at this).** `agentTurnLockFixture`
answered a refused post with the 409's *message only*, so no spec could
distinguish a client that reads the conflict ids from one that ignores
them — the comment claimed the body was verbatim from `agent_handler.go`
and it was not. It now sends the whole body. The generated `AgentError`
type describes only `error`, because the OpenAPI schema does not cover
this endpoint's conflict body; the fixture types the body as `AgentError
& z.infer<typeof zTurnInProgressError>`, reusing the client's runtime
schema for the conflict fields. *Filed as an upstream hypothesis for the
ingest schema* rather than fixed here.

## Testing

Black-box, red on the parent and green here:

```
browser_tests/tests/agent/agentSendRefusedByRunningTurn.spec.ts
```

On `origin/main` it fails at `expect(turnLock.stopButton).toBeVisible()`
with "element(s) not found" — the dead end itself. It also drives the
escape hatch end to end: Stop unlocks the composer and the retry is
accepted with no second refusal and no page reload, which is this
ticket's stated acceptance criterion.

Unit:

```
useAgentSession.test.ts › re-attaches to the running turn when a send is refused with TURN_IN_PROGRESS
useAgentSession.test.ts › does not let a timed-out re-attachment replace a newer turn
useAgentSession.test.ts › records no failed send when the re-read finds the refused thread deleted
useAgentSession.test.ts › leaves an undiscriminated 409 on an existing thread as a plain failure
useAgentSession.test.ts › applies a pending stop to an active turn adopted after a refused send
useAgentSession.test.ts › clears a pending stop when the send fails before adopting a turn
```

The first is also red on the parent (`expected false to be true` on
`isStreaming`).

Run locally against `origin/main` at `dd630e6c04`:

- `useAgentSession` / `agentConversationStore` / `agentTranscript` /
`agentRestClient` — 413 passed
- the four sibling turn-lock specs that share the fixture
(`agentTurnSurvivesRefresh`, `agentTurnSurvivesSocketDrop`,
`agentTurnSurvivesPanelMinimize`, `agentEscapeStopsClickedTurn`) — 15
passed
- `typecheck:app`, `typecheck:browser`, `oxlint`, `eslint`,
`locale:check`, and the `fallow` pre-push audit gate — clean

## Production context

Measured 2026-10-02 (read-only):
`comfy.agent.turn_rejected{reason:in_progress}` ran at **19.9% of
`agent_turn_started`** over a four-hour window, and **30.0% of threads**
contained at least one ten-minute-plus window in which the next send is
answered 409. That figure is dominated by the reload route this PR does
*not* cover, and should fall sharply once the fix already on
`cloud/1.54`/`cloud/1.55` reaches the production stable arm — re-measure
before citing it as this change's justification.

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Backporting a PR onto a release candidate cursor-review Trigger multi-model Cursor agent review on this PR greenlight risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants