Repository navigation
[backport cloud/1.55] feat(agent): show the credits paywall when the workspace runs out, not only when a send is refused - #19521
Conversation
… refused send The agent paywall was reachable from exactly one moment: a turn POST that came back 402/`no_funds`, which `recordSendError` turns into an inline card. Every other way a user meets the credit ceiling had no upgrade path at all. Two things produce that ceiling server-side, and both emit the same `team_billing:agent_credit_stopped`: the pre-turn gate on `AgentPostMessage` (the panel's own POST, so the browser sees the 402) and the per-call gate on `AgentLLMMessages`, the agent runtime's LLM hop. The frontend never calls that second route, so a refusal there kills a turn with no admission error to render. A user who simply does not type again gets nothing either: the one `hasFunds === false` surface in the product is `useBillingBanner`'s `outOfCredits`, which is gated to team plans and lives inside the settings dialog. Measured on 2026-09-25, the one full day the credit-stop event has existed: 65 of the 141 people who sent an agent message hit the ceiling, and 2 were shown a way to pay. Every one of those 65 workspaces is `personal`, so none could have seen the team banner. So read the funds signal the client already holds instead of waiting for a refusal to carry it. `AgentPanelRoot` already cleared paywalls when `subscription.hasFunds` became true; this is the symmetric other half, rendering the existing `AgentPaywallCard` beside the composer when it becomes false. It is non-modal and disables nothing - the composer stays live. `app:agent_paywall_shown` and `app:agent_paywall_cta_clicked` now carry a required `surface` of `refused_send | credits_exhausted`. Without it a rise in impressions is ambiguous between this fix landing and more users being refused. Gated on the capability read having settled (an unsettled read cannot name the right remediation), hidden when the presentation resolves to `unavailable`, suppressed while an inline card is already on screen, and cloud-only. One impression per exhaustion episode, reset when funds return. The pre-existing paywall tests are scoped to the transcript via a new `agent-conversation` testid, since two surfaces now render the same component with the same copy; no assertion was weakened.
Addresses Comfy-Org#18967 (comment) Addresses Comfy-Org#18967 (comment) Addresses Comfy-Org#18967 (comment) Addresses Comfy-Org#18967 (comment) Addresses Comfy-Org#18967 (comment) Addresses Comfy-Org#18967 (comment) Addresses Comfy-Org#18967 (comment)
Addresses review feedback: Comfy-Org#18967 (comment)
Addresses review feedback: Comfy-Org#18967 (comment) Comfy-Org#18967 (comment)
Addresses review feedback: Comfy-Org#18967 (review)
Addresses review feedback: Comfy-Org#18967 (comment)
Addresses review feedback: Comfy-Org#18967 (comment)
Addresses review feedback: Comfy-Org#18967 (comment)
Align billing status fields with generated cloud@4c75dea output. Amp-Thread-ID: https://ampcode.com/threads/T-01a0e60b-75fb-7411-9d36-582ff066db3b
|
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 |
🎭 Playwright: ⏳ Running...🎨 Storybook: 🚧 Building...📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-09-30T01:40:20.166Z",
"gitSha": "e2068073e59fc3cf55e917a86bb42bd5d66cd057",
"branch": "backport-18967-to-cloud-1.55",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2001.4130000000137,
"styleRecalcs": 12,
"styleRecalcDurationMs": 9.602,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 384.093,
"heapDeltaBytes": 3106384,
"heapUsedBytes": 70439276,
"domNodes": -259,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 10.261,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-idle",
"durationMs": 2001.9190000000435,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.331,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 358.177,
"heapDeltaBytes": 6189004,
"heapUsedBytes": 73819780,
"domNodes": -260,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 8.765000000000002,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1750.7219999999961,
"styleRecalcs": 45,
"styleRecalcDurationMs": 13.966,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 798.9599999999999,
"heapDeltaBytes": 9732280,
"heapUsedBytes": 77459804,
"domNodes": -261,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 162.25900000000001,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1694.2980000000034,
"styleRecalcs": 45,
"styleRecalcDurationMs": 16.775,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 705.587,
"heapDeltaBytes": -7093072,
"heapUsedBytes": 60450240,
"domNodes": -260,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 163.311,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1667.7809999999909,
"styleRecalcs": 29,
"styleRecalcDurationMs": 13.741,
"layouts": 6,
"layoutDurationMs": 1.019,
"taskDurationMs": 331.959,
"heapDeltaBytes": 3150496,
"heapUsedBytes": 70843564,
"domNodes": 76,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 10.059,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1667.7579999999352,
"styleRecalcs": 30,
"styleRecalcDurationMs": 13.568999999999999,
"layouts": 6,
"layoutDurationMs": 1.019,
"taskDurationMs": 331.863,
"heapDeltaBytes": 3083968,
"heapUsedBytes": 70864148,
"domNodes": 78,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 10.079999999999998,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 638.5999999999967,
"styleRecalcs": 12,
"styleRecalcDurationMs": 7.881999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 441.33399999999995,
"heapDeltaBytes": 18931168,
"heapUsedBytes": 86628320,
"domNodes": 20,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 168.989,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 597.9650000000447,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.681000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 415.016,
"heapDeltaBytes": 18596472,
"heapUsedBytes": 86616380,
"domNodes": 18,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 174.46299999999997,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1153.6939999999731,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 813.304,
"heapDeltaBytes": 38482396,
"heapUsedBytes": 105116268,
"domNodes": 0,
"jsHeapTotalBytes": 19034112,
"scriptDurationMs": 65.74100000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 546,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1246.4399999998932,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 896.9229999999999,
"heapDeltaBytes": 14279460,
"heapUsedBytes": 104758136,
"domNodes": -294,
"jsHeapTotalBytes": 21909504,
"scriptDurationMs": 72.671,
"eventListeners": -195,
"totalBlockingTimeMs": 598,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 844.2479999999932,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 468.71399999999943,
"heapDeltaBytes": 14786572,
"heapUsedBytes": 91609364,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 158.30100000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 232,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 845.7710000000134,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 470.62699999999944,
"heapDeltaBytes": 14829664,
"heapUsedBytes": 90230060,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 169.304,
"eventListeners": 0,
"totalBlockingTimeMs": 230,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10141.052000000001,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9189.235,
"heapDeltaBytes": -12214640,
"heapUsedBytes": 70668380,
"domNodes": -20,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 7869.313,
"eventListeners": 0,
"totalBlockingTimeMs": 1203,
"frameDurationMs": 18.886666666666677,
"p95FrameDurationMs": 49.89999999999782
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10077.623000000018,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9165.341,
"heapDeltaBytes": -9165404,
"heapUsedBytes": 73046068,
"domNodes": -14,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 7844.027,
"eventListeners": 0,
"totalBlockingTimeMs": 1134,
"frameDurationMs": 18.886666666666617,
"p95FrameDurationMs": 50
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10599.059000000012,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9763.992999999999,
"heapDeltaBytes": -11174884,
"heapUsedBytes": 70744164,
"domNodes": -10,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 8065.548,
"eventListeners": 0,
"totalBlockingTimeMs": 1157,
"frameDurationMs": 18.890000000000025,
"p95FrameDurationMs": 50
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10592.952999999965,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9745.999,
"heapDeltaBytes": 2541020,
"heapUsedBytes": 84492464,
"domNodes": -14,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 8059.881,
"eventListeners": 0,
"totalBlockingTimeMs": 1197,
"frameDurationMs": 18.886666666666677,
"p95FrameDurationMs": 49.899999999999636
},
{
"name": "large-graph-idle",
"durationMs": 2036.7930000000456,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.939000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 565.471,
"heapDeltaBytes": -3821040,
"heapUsedBytes": 83292432,
"domNodes": -240,
"jsHeapTotalBytes": -1282048,
"scriptDurationMs": 34.63799999999999,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2041.1450000000286,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.457999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 589.0849999999999,
"heapDeltaBytes": -2703604,
"heapUsedBytes": 84066060,
"domNodes": -243,
"jsHeapTotalBytes": -1282048,
"scriptDurationMs": 37.784,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2279.5810000000074,
"styleRecalcs": 66,
"styleRecalcDurationMs": 10.008999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1631.659,
"heapDeltaBytes": 14843192,
"heapUsedBytes": 79386244,
"domNodes": 8,
"jsHeapTotalBytes": 487424,
"scriptDurationMs": 859.553,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2275.390000000016,
"styleRecalcs": 68,
"styleRecalcDurationMs": 13.284,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1693.864,
"heapDeltaBytes": -8083436,
"heapUsedBytes": 79800476,
"domNodes": -250,
"jsHeapTotalBytes": 516096,
"scriptDurationMs": 871.5840000000001,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3490.1550000000157,
"styleRecalcs": 62,
"styleRecalcDurationMs": 11.129000000000003,
"layouts": 60,
"layoutDurationMs": 13.162,
"taskDurationMs": 1673.351,
"heapDeltaBytes": 9388560,
"heapUsedBytes": 75280156,
"domNodes": -251,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 785.133,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3541.9469999999365,
"styleRecalcs": 62,
"styleRecalcDurationMs": 12.549999999999995,
"layouts": 60,
"layoutDurationMs": 13.308,
"taskDurationMs": 1674.354,
"heapDeltaBytes": 7691256,
"heapUsedBytes": 74336644,
"domNodes": 6,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 790.776,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3203.8279999999872,
"styleRecalcs": 45,
"styleRecalcDurationMs": 11.457999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1986.9160000000002,
"heapDeltaBytes": -344052,
"heapUsedBytes": 91008628,
"domNodes": -255,
"jsHeapTotalBytes": -602112,
"scriptDurationMs": 1006.123,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3184.033999999997,
"styleRecalcs": 43,
"styleRecalcDurationMs": 7.751000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1967.2800000000002,
"heapDeltaBytes": -4144120,
"heapUsedBytes": 86911796,
"domNodes": -259,
"jsHeapTotalBytes": -602112,
"scriptDurationMs": 993.0459999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2034.9779999999669,
"styleRecalcs": 7,
"styleRecalcDurationMs": 5.583000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 420.95899999999995,
"heapDeltaBytes": -4396736,
"heapUsedBytes": 84301772,
"domNodes": -246,
"jsHeapTotalBytes": -1019904,
"scriptDurationMs": 33.38099999999999,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2028.389000000061,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.850999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 561.1320000000001,
"heapDeltaBytes": -4321764,
"heapUsedBytes": 84238496,
"domNodes": -246,
"jsHeapTotalBytes": -495616,
"scriptDurationMs": 33.708,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 580.5220000000304,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.398,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 400.2869999999999,
"heapDeltaBytes": 14024316,
"heapUsedBytes": 83019256,
"domNodes": 20,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 150.371,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 593.1140000000141,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.208999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 398.19900000000007,
"heapDeltaBytes": 14067796,
"heapUsedBytes": 83159088,
"domNodes": 20,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 145.797,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2004.9440000000232,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.792,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 343.49699999999996,
"heapDeltaBytes": 9813612,
"heapUsedBytes": 79723000,
"domNodes": -275,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 7.034999999999999,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 1992.3800000000256,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.892,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 353.085,
"heapDeltaBytes": 6305256,
"heapUsedBytes": 75985076,
"domNodes": -275,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 7.375,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1704.9989999999866,
"styleRecalcs": 46,
"styleRecalcDurationMs": 14.479,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 736.494,
"heapDeltaBytes": 1818556,
"heapUsedBytes": 71802876,
"domNodes": -275,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 108.00900000000001,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1709.3029999999771,
"styleRecalcs": 46,
"styleRecalcDurationMs": 16.983999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 655.3570000000001,
"heapDeltaBytes": -7800144,
"heapUsedBytes": 62433708,
"domNodes": -274,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 109.2,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1384.3049999999266,
"styleRecalcs": 17,
"styleRecalcDurationMs": 28.532999999999994,
"layouts": 5,
"layoutDurationMs": 12.968999999999998,
"taskDurationMs": 887.1720000000003,
"heapDeltaBytes": -6357816,
"heapUsedBytes": 86570244,
"domNodes": 13667,
"jsHeapTotalBytes": 11272192,
"scriptDurationMs": 29.991000000000003,
"eventListeners": 2383,
"totalBlockingTimeMs": 134,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8425.839999999993,
"styleRecalcs": 249,
"styleRecalcDurationMs": 38.128,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5826.606,
"heapDeltaBytes": -10282564,
"heapUsedBytes": 76457812,
"domNodes": -242,
"jsHeapTotalBytes": -40960,
"scriptDurationMs": 2845.7490000000003,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.669999999999952,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8440.881999999987,
"styleRecalcs": 251,
"styleRecalcDurationMs": 40.092000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5874.256000000001,
"heapDeltaBytes": 289648,
"heapUsedBytes": 80832068,
"domNodes": -218,
"jsHeapTotalBytes": 708608,
"scriptDurationMs": 2871.728,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 17536.103000000025,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16855.821,
"heapDeltaBytes": -22902424,
"heapUsedBytes": 191420680,
"domNodes": -8065,
"jsHeapTotalBytes": -10285056,
"scriptDurationMs": 275.275,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 17268.740999999976,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16773.341,
"heapDeltaBytes": -33770632,
"heapUsedBytes": 181992612,
"domNodes": -8065,
"jsHeapTotalBytes": -20545536,
"scriptDurationMs": 305.04200000000003,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 20975.497000000018,
"styleRecalcs": 163,
"styleRecalcDurationMs": 17.177000000000024,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20694.844,
"heapDeltaBytes": -39071336,
"heapUsedBytes": 183731868,
"domNodes": -8061,
"jsHeapTotalBytes": -16486400,
"scriptDurationMs": 953.026,
"eventListeners": -14928,
"totalBlockingTimeMs": 144,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 20927.909999999996,
"styleRecalcs": 164,
"styleRecalcDurationMs": 16.955,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20609.496,
"heapDeltaBytes": -70293300,
"heapUsedBytes": 170073368,
"domNodes": -8062,
"jsHeapTotalBytes": -18243584,
"scriptDurationMs": 873.043,
"eventListeners": -14928,
"totalBlockingTimeMs": 104,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6207.326999999964,
"styleRecalcs": 20,
"styleRecalcDurationMs": 77.56099999999999,
"layouts": 20,
"layoutDurationMs": 23.056999999999995,
"taskDurationMs": 6091.357999999999,
"heapDeltaBytes": -44281336,
"heapUsedBytes": 176883048,
"domNodes": -8061,
"jsHeapTotalBytes": 10473472,
"scriptDurationMs": 129.21699999999998,
"eventListeners": -14928,
"totalBlockingTimeMs": 451,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 5991.408999999976,
"styleRecalcs": 20,
"styleRecalcDurationMs": 77.88700000000001,
"layouts": 20,
"layoutDurationMs": 23.358000000000004,
"taskDurationMs": 5922.843999999999,
"heapDeltaBytes": 9103964,
"heapUsedBytes": 183702232,
"domNodes": -8061,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 106.56800000000001,
"eventListeners": -14928,
"totalBlockingTimeMs": 387,
"frameDurationMs": 17.776666666666703,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8451.310999999918,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8279.448999999999,
"heapDeltaBytes": -11328432,
"heapUsedBytes": 178289720,
"domNodes": 0,
"jsHeapTotalBytes": -28049408,
"scriptDurationMs": 148.72299999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8532.256999999958,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8306.289999999999,
"heapDeltaBytes": 8801176,
"heapUsedBytes": 171789504,
"domNodes": 0,
"jsHeapTotalBytes": -11010048,
"scriptDurationMs": 132.116,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 447.084000000018,
"styleRecalcs": 14,
"styleRecalcDurationMs": 19.732999999999997,
"layouts": 2,
"layoutDurationMs": 0.5020000000000001,
"taskDurationMs": 107.72300000000001,
"heapDeltaBytes": 4865668,
"heapUsedBytes": 67123380,
"domNodes": 124,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 10.221999999999998,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "workflow-execution",
"durationMs": 102.95800000005784,
"styleRecalcs": 8,
"styleRecalcDurationMs": 13.322,
"layouts": 2,
"layoutDurationMs": 0.7879999999999998,
"taskDurationMs": 73.96,
"heapDeltaBytes": 3067860,
"heapUsedBytes": 68744992,
"domNodes": 108,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 7.048999999999998,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
|
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## cloud/1.55 #19521 +/- ##
=============================================
Coverage ? 84.62%
=============================================
Files ? 2314
Lines ? 131666
Branches ? 35158
=============================================
Hits ? 111419
Misses ? 19887
Partials ? 360
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…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.
Backport of #18967 to
cloud/1.55.Replays the source PR’s 23 linear commits and excludes its five merge commits. Conflict resolution preserves cloud/1.55 billing-store behavior and adapts the paywall telemetry/capability contracts to APIs available on this target. No websocket parser changes or unrelated mainline commits are included.
Validation:
pnpm typecheckpnpm typecheck:browserpnpm build:cloudgit diff --checkSource PR: #18967