Repository navigation
[backport core/1.55] Report approval asks the panel never delivered (#18952) - #19346
Conversation
A turn parked waiting for the user to approve a tool call, the approval
prompt never reached the panel, and nothing anywhere recorded it — so
this PR makes that drop report, and pins the user's journey as a spec.
- **What**: `reportError('failure_delivering_agent_approval_ask')` at
the two reachable sites where an `agent_ask` frame is discarded, plus
`browser_tests/tests/agent/agentApprovalSurvivesSocketDrop.spec.ts`
reproducing the reported flow through the real socket and the rendered
panel.
A user asked for an img2img workflow, then for img2video, and the panel
went dead. They restarted the agent tab to get out of it.
A session-id trace established that **the backend never hung.** The turn
was alive the whole time, parked waiting for the user to approve a tool
call, and the approval prompt never made it into the panel. That is the
worst shape a stall can take: the product is working and waiting on the
user, while the user sees a dead panel and no way to answer.
**There was no telemetry for it at all.** It reached us through a
feedback form, not a dashboard — and only because that one user happened
to paste a session id.
`useAgentSession.onStatus(false)` answers a transient websocket close
with `abortActiveTurn()` + `dropBackgroundTurns()`. The server never
learned the socket went away, so it keeps running the turn and then
emits `agent_ask` for the approval it is parked on. By then `transport`
is null and `backgroundTurns` is empty, so the frame reaches
`ingestBackgroundTurnEvent`, hits `if (!entry …) return`, and is gone.
Nothing errors.
It is specifically the *socket blip*, not a refresh. On a refresh the
ask comes back, because the persisted row carries `pending_ask` and
`normalizeAgentTranscript` rebuilds the card — which is why restarting
the tab "fixed" it for this user, and why this class only ever surfaces
through a form.
Two sites, tagged by `reason` so they split on the dashboard:
| `reason` | Site | Why it is the same user-visible outcome |
|---|---|---|
| `no-live-turn` | `ingestBackgroundTurnEvent`, `!entry` | The
socket-drop teardown left nothing to route the ask to. |
| `unknown-kind` | `handleAskEvent`, `kind !== 'run_approval'` | Renders
no card while the server still parks on the ask. |
The third `return` in `ingest` (`eventThreadId === undefined`) is
**unreachable for an ask** — `zAgentAskEvent` is
`zAgentPendingAsk.extend({ thread_id: z.string() })`, and
`agent_active_tab` is the only event with an optional `thread_id`,
handled above it. It is commented rather than instrumented, because a
report at a dead branch is noise that reads as coverage.
Deliberately **not** a `pushError`: the user cannot act on it, and a
notice would replace a silent stall with a stall plus a scary message.
This is for the dashboard.
**The spec's first two cases are `test.fail()` pins, on purpose.**
Fixing the delivery itself needs the turn to survive the blip, and that
is [#18152](#18152) —
on `main` there is no turn-recovery path at all. So this PR lands the
telemetry and the reproduction now, standing alone, and the pins flip
green when the delivery fix lands on top of #18152. Neither piece is
hostage to that stack.
The third case pushes the **same ask with no socket drop** and must stay
green. That is what stops the two pins from going vacuous on a renamed
locator, a gate, or reworded copy — without it, a card that never
renders under this fixture at all would look exactly like the defect.
Run against a cloud dev server plus the e2e ComfyUI container:
```
✘ 1 the approval card reaches the panel after a reconnect (expected)
✘ 2 the user can answer the ask that arrived after the reconnect (expected)
✓ 3 the same ask renders when the socket never drops
✓ 4 the fixture pushes an ask the client can parse
4 passed (33.4s)
```
Pin 1 fails for the stated reason, not an incidental one — with
`test.fail()` removed:
```
Error: expect(locator).toBeVisible() failed
Locator: locator('#agent-panel-root').getByText('Do you approve?')
Error: element(s) not found
```
- Store and transport unit suites: `392 passed (392)`.
- Agent subtree: `Test Files 137 passed (137)`, `Tests 2338 passed | 17
expected fail (2355)` (the expected fails are pre-existing).
- The four new store cases are **red on `main` production code** (`2
failed | 2 passed`), and the two that fail are the two reporting
assertions while both "stays quiet" guards pass — so they are not
tautological.
- `typecheck:app`, `typecheck:browser`, ESLint, type-aware Oxlint, Oxfmt
and Knip clean.
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 6635cb05905e0086d88ea7de51f1e61295f6e685
Full docs: ADR-DEVEX-LINT-0015 🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 2123 passed, 0 failed · 1 flaky📊 Browser Reports
🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff. Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md 📦 Bundle Size
⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-29T18:48:40.296Z",
"gitSha": "8d61cbc54e6d32a74301a968ea2e82652bc6c555",
"branch": "backport-18952-to-core-1.55-manual",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 1992.9919999999584,
"styleRecalcs": 11,
"styleRecalcDurationMs": 5.232,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 324.667,
"heapDeltaBytes": -5932232,
"heapUsedBytes": 56583984,
"domNodes": -257,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 5.864000000000001,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2003.8379999999734,
"styleRecalcs": 12,
"styleRecalcDurationMs": 6.699000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 340.60400000000004,
"heapDeltaBytes": -5824652,
"heapUsedBytes": 62076760,
"domNodes": -260,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 6.626,
"eventListeners": -184,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1708.9160000000447,
"styleRecalcs": 46,
"styleRecalcDurationMs": 9.504000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 531.3,
"heapDeltaBytes": -3495896,
"heapUsedBytes": 59215952,
"domNodes": -257,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 92.14699999999999,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1711.029999999937,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10.037,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 564.8240000000001,
"heapDeltaBytes": -4015868,
"heapUsedBytes": 63585876,
"domNodes": -257,
"jsHeapTotalBytes": 6807552,
"scriptDurationMs": 97.98799999999999,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1702.5319999999056,
"styleRecalcs": 29,
"styleRecalcDurationMs": 10.409000000000002,
"layouts": 6,
"layoutDurationMs": 1.02,
"taskDurationMs": 222.518,
"heapDeltaBytes": 3123092,
"heapUsedBytes": 70774764,
"domNodes": 79,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 7.269999999999999,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1689.363999999955,
"styleRecalcs": 28,
"styleRecalcDurationMs": 10.005999999999998,
"layouts": 6,
"layoutDurationMs": 0.9209999999999999,
"taskDurationMs": 217.746,
"heapDeltaBytes": 3094900,
"heapUsedBytes": 70933684,
"domNodes": 78,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 6.621000000000002,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 433.6509999999407,
"styleRecalcs": 13,
"styleRecalcDurationMs": 5.466999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 290.093,
"heapDeltaBytes": 18618636,
"heapUsedBytes": 86590416,
"domNodes": 21,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 109.56299999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 449.2800000000443,
"styleRecalcs": 14,
"styleRecalcDurationMs": 5.676,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 300.003,
"heapDeltaBytes": 18917880,
"heapUsedBytes": 86599792,
"domNodes": 23,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 106.082,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1000.7140000000163,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 620.965,
"heapDeltaBytes": 35241920,
"heapUsedBytes": 105924744,
"domNodes": 0,
"jsHeapTotalBytes": 19820544,
"scriptDurationMs": 46.00800000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 386,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 982.8400000000101,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 629.7059999999999,
"heapDeltaBytes": -13575392,
"heapUsedBytes": 72674168,
"domNodes": -289,
"jsHeapTotalBytes": 19791872,
"scriptDurationMs": 39.727,
"eventListeners": -217,
"totalBlockingTimeMs": 351,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 685.8740000000125,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 262.6280000000003,
"heapDeltaBytes": 13706304,
"heapUsedBytes": 90165572,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 83.953,
"eventListeners": 0,
"totalBlockingTimeMs": 95,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 700.1840000000357,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 287.6700000000003,
"heapDeltaBytes": 14793036,
"heapUsedBytes": 90736628,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 89.91799999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 96,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6539.479999999912,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5619.965999999999,
"heapDeltaBytes": 172376,
"heapUsedBytes": 82962696,
"domNodes": -20,
"jsHeapTotalBytes": 8912896,
"scriptDurationMs": 4473.736,
"eventListeners": 0,
"totalBlockingTimeMs": 26,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6116.014999999948,
"styleRecalcs": 2,
"styleRecalcDurationMs": 1.1789999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5190.656000000001,
"heapDeltaBytes": -12574840,
"heapUsedBytes": 69272752,
"domNodes": -14,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 4029.3269999999993,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 5996.771000000081,
"styleRecalcs": 3,
"styleRecalcDurationMs": 1.0569999999999988,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5157.093000000001,
"heapDeltaBytes": -12353520,
"heapUsedBytes": 69444632,
"domNodes": -14,
"jsHeapTotalBytes": 6815744,
"scriptDurationMs": 3992.443,
"eventListeners": 0,
"totalBlockingTimeMs": 43,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 5753.825000000006,
"styleRecalcs": 2,
"styleRecalcDurationMs": 0.9429999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4910.595000000001,
"heapDeltaBytes": -13302736,
"heapUsedBytes": 69178044,
"domNodes": -16,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 3775.69,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000013,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "large-graph-idle",
"durationMs": 2008.034000000066,
"styleRecalcs": 10,
"styleRecalcDurationMs": 5.375,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 431.14199999999994,
"heapDeltaBytes": -1471564,
"heapUsedBytes": 79213092,
"domNodes": -243,
"jsHeapTotalBytes": 778240,
"scriptDurationMs": 24.807999999999996,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2006.6789999999628,
"styleRecalcs": 8,
"styleRecalcDurationMs": 3.884000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 373.65999999999997,
"heapDeltaBytes": 19821344,
"heapUsedBytes": 83277932,
"domNodes": -237,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 17.392999999999994,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2112.374999999929,
"styleRecalcs": 70,
"styleRecalcDurationMs": 11.186000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 948.0089999999999,
"heapDeltaBytes": -18987840,
"heapUsedBytes": 68169376,
"domNodes": -211,
"jsHeapTotalBytes": 1601536,
"scriptDurationMs": 487.02899999999994,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2072.508999999968,
"styleRecalcs": 68,
"styleRecalcDurationMs": 7.095000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 903.5889999999999,
"heapDeltaBytes": 15750260,
"heapUsedBytes": 79971692,
"domNodes": 3,
"jsHeapTotalBytes": 749568,
"scriptDurationMs": 494.18999999999994,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3091.9210000000703,
"styleRecalcs": 67,
"styleRecalcDurationMs": 10.261,
"layouts": 60,
"layoutDurationMs": 8.801,
"taskDurationMs": 1104.079,
"heapDeltaBytes": -15570956,
"heapUsedBytes": 73735340,
"domNodes": -240,
"jsHeapTotalBytes": -495616,
"scriptDurationMs": 449.43499999999995,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3064.3289999999297,
"styleRecalcs": 66,
"styleRecalcDurationMs": 9.118999999999998,
"layouts": 60,
"layoutDurationMs": 8.847000000000001,
"taskDurationMs": 984.022,
"heapDeltaBytes": 10288320,
"heapUsedBytes": 74554292,
"domNodes": -245,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 454.002,
"eventListeners": -184,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2132.4509999999464,
"styleRecalcs": 49,
"styleRecalcDurationMs": 7.581999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1289.469,
"heapDeltaBytes": -9971416,
"heapUsedBytes": 75970316,
"domNodes": -210,
"jsHeapTotalBytes": 1302528,
"scriptDurationMs": 608.377,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2132.7760000000353,
"styleRecalcs": 47,
"styleRecalcDurationMs": 6.556000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1155.9569999999999,
"heapDeltaBytes": -19497212,
"heapUsedBytes": 71699692,
"domNodes": -213,
"jsHeapTotalBytes": 1863680,
"scriptDurationMs": 580.597,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2010.3260000000773,
"styleRecalcs": 9,
"styleRecalcDurationMs": 3.9859999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 379.8210000000001,
"heapDeltaBytes": -4542304,
"heapUsedBytes": 83867112,
"domNodes": -239,
"jsHeapTotalBytes": -233472,
"scriptDurationMs": 18.423999999999996,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2004.1929999999866,
"styleRecalcs": 7,
"styleRecalcDurationMs": 3.5200000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 356.511,
"heapDeltaBytes": 20224512,
"heapUsedBytes": 84324008,
"domNodes": 14,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 18.604000000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 396.92999999999756,
"styleRecalcs": 49,
"styleRecalcDurationMs": 7.226000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 264.08500000000004,
"heapDeltaBytes": 13612292,
"heapUsedBytes": 83612500,
"domNodes": 23,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 89.70599999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 396.0029999999506,
"styleRecalcs": 49,
"styleRecalcDurationMs": 7.069000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 257.767,
"heapDeltaBytes": 13732096,
"heapUsedBytes": 83544748,
"domNodes": 23,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 86.712,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 1994.2340000000058,
"styleRecalcs": 11,
"styleRecalcDurationMs": 5.710000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 328.435,
"heapDeltaBytes": -1423944,
"heapUsedBytes": 61886836,
"domNodes": -272,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 5.294999999999999,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1992.9979999999432,
"styleRecalcs": 11,
"styleRecalcDurationMs": 5.398999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 321.94800000000004,
"heapDeltaBytes": 9223092,
"heapUsedBytes": 79495236,
"domNodes": -274,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 6.671,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1688.8340000000426,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.334999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 516.164,
"heapDeltaBytes": -5764440,
"heapUsedBytes": 64164112,
"domNodes": -272,
"jsHeapTotalBytes": 6283264,
"scriptDurationMs": 62.97899999999999,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1696.508000000108,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.725999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 459.249,
"heapDeltaBytes": -6998988,
"heapUsedBytes": 62927456,
"domNodes": -276,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 62.031000000000006,
"eventListeners": -230,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 799.5170000000371,
"styleRecalcs": 19,
"styleRecalcDurationMs": 19.354999999999997,
"layouts": 5,
"layoutDurationMs": 7.710000000000002,
"taskDurationMs": 583.804,
"heapDeltaBytes": -6417772,
"heapUsedBytes": 85663180,
"domNodes": 13667,
"jsHeapTotalBytes": 10747904,
"scriptDurationMs": 18.477999999999994,
"eventListeners": 2383,
"totalBlockingTimeMs": 92,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8134.946000000014,
"styleRecalcs": 252,
"styleRecalcDurationMs": 24.266000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3548.6459999999997,
"heapDeltaBytes": -20122724,
"heapUsedBytes": 66383036,
"domNodes": -207,
"jsHeapTotalBytes": 2912256,
"scriptDurationMs": 1610.768,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8119.464999999991,
"styleRecalcs": 251,
"styleRecalcDurationMs": 21.049,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3472.348,
"heapDeltaBytes": -14386692,
"heapUsedBytes": 66060240,
"domNodes": -208,
"jsHeapTotalBytes": 2088960,
"scriptDurationMs": 1576.84,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-large-graph-idle",
"durationMs": 10265.545999999973,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9154.077,
"heapDeltaBytes": -28034476,
"heapUsedBytes": 186553064,
"domNodes": -8062,
"jsHeapTotalBytes": -10293248,
"scriptDurationMs": 124.76599999999999,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 9342.284000000063,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8542.593,
"heapDeltaBytes": -44081984,
"heapUsedBytes": 196777280,
"domNodes": -8062,
"jsHeapTotalBytes": -11997184,
"scriptDurationMs": 95.154,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 13295.457000000057,
"styleRecalcs": 67,
"styleRecalcDurationMs": 13.341000000000019,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12575.887,
"heapDeltaBytes": -33873408,
"heapUsedBytes": 180951752,
"domNodes": -8062,
"jsHeapTotalBytes": -16322560,
"scriptDurationMs": 639.654,
"eventListeners": -14928,
"totalBlockingTimeMs": 1,
"frameDurationMs": 17.223333333333237,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 11830.937000000064,
"styleRecalcs": 67,
"styleRecalcDurationMs": 11.218000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10986.128,
"heapDeltaBytes": -46161384,
"heapUsedBytes": 179604112,
"domNodes": -8062,
"jsHeapTotalBytes": -21241856,
"scriptDurationMs": 558.7460000000001,
"eventListeners": -14928,
"totalBlockingTimeMs": 34,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-node-resize-workload",
"durationMs": 3586.644999999976,
"styleRecalcs": 20,
"styleRecalcDurationMs": 52.705,
"layouts": 20,
"layoutDurationMs": 19.948,
"taskDurationMs": 3440.8140000000003,
"heapDeltaBytes": -68717136,
"heapUsedBytes": 178800076,
"domNodes": -8062,
"jsHeapTotalBytes": 17817600,
"scriptDurationMs": 53.155,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-node-resize-workload",
"durationMs": 2647.793999999976,
"styleRecalcs": 20,
"styleRecalcDurationMs": 49.828999999999986,
"layouts": 20,
"layoutDurationMs": 16.185,
"taskDurationMs": 2515.7189999999996,
"heapDeltaBytes": -33621372,
"heapUsedBytes": 207242400,
"domNodes": -8062,
"jsHeapTotalBytes": 28110848,
"scriptDurationMs": 38.75899999999999,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-zoom-out-idle",
"durationMs": 5347.885000000019,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.10299999999999199,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4775.155,
"heapDeltaBytes": -12483560,
"heapUsedBytes": 177729916,
"domNodes": 0,
"jsHeapTotalBytes": -34865152,
"scriptDurationMs": 64.577,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-zoom-out-idle",
"durationMs": 3499.349999999936,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.12099999999998223,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3279.9100000000003,
"heapDeltaBytes": 24288516,
"heapUsedBytes": 190925660,
"domNodes": 0,
"jsHeapTotalBytes": -17825792,
"scriptDurationMs": 44.057999999999986,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 417.9540000000088,
"styleRecalcs": 16,
"styleRecalcDurationMs": 13.076999999999998,
"layouts": 3,
"layoutDurationMs": 0.802,
"taskDurationMs": 82.33200000000002,
"heapDeltaBytes": 4955656,
"heapUsedBytes": 67062588,
"domNodes": 126,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 7.411,
"eventListeners": 81,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.669999999999998,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "workflow-execution",
"durationMs": 420.12899999997444,
"styleRecalcs": 14,
"styleRecalcDurationMs": 12.750000000000002,
"layouts": 3,
"layoutDurationMs": 0.7250000000000001,
"taskDurationMs": 84.583,
"heapDeltaBytes": 4753632,
"heapUsedBytes": 66911476,
"domNodes": 120,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 7.319000000000001,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 10 finding(s).
| Severity | Count |
|---|---|
| 🔴 Critical | 1 |
| 🟠 High | 1 |
| 🟡 Medium | 4 |
| 🟢 Low | 4 |
Panel: 8/8 reviewers contributed findings.
| ) | ||
| return false | ||
| } | ||
| dropDraft() |
There was a problem hiding this comment.
🔴 Critical — dropDraft() is neither defined in this file nor imported, so this is a TS2304 compile error and, at runtime, a ReferenceError on the happy path of every run_approval ask — the approval part is never pushed, the card never renders, and the throw escapes handleAskEvent → applyChatEvent → ingest → store.ingest → useAgentSession.onRaw, which has no try/catch, so the rest of that websocket frame is lost too. It also invalidates this PR's own evidence: the store test "stays quiet when the ask reaches its turn" and the E2E control case exercise this line, and the two test.fail() cases would "pass" because of this crash rather than the routing hole they document. Raised by 5 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case, kimi-k3-max edge-case).
| let hydratedMessageIds = new Set<string>() | ||
| let hydratedAssistantTurnIds = new Set<TurnId>() | ||
| const reportedPaywallImpressions = new Set<TurnId>() | ||
| const approvalShownAtByAsk = new Map<string, number>() |
There was a problem hiding this comment.
🟠 High — approvalShownAtByAsk and shownApprovalIds (line 90) are never read, written, or cleared anywhere, and reportedPaywallImpressions (line 88) is only ever .clear()ed in reset() and never populated. The two unreferenced consts are locals that fail noUnusedLocals (TS6133) and pnpm knip/lint, and the asymmetry — one cleared in reset(), two not — suggests a partially-applied impression/dedupe change; confirm nothing intended was dropped, then delete the leftovers. Raised by 6 of 8 reviewers (gpt-5.6-sol-max adversarial, claude-opus-5-thinking-max adversarial, kimi-k3-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case, kimi-k3-max edge-case).
| reason: UndeliverableAskReason, | ||
| context: UndeliverableAskContext = {} | ||
| ): void { | ||
| if (reportedAskIds.has(data.ask_id)) return |
There was a problem hiding this comment.
🟡 Medium — Dedupe keys on ask_id alone, ignoring reason (and thread/message scope), while the store shares one reporter across its own routing and every transport it creates — so once an ask is reported under any reason, the same ask re-delivered and dropped for a different reason is silently suppressed. Concretely: the server emits ask X against a locally-settled turn (reported settled-turn), the socket blips and X is re-sent, and the no-live-turn report this PR exists to capture never fires. Keying on ${thread_id}:${ask_id}:${reason} keeps the anti-spam property without collapsing distinct failure modes. Raised by 3 of 8 reviewers (gpt-5.6-sol-max adversarial, kimi-k3-max adversarial, claude-opus-5-thinking-max edge-case).
| ): void { | ||
| if (reportedAskIds.has(data.ask_id)) return | ||
| reportedAskIds.add(data.ask_id) | ||
| if (reportedAskIds.size > MAX_REPORTED_ASKS) { |
There was a problem hiding this comment.
🟡 Medium — The 32-entry cap bounds retained identities, not report volume: cycling 33+ distinct ask ids evicts and re-reports indefinitely (the new transport test asserting 34 calls for 33 asks plus a replay documents exactly this), and because a cache hit returns at line 31 without refreshing recency, insertion order never updates. Each report is a synchronous console write plus a Sentry captureException plus a Datadog addError network call on the websocket ingest path, so a buggy or hostile event stream can flood the client and the telemetry backend. Add a per-session or per-interval report budget alongside the identity dedupe. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, gemini-3.1-pro adversarial, gpt-5.6-sol-max adversarial).
| eventMessageId === undefined | ||
| ? undefined | ||
| : departedTurns.get(departedTurnKey(eventThreadId, eventMessageId)) | ||
| if (reason) reportUndeliverableAsk(event, reason) |
There was a problem hiding this comment.
🟡 Medium — Reporting here fires only on a departedTurns hit, so whole classes of swallowed asks stay invisible: a thread the client tracks under a different turn id (the sibling entry.messageId !== message_id condition leaves no departed entry), a turn retired more than 32 turns ago, an ask that races ahead of startTurn(), and anything after reset() wipes the map while the server still runs the old thread. The doc comment above claims "every return that can swallow an ask says so here", but these returns still swallow silently — the exact stall being measured. Consider reporting unconditionally for event.type === 'agent_ask' with an untracked-turn reason. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case).
|
|
||
| function abortActiveTurn(): void { | ||
| if (!transport) return | ||
| rememberDepartedActiveTurn('no-live-turn') |
There was a problem hiding this comment.
🟡 Medium — If a run_approval frame is processed just before the socket-down callback, the card is already in the message when abortActiveTurn() runs; this only records the departed identity and then clears activeTurnId, so answerAsk() refuses to POST (as the new E2E spec's own comment notes) and, with no later ask frame, the reporter never fires. The user is left with a visible but unanswerable approval and no diagnostic at all. Raised by 1 of 8 reviewers (gpt-5.6-sol-max edge-case).
| level: 'warning', | ||
| tags: { | ||
| reason, | ||
| ask_kind: data.kind?.slice(0, 64) || 'missing', |
There was a problem hiding this comment.
🟢 Low — kind is z.string().optional(), so this writes an arbitrary server-controlled value into an indexed telemetry tag; the 64-char slice bounds length but not cardinality, and unique prefixes create unbounded distinct tag values across the fleet. Allow-list the known kinds and bucket the rest to a single other value, keeping the raw string in context instead. Separately, || reports an empty-string kind as 'missing', conflating "no kind sent" with "empty kind sent" — ?? distinguishes those two backend bugs. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial).
| function handleAskEvent(data: AgentAskEvent['data']): boolean { | ||
| if (data.kind !== 'run_approval') return false | ||
| if (data.kind !== 'run_approval') { | ||
| reportUndeliverableAsk( |
There was a problem hiding this comment.
🟢 Low — ask_user is, by this PR's own framing, a kind the generated contract emits that the client deliberately has no renderer for — a routine, expected condition. Routing it through reportError at level: 'warning' fans every occurrence out to Sentry, Datadog RUM and the Desktop bridge plus a console.warn, so unrendered-kind will likely dominate the failure_delivering_agent_approval_ask dashboard and bury the no-live-turn reports this change is actually chasing. A counter/metric, or reporting only genuinely unexpected kinds, preserves the signal. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
| !poppedHydratedCopy && | ||
| hydratedMessageIds.has(entry.messageId) | ||
| ) { | ||
| rememberDepartedTurn(threadId.value, entry.messageId, 'settled-turn') |
There was a problem hiding this comment.
🟢 Low — This call (and the one at line 382) records the departed turn under threadId.value rather than the thread key the resumed entry came from, unlike settleBackgroundTurn and dropBackgroundTurns, which both use the backgroundTurns map key. When the current thread has moved on from the entry's thread, the entry lands under the wrong key and ingestBackgroundTurnEvent's lookup by eventThreadId misses, so a late ask for that turn is dropped with no telemetry. Raised by 1 of 8 reviewers (gemini-3.1-pro edge-case).
| } | ||
|
|
||
| /** Makes an ask available through transcript hydration, independently of WS delivery. */ | ||
| primePendingAsk(event: AgentWsEvent): void { |
There was a problem hiding this comment.
🟢 Low — The transcript-priming machinery added here is unreachable: no spec calls primePendingAsk, postAnswer, or TurnLockServer.recordAsk, so the pendingAsk field, its pending_ask wiring in transcript(), and the zAgentPendingAsk/AgentPendingAsk imports are dead and pnpm knip will flag them. Relatedly, expect(turnLock.pendingAskIsPrimed()).toBe(false) in the new spec can never fail, since askIsPending only becomes true via primePendingAsk(). Either drop the unused machinery and the vacuous guard, or add the transcript-recovery case they were built for. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
Playwright videos for new testsDownload the recorded videos and HTML report Recorded projects: cloud Recorded test titles:
|
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## core/1.55 #19346 +/- ##
=============================================
+ Coverage 84.69% 84.70% +0.01%
=============================================
Files 2322 2323 +1
Lines 132841 132906 +65
Branches 35638 33761 -1877
=============================================
+ Hits 112507 112583 +76
+ Misses 19982 19971 -11
Partials 352 352
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 13 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…19474) ## Summary Follow-up to #19346 (the core/1.55 backport for approval prompts surviving reconnects). This carries the review hardening that was omitted when the earlier backport merged. - limits telemetry tags to known ask kinds - keeps unknown raw values in structured context instead of tag dimensions - preserves the reconnect behavior from #18952 ## Validation - `pnpm exec vitest run src/workbench/extensions/agent/services/agent/agentEventTransport.test.ts src/workbench/extensions/agent/stores/agent/agentConversationStore.test.ts` (96 tests passed)
Manual backport of #18952 (reports approval prompts that the panel drops after a socket disconnect) after the automated cherry-pick reported conflicts. The resolution preserves the release branch active-turn state while adding the telemetry thread identity and unsupported-ask reporting.
Validation: conflict markers and diff checks pass. Focused local tests could not start because the available shared dependency tree does not match this release branch; hosted CI is required.