Repository navigation
[backport cloud/1.55] feat(agent): emit app:agent_error telemetry (TEL-8) (#16628) - #19497
Conversation
Implements the required V1 telemetry event `app:agent_error` per `reports/telemetry/v1-checklist.md` in the `in-app-agent-program` workspace (row `TEL-8`): "FE surfaces an agent failure to the user, including pre-acceptance request failures not represented by `agent_turn_failed`." Follows the `app:agent_reconnect_failed` precedent (TEL-11, #16397) for the telemetry plumbing shape. - `AgentErrorMetadata` in `src/platform/telemetry/types.ts`: `error_class` (`request_failed | malformed_stream_event | cancel_failed | history_load_failed | ask_answer_failed | thread_list_load_failed | workflow_open_failed`), `failure_stage` (`pre_acceptance | post_acceptance`), `retryable`, `turn_accepted`, `ui_treatment` (`inline_notice | error_overlay | toast | none`). - `trackAgentError` wired through `TelemetryRegistry` and `PostHogTelemetryProvider`. - Call sites at every FE-visible agent failure not already covered by the backend's `agent_turn_failed`: - `sendMessage()`: a rejected `postMessage` (`request_failed`), `inline_notice` via `recordFailedSend`. - `stopTurn()`: a failed `cancelMessage` (`cancel_failed`), post-acceptance, `error_overlay`. A 409 already-settled race is not tracked - it is not a failure. - `answerAsk()`: a failed ask answer (`ask_answer_failed`), post-acceptance - the turn hangs on an unresolved ask. The 409 collapse path is not tracked. - `onRaw()`: any frame failing `parseAgentWsEvent` (`malformed_stream_event`), deduped per turn. - `hydrateFromServer()`: a non-404 transcript load failure (`history_load_failed`). The 404 thread-not-found branch is not tracked. - `AgentPanelRoot.vue`: a failed agent-driven tab open (`workflow_open_failed`) and a failed thread-list load (`thread_list_load_failed`), both `error_overlay`. `turn_accepted` and `retryable` default from `failure_stage` and are overridable, because the stage only approximates them: a resume-path history load is a request the server never accepted issued while an accepted turn streams on, and a failed cancel is post-acceptance yet safe to resend. `retryable` is derived from the response status via `isRetryableRequestFailure()` for every request-shaped class, so the column means one thing across rows. **Not counted:** a busy-state double-submit. It is a normal interaction rather than a failure, and it is frequent enough to dominate the other classes and make the rate unalertable. Admission errors (`no_funds` paywall) also emit nothing - they return early from the send catch and have their own UI. `AgentRestClient.request()` now reads the response body in its own `try` past `response.ok` and raises `AgentResponseUnreadableError`. A truncated or proxy-mangled 2xx therefore classifies as post-acceptance and non-retryable, the same as a `ZodError` - both mean the server started the turn and the FE lost the ack. ``` $ pnpm typecheck (clean) $ pnpm lint 0 errors (225 pre-existing warnings, none in changed files) $ pnpm format:check All matched files use the correct format. $ pnpm knip (clean) $ pnpm vitest run src/platform/telemetry src/workbench/extensions/agent Test Files 114 passed (114) Tests 1629 passed (1629) ``` Every added or changed test was proven red by mutating the fix it covers, then green on restore. Follow-up filed from review: #17358 (a `localStorage` failure after the ack hides a turn the server already started - pre-existing). Trace: MTG-29, mtg-29.2 emitted-vs-required diff (`in-app-agent-program` TEL-8). <!-- authored-by:agent lane-TEL-8 -->
|
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 00ec8888ee45994c03e4a5444f738e75bf610011
Full docs: ADR-DEVEX-LINT-0015 🎭 Playwright: ✅ 2119 passed, 0 failed · 3 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff. Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md 📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-09-30T01:44:17.372Z",
"gitSha": "fcbbf7c2bbf8cbfdfd7f2005d12a0154d2a84f9b",
"branch": "backport-16628-to-cloud-1.55-manual",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 1989.892999999995,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.044999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 441.51499999999993,
"heapDeltaBytes": -4874476,
"heapUsedBytes": 57704088,
"domNodes": -262,
"jsHeapTotalBytes": 4186112,
"scriptDurationMs": 7.789000000000001,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 1990.246999999954,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.857999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 453.39400000000006,
"heapDeltaBytes": -7102668,
"heapUsedBytes": 60592928,
"domNodes": -260,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 8.153,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1721.7149999999606,
"styleRecalcs": 45,
"styleRecalcDurationMs": 13.977,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 690.656,
"heapDeltaBytes": -2219692,
"heapUsedBytes": 65490932,
"domNodes": -259,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 161.34300000000002,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1758.3110000000488,
"styleRecalcs": 46,
"styleRecalcDurationMs": 14.597000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 803.293,
"heapDeltaBytes": -1266432,
"heapUsedBytes": 65868508,
"domNodes": -260,
"jsHeapTotalBytes": 6283264,
"scriptDurationMs": 161.991,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1721.6930000000161,
"styleRecalcs": 33,
"styleRecalcDurationMs": 14.274000000000001,
"layouts": 6,
"layoutDurationMs": 0.973,
"taskDurationMs": 327.239,
"heapDeltaBytes": 3167852,
"heapUsedBytes": 70827816,
"domNodes": 79,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 10.571,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1708.7699999999586,
"styleRecalcs": 30,
"styleRecalcDurationMs": 15.421999999999999,
"layouts": 6,
"layoutDurationMs": 1.125,
"taskDurationMs": 323.546,
"heapDeltaBytes": 3133652,
"heapUsedBytes": 70847328,
"domNodes": 78,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 10.405999999999999,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-clipping",
"durationMs": 631.4360000000079,
"styleRecalcs": 14,
"styleRecalcDurationMs": 9.436,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 451.649,
"heapDeltaBytes": 18879676,
"heapUsedBytes": 85693436,
"domNodes": 24,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 166.069,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-clipping",
"durationMs": 644.0130000000863,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.849,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 442.414,
"heapDeltaBytes": 18501136,
"heapUsedBytes": 81111996,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 170.044,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1194.9220000000196,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 894.64,
"heapDeltaBytes": -17422092,
"heapUsedBytes": 73016660,
"domNodes": -296,
"jsHeapTotalBytes": 21102592,
"scriptDurationMs": 66.24000000000001,
"eventListeners": -217,
"totalBlockingTimeMs": 548,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1223.7099999999828,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 876.7530000000002,
"heapDeltaBytes": 12217688,
"heapUsedBytes": 102909392,
"domNodes": -294,
"jsHeapTotalBytes": 23220224,
"scriptDurationMs": 75.02000000000001,
"eventListeners": -195,
"totalBlockingTimeMs": 595,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 854.2899999999918,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 467.873,
"heapDeltaBytes": 14631220,
"heapUsedBytes": 91465504,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 166.94799999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 230,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 848.0990000000475,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 460.4549999999996,
"heapDeltaBytes": 14669396,
"heapUsedBytes": 91301664,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 161.84799999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 226,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-clean-combined-draw",
"durationMs": 9738.698,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8791.207999999999,
"heapDeltaBytes": 3494796,
"heapUsedBytes": 85313080,
"domNodes": -16,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 7456.846,
"eventListeners": 0,
"totalBlockingTimeMs": 1183,
"frameDurationMs": 20,
"p95FrameDurationMs": 49.899999999999636
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10782.588000000032,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9787.706999999999,
"heapDeltaBytes": 15524804,
"heapUsedBytes": 97637908,
"domNodes": -14,
"jsHeapTotalBytes": 11534336,
"scriptDurationMs": 8442.527,
"eventListeners": 0,
"totalBlockingTimeMs": 1696,
"frameDurationMs": 18.890000000000025,
"p95FrameDurationMs": 49.89999999999782
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10978.908999999987,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10158.192,
"heapDeltaBytes": -11644176,
"heapUsedBytes": 70164688,
"domNodes": -14,
"jsHeapTotalBytes": 7864320,
"scriptDurationMs": 8479.419,
"eventListeners": 0,
"totalBlockingTimeMs": 1400,
"frameDurationMs": 20.00000000000006,
"p95FrameDurationMs": 50
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10426.803999999947,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9584.337000000001,
"heapDeltaBytes": -8936644,
"heapUsedBytes": 73004184,
"domNodes": -12,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 7986.048,
"eventListeners": 0,
"totalBlockingTimeMs": 1028,
"frameDurationMs": 18.883333333333333,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "large-graph-idle",
"durationMs": 2056.395000000009,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.976999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 595.5729999999999,
"heapDeltaBytes": -6478532,
"heapUsedBytes": 81164560,
"domNodes": -244,
"jsHeapTotalBytes": -757760,
"scriptDurationMs": 38.955000000000005,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2027.272000000039,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.953000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 564.4840000000002,
"heapDeltaBytes": -3668104,
"heapUsedBytes": 83160408,
"domNodes": -242,
"jsHeapTotalBytes": -495616,
"scriptDurationMs": 32.150999999999996,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2293.3799999999565,
"styleRecalcs": 65,
"styleRecalcDurationMs": 9.765999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1612.778,
"heapDeltaBytes": 19376352,
"heapUsedBytes": 83914624,
"domNodes": -250,
"jsHeapTotalBytes": 749568,
"scriptDurationMs": 862.188,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2217.3520000000053,
"styleRecalcs": 66,
"styleRecalcDurationMs": 9.614,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1593.4029999999998,
"heapDeltaBytes": 15285644,
"heapUsedBytes": 79711984,
"domNodes": -251,
"jsHeapTotalBytes": 487424,
"scriptDurationMs": 841.933,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3535.5349999999817,
"styleRecalcs": 62,
"styleRecalcDurationMs": 11.077,
"layouts": 60,
"layoutDurationMs": 12.963,
"taskDurationMs": 1661.0839999999998,
"heapDeltaBytes": 8331644,
"heapUsedBytes": 74327868,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 789.57,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3532.3439999999664,
"styleRecalcs": 62,
"styleRecalcDurationMs": 10.687999999999999,
"layouts": 60,
"layoutDurationMs": 13.191999999999998,
"taskDurationMs": 1685.587,
"heapDeltaBytes": 8750088,
"heapUsedBytes": 74579944,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 807.0659999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3098.442000000034,
"styleRecalcs": 44,
"styleRecalcDurationMs": 7.356000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1916.0969999999998,
"heapDeltaBytes": 22042956,
"heapUsedBytes": 88547364,
"domNodes": -248,
"jsHeapTotalBytes": 679936,
"scriptDurationMs": 997.864,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666636,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 3057.160000000067,
"styleRecalcs": 43,
"styleRecalcDurationMs": 6.610999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1843.1329999999998,
"heapDeltaBytes": 22922536,
"heapUsedBytes": 88551268,
"domNodes": -253,
"jsHeapTotalBytes": 1990656,
"scriptDurationMs": 965.694,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2032.466999999997,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.450999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 523.1009999999999,
"heapDeltaBytes": -4648536,
"heapUsedBytes": 84352964,
"domNodes": -246,
"jsHeapTotalBytes": -757760,
"scriptDurationMs": 33.351000000000006,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2021.808999999962,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.004000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 560.4720000000001,
"heapDeltaBytes": -4723260,
"heapUsedBytes": 84207696,
"domNodes": -246,
"jsHeapTotalBytes": -1019904,
"scriptDurationMs": 33.544999999999995,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 542.6130000000171,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.500999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 380.349,
"heapDeltaBytes": 13721448,
"heapUsedBytes": 83870628,
"domNodes": 20,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 137.942,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 576.2339999999995,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.602,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 386.68800000000005,
"heapDeltaBytes": 12776412,
"heapUsedBytes": 76819300,
"domNodes": 20,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 143.067,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2019.7519999999827,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.467,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 462.97499999999997,
"heapDeltaBytes": -745260,
"heapUsedBytes": 69273452,
"domNodes": -274,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 7.689999999999999,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2022.97800000008,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.133999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 441.08799999999997,
"heapDeltaBytes": 9847272,
"heapUsedBytes": 79601172,
"domNodes": -276,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 6.983,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1688.8790000000427,
"styleRecalcs": 46,
"styleRecalcDurationMs": 15.439,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 719.314,
"heapDeltaBytes": 10071128,
"heapUsedBytes": 73244540,
"domNodes": -275,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 103.961,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1710.514000000103,
"styleRecalcs": 45,
"styleRecalcDurationMs": 16.6,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 637.89,
"heapDeltaBytes": 3570408,
"heapUsedBytes": 73541108,
"domNodes": -275,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 104.747,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1383.984000000055,
"styleRecalcs": 16,
"styleRecalcDurationMs": 28.533,
"layouts": 5,
"layoutDurationMs": 13.050000000000002,
"taskDurationMs": 858.0229999999998,
"heapDeltaBytes": 20254556,
"heapUsedBytes": 103851572,
"domNodes": 13667,
"jsHeapTotalBytes": 11272192,
"scriptDurationMs": 29.984000000000005,
"eventListeners": 2383,
"totalBlockingTimeMs": 138,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8344.81199999999,
"styleRecalcs": 250,
"styleRecalcDurationMs": 35.516000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5681.946,
"heapDeltaBytes": -6560216,
"heapUsedBytes": 80827408,
"domNodes": -244,
"jsHeapTotalBytes": 483328,
"scriptDurationMs": 2787.165,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8360.344000000056,
"styleRecalcs": 249,
"styleRecalcDurationMs": 35.065,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5693.8820000000005,
"heapDeltaBytes": -6361448,
"heapUsedBytes": 80544976,
"domNodes": -244,
"jsHeapTotalBytes": 516096,
"scriptDurationMs": 2771.0060000000003,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 16746.061999999994,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16211.996,
"heapDeltaBytes": -42666580,
"heapUsedBytes": 195585680,
"domNodes": -8061,
"jsHeapTotalBytes": -8323072,
"scriptDurationMs": 247.316,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.773333333333238,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 16766.51700000002,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16176.363,
"heapDeltaBytes": -56491676,
"heapUsedBytes": 181853136,
"domNodes": -8065,
"jsHeapTotalBytes": -15138816,
"scriptDurationMs": 255.18600000000004,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 15871.319999999969,
"styleRecalcs": 86,
"styleRecalcDurationMs": 12.411000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15314.374000000002,
"heapDeltaBytes": -40799972,
"heapUsedBytes": 174081396,
"domNodes": -8061,
"jsHeapTotalBytes": -3739648,
"scriptDurationMs": 820.7990000000001,
"eventListeners": -14928,
"totalBlockingTimeMs": 117,
"frameDurationMs": 17.223333333333237,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 20226.736999999957,
"styleRecalcs": 170,
"styleRecalcDurationMs": 16.775999999999986,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 19848.335,
"heapDeltaBytes": -54124920,
"heapUsedBytes": 181602768,
"domNodes": -8061,
"jsHeapTotalBytes": -13631488,
"scriptDurationMs": 894.972,
"eventListeners": -14928,
"totalBlockingTimeMs": 24,
"frameDurationMs": 17.77333333333336,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6174.286999999936,
"styleRecalcs": 20,
"styleRecalcDurationMs": 76.39700000000002,
"layouts": 20,
"layoutDurationMs": 22.683999999999997,
"taskDurationMs": 6037.414999999999,
"heapDeltaBytes": -51444032,
"heapUsedBytes": 189606728,
"domNodes": -8062,
"jsHeapTotalBytes": 2682880,
"scriptDurationMs": 104.601,
"eventListeners": -14928,
"totalBlockingTimeMs": 409,
"frameDurationMs": 17.77333333333336,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-node-resize-workload",
"durationMs": 6035.436000000004,
"styleRecalcs": 20,
"styleRecalcDurationMs": 77.11400000000002,
"layouts": 20,
"layoutDurationMs": 22.930999999999994,
"taskDurationMs": 5940.983000000001,
"heapDeltaBytes": -57279056,
"heapUsedBytes": 176909812,
"domNodes": -8060,
"jsHeapTotalBytes": 10735616,
"scriptDurationMs": 109.065,
"eventListeners": -14926,
"totalBlockingTimeMs": 365,
"frameDurationMs": 18.330000000000048,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8348.718999999961,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8102.068000000001,
"heapDeltaBytes": -15325276,
"heapUsedBytes": 187406664,
"domNodes": 0,
"jsHeapTotalBytes": -25952256,
"scriptDurationMs": 128.86299999999994,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8478.204000000005,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8196.729000000001,
"heapDeltaBytes": 33328624,
"heapUsedBytes": 194195120,
"domNodes": 0,
"jsHeapTotalBytes": -11534336,
"scriptDurationMs": 126.90400000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 102.52500000001419,
"styleRecalcs": 6,
"styleRecalcDurationMs": 18.109,
"layouts": 3,
"layoutDurationMs": 1.5399999999999998,
"taskDurationMs": 80.652,
"heapDeltaBytes": 3140880,
"heapUsedBytes": 68674640,
"domNodes": 129,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 7.869999999999998,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 111.26500000000306,
"styleRecalcs": 9,
"styleRecalcDurationMs": 16.173,
"layouts": 3,
"layoutDurationMs": 1.1949999999999998,
"taskDurationMs": 81.25100000000002,
"heapDeltaBytes": 3105812,
"heapUsedBytes": 68831436,
"domNodes": 131,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 7.115999999999997,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
}
]
} |
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 10 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
| 🟡 Medium | 4 |
| 🟢 Low | 4 |
| ⚪ Nit | 1 |
Panel: 8/8 reviewers contributed findings.
This comment has been minimized.
This comment has been minimized.
Playwright videos for new testsDownload the recorded videos and HTML report Recorded projects: cloud Recorded test titles:
|
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## cloud/1.55 #19497 +/- ##
=============================================
Coverage ? 84.58%
=============================================
Files ? 2314
Lines ? 131610
Branches ? 35423
=============================================
Hits ? 111319
Misses ? 19932
Partials ? 359
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Addresses review feedback:\nhttps://github.com//pull/19497#discussion_r4139468017\nhttps://github.com//pull/19497#discussion_r4139468021\nhttps://github.com//pull/19497#discussion_r4139468025\nhttps://github.com//pull/19497#discussion_r4139468037\nhttps://github.com//pull/19497#discussion_r4139468040\nhttps://github.com//pull/19497#discussion_r4139468044
Addresses review feedback:\nhttps://github.com//pull/19497#discussion_r4139468032\nhttps://github.com//pull/19497#discussion_r4139468034\nhttps://github.com//pull/19497#discussion_r4139468046
Addresses review feedback:\nhttps://github.com//pull/19497#discussion_r4139468044
Extract active-tab and send-failure helpers without changing behavior; document interface-dispatched telemetry members for static analysis.
…to-cloud-1.55-manual
…18664, #18665, #18401, #18413, #18390, #18974) (#19803) ## Summary Single consolidated backport into `cloud/1.55` of Hunter's agent telemetry / paywall attribution cluster. Each PR was cherry-picked individually, in merge order, with conflicts resolved and typecheck + the affected suites run before each commit. | # | PR | Commit | |---|---|---| | 1 | [#18665](#18665) instrument agent panel actions | `f937e5573a` | | 2 | [#18401](#18401) `agent_panel_open` on run attribution events (PM-1471) | `437f420c53` | | 3 | [#18413](#18413) read `agent_panel_open` fresh (PM-1472) | `f70be945cd` | | 4 | [#18390](#18390) attribute agent paywall purchases through checkout telemetry | `ffbaaaea8d` | | 5 | [#18974](#18974) close E1/E3 agent paywall attribution gaps | `c1607791f0` | ### #18664 is not here — it already landed The request listed six PRs. [#18664](#18664) (panel open time: pagehide teardown + visibility flag, G2/G3) **is already on `cloud/1.55`**, backported as part of [#19790](#19790) ("Complete 1.54 parity sweep"), which merged while this branch was being built. Its commit body lists #18664 explicitly, and `getPageVisibilityMetadata.{ts,test.ts}` are present on the base. This branch was rebased onto the new `cloud/1.55` and the now-redundant #18664 cherry-pick dropped. **All six PRs from the request are on `cloud/1.55` once this merges.** Applied in merge order rather than the order listed in the request: #18390 (Sep 25) merged three days before #18974 (Sep 28), which is a direct follow-up fixing #18390's E1/E3 gaps. Applying #18974 first would have meant resolving the follow-up against a base missing the thing it fixes. ### Two backport-specific commits on top - `29fc07f3d6` **refactor(agent): split `reportWorkflowBound` for the fallow CRAP gate.** #18665's `reportWorkflowBound` lands at cyclomatic 13 / CRAP 49.5 on this base, which `fallow` gates as a newly introduced finding (it was the only one of the 9 reported findings actually attributed to this PR — `complexity_introduced: 1`, the other 25 are inherited). Extracted the pending-bind parking, the pending-bind take, and the last-reported lookup into named helpers. Behaviour is unchanged: the fallback passed to `lastReportedWorkflowFor` is the same expression the old ternary's else branch computed, and it has no side effects. `npx fallow audit --changed-since <base>` now returns `verdict: pass`, `complexity_introduced: 0`. - The five cherry-picks had their upstream **AI-agent `Co-authored-by:` trailers stripped** (`Claude Fable 5`, `Amp`), which `.github/scripts/check-ai-co-authors.sh` rejects. No human co-author attribution was removed. The script passes locally against this base. ## Conflict resolutions The recurring cause is that `cloud/1.55` already carries later work these PRs predate — chiefly the #19521 backport (standing credits-exhausted paywall), which introduced `AgentPaywallSurface`; the #19497 backport (`app:agent_error` / TEL-8); and #19790's agent-panel target handling. **#18665 — `useAgentSession.ts`.** The incoming patch and `cloud/1.55` both rewrote the malformed-event / message-done region. `cloud/1.55`'s version is the superset: it has `trackMalformedStreamEvent` (TEL-8), `markStoppedTurnReady`, and `handleActiveTab`. Kept that and folded in #18665's additions — `turnStartedAt` cleanup on `agent_message_done` and in the malformed path, `forgetActiveTurnStartedAt()`, and the `onAskResolved` callback. Dropped #18665's `handleMessageDone`, whose inline stopping→ready transition `markStoppedTurnReady` already performs. **#18665 — `AgentPanelRoot.vue`, against #19790.** Two conflicts introduced by the rebase: - #18665 relocates `start()` next to its new approval handlers. #19790 had already moved `start()` deliberately, with a comment explaining the ordering against target startup. Kept #19790's call site and added only the approval handlers, avoiding a second `start()`. - `onNewChat` — #19790 replaced `setWorkflowTarget(activeWorkflow)` with `retainWorkflowTarget()` / `startFollowingVisibleWorkflow()` keyed on selection tags. Kept #19790's logic; #18665's contribution there is only threading `source` into `newChat(source)`. **#18390 / #18974 — `surface` field.** Roughly 20 conflicts across `types.ts`, `PostHogTelemetryProvider`, `HostTelemetrySink`, `TelemetryRegistry`, and `AgentPanelRoot` were the same shape: `cloud/1.55` carries `surface` on `AgentPaywallShownMetadata` / `AgentPaywallCtaMetadata`, #18390 branched before it existed. Kept `cloud/1.55` in every case and folded in #18390's actual contribution, the `{ source: 'agent_paywall' }` argument to `openAccountPrecondition`. **#18390 — duplicates from a clean auto-merge.** Several files auto-merged without a conflict but produced duplicate declarations, because #18390 re-added what #19521 already backported. Removed the duplicate copy in each: the paywall-impression `watch` in `AgentPanelRoot.vue`, `claimPaywallImpression` in `agentConversationStore.ts`, `trackAgentPaywallShown` / `trackAgentPaywallCtaClicked` in `PostHogTelemetryProvider.ts`, and duplicate type imports in `TelemetryRegistry.ts` and `agentPaywallPresentation.ts`. `resolvePaywalls` was kept over the incoming `setPaywallsResolved`, which has no definition on this branch. **#18401 — `agentPanelStore.test.ts`.** Both sides appended tests at the same point; kept both. ## Deliberately dropped `#18974`'s one-line addition to the **`intent`-stage top-up event** in `TopUpCreditsDialogContentWorkspace.vue`. `cloud/1.55`'s `TopupBillingEvent` stage union is `BillingStarted | BillingSucceeded | BillingFailed` — there is no `intent` stage, and `handlePrimaryAction` emits no telemetry on the amount→confirm step. #18974 only *added `payment_intent_source` to* an event that does not exist here, so there was nothing to attribute. The field itself **is** on the type, and the other five `payment_intent_source` call sites (`started`, two synchronous failures, `succeeded`, `reportPurchaseError`) plus the `adoptPendingOperation` poller hand-off all applied. E3's actual coverage is intact. Two test expectations were adjusted to match the branch rather than upstream: - `TopUpCreditsDialogContentWorkspace.test.ts` — the four `carries the opening surface onto every top-up event` rows drop `'intent'` from their expected stage collections, matching the dropped emit. They still assert the whole projected `(stage, source)` collection, so the falsifier #18974 relied on is preserved for every remaining site. - `AgentPanelRoot.test.ts` — `attributes its CTA to the credits_exhausted surface` now expects `openAccountPrecondition('credits', { source: 'agent_paywall' })`. That test came from #19521 and predates #18390's new argument. ## Tests On `3b81246105`, rebased onto `b064d929ce`: - `pnpm typecheck` — exit 0 across all five projects (app, account-core, billing-web, account-ui, billing-contract). - `pnpm lint` — **0 errors**, 198 warnings, all pre-existing `import-x/no-restricted-paths` and `import-x/no-named-as-default-member` in files this PR does not touch. - `pnpm format:check` — clean. - `pnpm vitest run src/workbench/extensions/agent src/platform/telemetry src/extensions/core/agentPanel.test.ts` — **167 files passed, 2826 passed, 2 expected fail**, 0 failures. - `pnpm test:unit` (whole suite) passed exit 0 on the pre-rebase tree; it is re-running against this base, and CI is the authority on the result. Browser/Playwright tests were not run locally — those only run in CI, and no claim is made about them here.
Backports #16628 to cloud/1.55 after the automated backport conflicted.
This preserves failed prompts for retry and records bounded agent error telemetry across transport, workflow, and session failures. The conflict resolution keeps the release branch agent implementation and layers the new telemetry contract onto it.
Validation: