Repository navigation
[backport cloud/1.56] FE-1908 / DES-1033 fix(billing): offer hosted checkout when top-up has no default payment method (#21180) - #21221
Conversation
…s no default payment method (#21180) ## Summary Consolidated-rail top-up now recovers from `NO_PAYMENT_METHOD` by offering Stripe-hosted Checkout for the same amount instead of ending on an error toast. Supersedes the copy change in #21171. **Why.** Off-session top-up (`POST /api/billing/topup`) is the only purchase path once a workspace leaves `legacy_stripe`. A workspace without a Stripe invoice default gets a dead-end toast and cannot buy credits at all. **Root cause (backend, confirmed on BE-5732).** `CreateTopup` charges only the customer's live Stripe `invoice_settings.default_payment_method`. A card saved only on the subscription, or merely attached, does not count, and the resolver deliberately does not promote one. `can_top_up` does not cover payment-method readiness: capabilities are UI guidance, so a `can_top_up: true` workspace can still be refused. **How.** - On a definitive `NO_PAYMENT_METHOD` refusal, the confirm step shows an inline hint and swaps **Pay** for **Continue to checkout**. Every other refusal keeps its existing toast. The refusal happens before any billing operation is reserved, so this cannot start a second payment for an in-flight purchase. - **Continue to checkout** calls the existing hosted endpoint `POST /api/billing/topup/checkout` with the selected amount and a `return_url` chosen by `topupCheckoutReturnUrl`: cloud web returns to `location.href`; Desktop, Desktop 2 and local web return to billing-web's neutral `/return/topup` page (#21199, renamed in #21205), because their own origin is not an allowed return host. The billing-web origin comes from `billing_web_url`, else from the connected Cloud environment (`billing.comfy.org` / `stagingbilling.comfy.org` / `testbilling.comfy.org`), since a local `/api/features` has none. If no origin resolves, checkout is not started. It goes through `sdk.topup.createHostedTopupCheckout` on the SDK rail and a new `workspaceApi.createTopupCheckout` on the legacy rail, so issue and recovery stay on one rail. It then sets the pending top-up marker so the balance refreshes on return, and opens Checkout. On Desktop the URL goes to the system browser through the host's popup handler. - Per DES review: a blocked checkout tab switches the dialog to a "Checkout didn't open" screen with an **Open checkout** retry (a fresh click) instead of navigating the app away, and a checkout that fails to open shows "The payment page couldn't open. Nothing was charged. Try again." inline instead of a Purchase Failed toast. - No new capability field: the hosted endpoint has no payment-method precondition, no rail branch and no flag gate, so a `can_top_up_hosted_checkout` would always equal `can_top_up` (agreed on FE-1908). - `noPaymentMethodError` is replaced by `noPaymentMethodCheckoutHint`: "This workspace has no card saved for one-click top-ups. Pay on a checkout page instead." It no longer points to Billing & invoices, because the generic portal does not set an invoice default. **Set a default card** (`flow_type: payment_method_update`, cloud#13970) follows once that flow is live in production. Linear: FE-1908, DES-1033 ## Verification - Comfy Desktop 1.1.7 (Desktop 2) pointed at this branch (`dev:cloud`, testcloud, SDK rail), with `NO_PAYMENT_METHOD` stubbed on `POST /api/billing/topup`: the refused screen offers Continue to checkout; `POST /api/billing/topup/checkout` is sent with `return_url=https://testbilling.comfy.org/return/topup`; `window.open(checkout.comfy.org/...)` is handed to the system browser and the dialog closes without the blocked screen; a sandbox test-card payment lands on the neutral return page; switching back to the app fires `focus`, which refetches `/api/billing/balance` and moves the balance from 90,909 to 101,459 (+10,550). - Local e2e `topUpNoPaymentMethod.spec.ts` against a local backend: passed (local build sends the billing-web return page). - `topupCheckoutReturnUrl.test.ts`: cloud web, server origin, prefixed origin, each environment fallback, unresolved. - `pnpm exec vitest run` on `TopUpCreditsDialogContentWorkspace.test.ts`, `topupOperationView.test.ts`, `useTopupOperation.test.ts`, `billingSdkStore.test.ts`: 181 passed. - New: checkout opens for the refused amount and the marker is set (legacy rail); checkout failure keeps the dialog open with an error; other refusals do not offer checkout; SDK rail routes through `createHostedTopupCheckout`; hosted-checkout failure projection. - `oxfmt`, `oxlint --type-aware`, `eslint`, server-fact gate, `typecheck:app` clean. ### AS IS / TO BE <table> <tr><th>AS IS</th><th>TO BE</th></tr> <tr> <td> https://github.com/user-attachments/assets/6e32d1f8-32ae-4898-9b17-d88d4c50c98d </td> <td> https://github.com/user-attachments/assets/bf51da8b-508b-40ae-92a9-53c9fb1f0570 </td> </tr> <tr> <td>main build in Comfy Desktop 2: Pay ends on a "Purchase Failed" toast that points at a Manage billing button that does not exist.</td> <td>This PR in Comfy Desktop 2: refused, Continue to checkout, Stripe sandbox checkout in the system browser, test-card payment, billing-web return page, and back in the app the balance goes from 101,459 to 112,009.<br><br>The return page in this recording still shows the old title; #21205 renames it to "Return to ComfyUI" at <code>/return/topup</code>.</td> </tr> </table> ### Plan position | Item | Ticket | PR | Status | | --- | --- | --- | --- | | Fix "Manage billing" copy | FE-1908 | #21171 | Superseded by this PR | | **Hosted checkout recovery on `NO_PAYMENT_METHOD`** | **FE-1908 / DES-1033** | **this PR** | **In review** | | Migration gate reads the live Stripe invoice default, not the stored field | BE-20139 follow-up | – | Proposed | | Neutral billing-web return page | FE-3464 | #21199 | Merged | | Generic return path and title (`/return/topup`, "Return to ComfyUI") | FE-3464 | #21205 | In review | | Test/staging return hosts | – | Comfy-Org/cloud#13964 | Merged | | Set a default card (`payment_method_update`) | BE-21143 | Comfy-Org/cloud#13970 | Merged, not in prod | ```mermaid graph LR A["PR 21171: copy fix"] -.->|"superseded"| B["This PR: hosted checkout recovery"] C["BE: migration gate uses live invoice default"] --> D["Fewer NO_PAYMENT_METHOD refusals"] B --> D E["PR 21199: billing-web return page"] --> B style B fill:#f9d71c,stroke:#333,stroke-width:2px ``` (cherry picked from commit fe4189d) (cherry picked from commit 70ec2c4)
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords: 2
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
📦 Bundle Size
⚡ Performance Report
Scenario timings
Absolute values
Raw data{
"timestamp": "2026-10-17T07:14:09.529Z",
"gitSha": "760b9f2f97f16ba0d75aa1afadb07a0199c18b5f",
"branch": "backport-21180-to-cloud-1.56",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2009.4569999999976,
"styleRecalcs": 11,
"styleRecalcDurationMs": 3.3850000000000007,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 228.92800000000003,
"heapDeltaBytes": -3207104,
"heapUsedBytes": 58919664,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 5.6960000000000015,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 2010.6220000000121,
"styleRecalcs": 12,
"styleRecalcDurationMs": 3.214,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 226.69500000000002,
"heapDeltaBytes": -3835680,
"heapUsedBytes": 55755840,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 6.394999999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666942148760327,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1680.8850000000177,
"styleRecalcs": 71,
"styleRecalcDurationMs": 15.805,
"layouts": 12,
"layoutDurationMs": 4.171,
"taskDurationMs": 519.271,
"heapDeltaBytes": -1996624,
"heapUsedBytes": 65491944,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 107.98299999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666336633663363,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1680.146000000036,
"styleRecalcs": 71,
"styleRecalcDurationMs": 15.903,
"layouts": 12,
"layoutDurationMs": 4.14,
"taskDurationMs": 544.4689999999999,
"heapDeltaBytes": 20156500,
"heapUsedBytes": 79762236,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 109.903,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666336633663363,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1705.5799999999977,
"styleRecalcs": 29,
"styleRecalcDurationMs": 10.109999999999998,
"layouts": 6,
"layoutDurationMs": 1.3030000000000002,
"taskDurationMs": 233.207,
"heapDeltaBytes": 228316,
"heapUsedBytes": 62359036,
"domNodes": 53,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 11.607000000000001,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666990291262135,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1727.5900000000206,
"styleRecalcs": 32,
"styleRecalcDurationMs": 9.85,
"layouts": 6,
"layoutDurationMs": 1.16,
"taskDurationMs": 252.64200000000002,
"heapDeltaBytes": 4214720,
"heapUsedBytes": 71812756,
"domNodes": 53,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 12.985000000000003,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384617,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 415.25400000000445,
"styleRecalcs": 16,
"styleRecalcDurationMs": 3.8510000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 289.848,
"heapDeltaBytes": -7059764,
"heapUsedBytes": 61750312,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 105.16199999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667999999999992,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 494.08399999998664,
"styleRecalcs": 15,
"styleRecalcDurationMs": 3.965999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 309.133,
"heapDeltaBytes": -6738596,
"heapUsedBytes": 60775984,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 106.678,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 861.8720000000053,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 448.172,
"heapDeltaBytes": 10947136,
"heapUsedBytes": 92624256,
"domNodes": 0,
"jsHeapTotalBytes": 1736704,
"scriptDurationMs": 32.49099999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 256,
"frameDurationMs": 25.49117647058823,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 855.8859999999981,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 438.773,
"heapDeltaBytes": 39637408,
"heapUsedBytes": 107836452,
"domNodes": 0,
"jsHeapTotalBytes": 4620288,
"scriptDurationMs": 33.332,
"eventListeners": 0,
"totalBlockingTimeMs": 235,
"frameDurationMs": 24.76285714285715,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 672.1080000000086,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 254.84500000000043,
"heapDeltaBytes": 17453988,
"heapUsedBytes": 97758004,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 91.63000000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 87,
"frameDurationMs": 20.70606060606061,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 687.7140000000281,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 257.933,
"heapDeltaBytes": -14648124,
"heapUsedBytes": 79802684,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 91.09200000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 82,
"frameDurationMs": 20.58823529411765,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "extension-clean-combined-draw",
"durationMs": 5638.698000000005,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.542,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4752.360000000001,
"heapDeltaBytes": -11445640,
"heapUsedBytes": 72812176,
"domNodes": -142,
"jsHeapTotalBytes": -11931648,
"scriptDurationMs": 3750.868,
"eventListeners": -74,
"totalBlockingTimeMs": 0,
"frameDurationMs": 20.71029411764706,
"p95FrameDurationMs": 33.40000000000009
},
{
"name": "extension-clean-combined-draw",
"durationMs": 5443.215000000009,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.3809999999999985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4591.4169999999995,
"heapDeltaBytes": -11424076,
"heapUsedBytes": 73250880,
"domNodes": -143,
"jsHeapTotalBytes": -6426624,
"scriptDurationMs": 3606.964,
"eventListeners": -78,
"totalBlockingTimeMs": 0,
"frameDurationMs": 19.75709090909091,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 5157.158000000009,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.5720000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4454.746,
"heapDeltaBytes": 8841680,
"heapUsedBytes": 86172932,
"domNodes": -142,
"jsHeapTotalBytes": -8785920,
"scriptDurationMs": 3525.4829999999997,
"eventListeners": -78,
"totalBlockingTimeMs": 0,
"frameDurationMs": 19.57007575757576,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 5498.824000000013,
"styleRecalcs": 4,
"styleRecalcDurationMs": 1.318999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4678.072999999999,
"heapDeltaBytes": -8509796,
"heapUsedBytes": 68660464,
"domNodes": -142,
"jsHeapTotalBytes": -10358784,
"scriptDurationMs": 3658.369,
"eventListeners": -74,
"totalBlockingTimeMs": 21,
"frameDurationMs": 20.61315789473684,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "large-graph-idle",
"durationMs": 2009.681999999998,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.3690000000000007,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 290.46999999999997,
"heapDeltaBytes": -10536688,
"heapUsedBytes": 77687700,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 27.179999999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666942148760334,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2010.013000000015,
"styleRecalcs": 11,
"styleRecalcDurationMs": 3.9489999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 307.57900000000006,
"heapDeltaBytes": -10223112,
"heapUsedBytes": 76839440,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 29.179000000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2135.0499999999784,
"styleRecalcs": 70,
"styleRecalcDurationMs": 12.713000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1094.839,
"heapDeltaBytes": -18515404,
"heapUsedBytes": 69347480,
"domNodes": 0,
"jsHeapTotalBytes": 561152,
"scriptDurationMs": 572.105,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665354330708663,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "large-graph-pan",
"durationMs": 2117.631000000017,
"styleRecalcs": 71,
"styleRecalcDurationMs": 12.732000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1063.568,
"heapDeltaBytes": -19770464,
"heapUsedBytes": 69134040,
"domNodes": 0,
"jsHeapTotalBytes": 561152,
"scriptDurationMs": 552.643,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665873015873014,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "large-graph-zoom",
"durationMs": 3106.486000000018,
"styleRecalcs": 74,
"styleRecalcDurationMs": 15.729,
"layouts": 60,
"layoutDurationMs": 15.367,
"taskDurationMs": 1184.1879999999999,
"heapDeltaBytes": 3576864,
"heapUsedBytes": 84087048,
"domNodes": 24,
"jsHeapTotalBytes": 299008,
"scriptDurationMs": 538.608,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666129032258063,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3090.375999999992,
"styleRecalcs": 73,
"styleRecalcDurationMs": 15.002,
"layouts": 60,
"layoutDurationMs": 15.351999999999999,
"taskDurationMs": 1174.285,
"heapDeltaBytes": 4332868,
"heapUsedBytes": 93585524,
"domNodes": 24,
"jsHeapTotalBytes": 299008,
"scriptDurationMs": 538.123,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66559139784946,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2166.5480000000343,
"styleRecalcs": 49,
"styleRecalcDurationMs": 7.963999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1201.425,
"heapDeltaBytes": 3481088,
"heapUsedBytes": 72121116,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 633.175,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384614,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2155.3900000000112,
"styleRecalcs": 49,
"styleRecalcDurationMs": 8.083000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1264.71,
"heapDeltaBytes": 4359604,
"heapUsedBytes": 72387356,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 660.0930000000001,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665116279069768,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2016.8919999999844,
"styleRecalcs": 9,
"styleRecalcDurationMs": 3.351,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 331.1700000000001,
"heapDeltaBytes": -9470048,
"heapUsedBytes": 79511700,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 28.448999999999995,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2036.6339999999923,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 373.98699999999997,
"heapDeltaBytes": -10002760,
"heapUsedBytes": 79945984,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 31.715,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6655737704918,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 444.5969999999875,
"styleRecalcs": 47,
"styleRecalcDurationMs": 6.487,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 283.63,
"heapDeltaBytes": -11685444,
"heapUsedBytes": 57838628,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 98.136,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 408.0200000000218,
"styleRecalcs": 49,
"styleRecalcDurationMs": 6.602,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 268.70399999999995,
"heapDeltaBytes": 10570148,
"heapUsedBytes": 74673008,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 94.164,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663999999999998,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2009.7210000000132,
"styleRecalcs": 12,
"styleRecalcDurationMs": 2.921,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 241.455,
"heapDeltaBytes": 1168776,
"heapUsedBytes": 71203192,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 6.813,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198342,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-idle",
"durationMs": 2009.6609999999941,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 240.55899999999997,
"heapDeltaBytes": 1175736,
"heapUsedBytes": 71431616,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 7.826,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1680.911999999978,
"styleRecalcs": 76,
"styleRecalcDurationMs": 16.517000000000003,
"layouts": 16,
"layoutDurationMs": 5.343999999999999,
"taskDurationMs": 521.271,
"heapDeltaBytes": -5783888,
"heapUsedBytes": 63889856,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 85.01800000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666336633663366,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1691.063999999983,
"styleRecalcs": 76,
"styleRecalcDurationMs": 17.514,
"layouts": 16,
"layoutDurationMs": 5.444,
"taskDurationMs": 528.81,
"heapDeltaBytes": -5809300,
"heapUsedBytes": 62844100,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 85.78,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-transition-enter",
"durationMs": 783.4270000000174,
"styleRecalcs": 18,
"styleRecalcDurationMs": 18.750000000000004,
"layouts": 5,
"layoutDurationMs": 8.585,
"taskDurationMs": 539.8190000000002,
"heapDeltaBytes": -657820,
"heapUsedBytes": 89937016,
"domNodes": 14227,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 18.116999999999994,
"eventListeners": 2463,
"totalBlockingTimeMs": 60,
"frameDurationMs": 18.650000000000006,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8159.338000000048,
"styleRecalcs": 250,
"styleRecalcDurationMs": 43.092999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3786.694,
"heapDeltaBytes": 7933492,
"heapUsedBytes": 96075972,
"domNodes": 0,
"jsHeapTotalBytes": 1572864,
"scriptDurationMs": 1943.821,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666053169734152,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8105.498000000011,
"styleRecalcs": 250,
"styleRecalcDurationMs": 41.675000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4040.516,
"heapDeltaBytes": -15489120,
"heapUsedBytes": 72108136,
"domNodes": 0,
"jsHeapTotalBytes": 1347584,
"scriptDurationMs": 2025.9239999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66604938271605,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 12014.139,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11111.026,
"heapDeltaBytes": -37184748,
"heapUsedBytes": 179037800,
"domNodes": -3045,
"jsHeapTotalBytes": 1593344,
"scriptDurationMs": 160.208,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 20.33197969543147,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "vue-large-graph-idle",
"durationMs": 12401.684999999987,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11515.757,
"heapDeltaBytes": -34908292,
"heapUsedBytes": 182292800,
"domNodes": -3045,
"jsHeapTotalBytes": 8388608,
"scriptDurationMs": 176.941,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 20.980541455160747,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "vue-large-graph-pan",
"durationMs": 14764.954999999987,
"styleRecalcs": 72,
"styleRecalcDurationMs": 15.369999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14104.165,
"heapDeltaBytes": -26849076,
"heapUsedBytes": 194874648,
"domNodes": -3045,
"jsHeapTotalBytes": 5959680,
"scriptDurationMs": 608.874,
"eventListeners": -14915,
"totalBlockingTimeMs": 3,
"frameDurationMs": 26.210460992907798,
"p95FrameDurationMs": 50.099999999998545
},
{
"name": "vue-large-graph-pan",
"durationMs": 14527.743999999984,
"styleRecalcs": 68,
"styleRecalcDurationMs": 14.341999999999993,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13987.698999999999,
"heapDeltaBytes": -36212756,
"heapUsedBytes": 185678728,
"domNodes": -3045,
"jsHeapTotalBytes": 4562944,
"scriptDurationMs": 593.7249999999999,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 25.842628774422735,
"p95FrameDurationMs": 50
},
{
"name": "vue-node-resize-workload",
"durationMs": 4058.076999999969,
"styleRecalcs": 20,
"styleRecalcDurationMs": 49.840999999999994,
"layouts": 20,
"layoutDurationMs": 19.262,
"taskDurationMs": 3941.9710000000005,
"heapDeltaBytes": 15006564,
"heapUsedBytes": 214071752,
"domNodes": 0,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 61.068999999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 24.544242424242427,
"p95FrameDurationMs": 50
},
{
"name": "vue-node-resize-workload",
"durationMs": 4961.93100000005,
"styleRecalcs": 20,
"styleRecalcDurationMs": 53.19799999999999,
"layouts": 20,
"layoutDurationMs": 23.412000000000003,
"taskDurationMs": 4429.548000000001,
"heapDeltaBytes": 941384,
"heapUsedBytes": 217410288,
"domNodes": 0,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 79.83100000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 25.424489795918365,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6056.016,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5610.852000000002,
"heapDeltaBytes": -36934128,
"heapUsedBytes": 180872476,
"domNodes": -3045,
"jsHeapTotalBytes": 6770688,
"scriptDurationMs": 80.457,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 20.301342281879194,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6278.313000000026,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5899.173000000001,
"heapDeltaBytes": -38950308,
"heapUsedBytes": 167636516,
"domNodes": -3042,
"jsHeapTotalBytes": 16777216,
"scriptDurationMs": 87.868,
"eventListeners": -14905,
"totalBlockingTimeMs": 0,
"frameDurationMs": 20.874086378737537,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "workflow-execution",
"durationMs": 87.52499999997099,
"styleRecalcs": 7,
"styleRecalcDurationMs": 9.341999999999999,
"layouts": 2,
"layoutDurationMs": 1.0849999999999997,
"taskDurationMs": 55.04999999999999,
"heapDeltaBytes": 3887868,
"heapUsedBytes": 69069780,
"domNodes": 117,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 5.6819999999999995,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000036,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 435.9279999999899,
"styleRecalcs": 18,
"styleRecalcDurationMs": 13.77,
"layouts": 3,
"layoutDurationMs": 1.4380000000000002,
"taskDurationMs": 91.254,
"heapDeltaBytes": 5777908,
"heapUsedBytes": 71659392,
"domNodes": 126,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 8.380000000000006,
"eventListeners": 81,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384603,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 464.9449999999433,
"styleRecalcs": 78,
"styleRecalcDurationMs": 83.449,
"layouts": 76,
"layoutDurationMs": 22.601,
"taskDurationMs": 419.962,
"heapDeltaBytes": 13690140,
"heapUsedBytes": 96556940,
"domNodes": 76,
"jsHeapTotalBytes": 13369344,
"scriptDurationMs": 133.14499999999998,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667857142857137,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 467.23900000006324,
"styleRecalcs": 78,
"styleRecalcDurationMs": 86.572,
"layouts": 76,
"layoutDurationMs": 23.556,
"taskDurationMs": 427.411,
"heapDeltaBytes": 13666444,
"heapUsedBytes": 79313776,
"domNodes": 76,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 134.859,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66428571428573,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 834.2259999999442,
"styleRecalcs": 78,
"styleRecalcDurationMs": 225.389,
"layouts": 76,
"layoutDurationMs": 26.575000000000003,
"taskDurationMs": 816.681,
"heapDeltaBytes": 9884936,
"heapUsedBytes": 140824304,
"domNodes": 76,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 204.246,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66470588235295,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 835.5860000000348,
"styleRecalcs": 78,
"styleRecalcDurationMs": 224.236,
"layouts": 76,
"layoutDurationMs": 26.243,
"taskDurationMs": 817.295,
"heapDeltaBytes": 10335040,
"heapUsedBytes": 134582436,
"domNodes": 76,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 209.488,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664705882352933,
"p95FrameDurationMs": 16.800000000000182
}
]
}🔬 E2E CoverageLine coverage: 64.2% Coverage totals
Top 10 files by uncovered lines
🎭 Playwright: ✅ 2205 passed, 0 failed📊 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 🌾 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. Fallow gates on new findings in changed files only, so everything below was introduced or moved by this PR (34 changed files).
Pre-existing findings are baselined in Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since c44eec052598aeb72e3c0879b8da5c4f5bcc9775
Full docs: ADR-DEVEX-LINT-0015 |
This comment has been minimized.
This comment has been minimized.
christian-byrne
left a comment
There was a problem hiding this comment.
Backport fidelity check against the merged original (#21180), per branch: diffed sorted +/- lines against the original, then diffed the resulting files for every mismatch rather than calling a line mismatch a failure on its own.
Every remaining difference traces to this branch's pre-existing state (before that PR), not to a content loss:
TopUpCreditsDialogContentWorkspace.vueuses<h2>for step titles here (vs<DialogTitle>on main) — confirmed the pre-backport file on this branch already used<h2>throughout, so this predates the design-systemDialogTitleadoption on main.- Toast assertions reference the branch's existing
useToast: () => ({ add: mockToastAdd })mock shape rather than main's newer.errorhelper — confirmed via the pre-backport test file. openHostedBillingTab.ts'sreserveBillingTab()null handling reads differently (early-returnif (!tab) return 'blocked'vs main'stab?.navigate(...)ternary) but is equivalently null-safe.
No package.json touched, so no packaging/exports risk. No open review threads. CI fully green at this head. Approving.
Manual backport of #21180 (FE-1908 / DES-1033). The bot's cherry-pick hit conflicts.
Why
On the consolidated billing rail, top-up dead-ends with
NO_PAYMENT_METHODwhen the workspace has no Stripe invoice default. This backport brings the hosted-checkout recovery, the billing-webreturn_urlfor non-cloud-web origins, and the Desktop billing-tab handoff (#21198, folded into #21180) to this release line.Root cause
Off-session top-up charges only the Stripe customer's invoice default, and the dialog had no recovery when that was missing. Details and fix design are in #21180.
How
Cherry-pick of the #21180 squash commit, with the conflicts resolved as below.
Conflict resolution
This branch predates several
mainchanges, so the cherry-pick keeps this branch's code and adds only #21180's behavior:TopUpCreditsDialogContentWorkspace.vue: keeps the PrimeVue toast,manageSubscription, the saved-card note with its Manage billing link,<h2>titles andretryPaymentAuthentication. Adds theNO_PAYMENT_METHODrefusal state, Continue to checkout, the "Checkout didn't open" screen and the inline open failure.useSubscriptionCheckout.ts: keeps the PrimeVuetoast.addrecovery toast and only swaps itswindow.openforopenBillingUrl(Desktop handoff from FE-1908 fix(billing): don't report Desktop's handed-off billing pages as blocked popups #21198).topupOperationView.ts: widenstopupFailureErrorto acceptHostedTopupCheckoutFailure, without main'sOPERATION_ALREADY_PENDINGbranch.workspaceApi.ts:handleAxiosErrortakes one argument on this branch.noPaymentMethodError(no longer used) and keeps this branch's other top-up keys.Verification
viteston the top-up dialog,platform/workspace/billing,useTopupOperation,useWorkspaceBillingandcomposables/billing: all pass. The pre-commit hook ran lint and typecheck.AS IS / TO BE
See #21180 for the AS IS / TO BE recordings; this backport has no behavior of its own.