Repository navigation
[backport cloud/1.51] feat(billing): consolidate embedded checkout frontend - #15906
Conversation
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎭 Playwright: ✅ 1828 passed, 0 failed · 2 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-08-25T23:45:06.898Z",
"gitSha": "e36ca430aff00f43bfc241f3e7bc4a0af97607f0",
"branch": "backport-14483-to-cloud-1.51",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2070.5489999999145,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.654,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 387.883,
"heapDeltaBytes": 5534972,
"heapUsedBytes": 71145568,
"domNodes": 20,
"jsHeapTotalBytes": 23855104,
"scriptDurationMs": 10.367,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2055.543000000057,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.591,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 451.03200000000004,
"heapDeltaBytes": 5451600,
"heapUsedBytes": 71086880,
"domNodes": 20,
"jsHeapTotalBytes": 23592960,
"scriptDurationMs": 9.325,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1844.567999999981,
"styleRecalcs": 73,
"styleRecalcDurationMs": 30.557000000000002,
"layouts": 12,
"layoutDurationMs": 3.1510000000000002,
"taskDurationMs": 802.5690000000001,
"heapDeltaBytes": -13907996,
"heapUsedBytes": 51664960,
"domNodes": -280,
"jsHeapTotalBytes": 24215552,
"scriptDurationMs": 87.342,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1751.8100000000913,
"styleRecalcs": 73,
"styleRecalcDurationMs": 29.91,
"layouts": 12,
"layoutDurationMs": 3.09,
"taskDurationMs": 746.756,
"heapDeltaBytes": -52268,
"heapUsedBytes": 65464824,
"domNodes": 56,
"jsHeapTotalBytes": 25169920,
"scriptDurationMs": 93.556,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1724.7699999999213,
"styleRecalcs": 32,
"styleRecalcDurationMs": 14.29,
"layouts": 6,
"layoutDurationMs": 0.5249999999999999,
"taskDurationMs": 297.88399999999996,
"heapDeltaBytes": 8317372,
"heapUsedBytes": 74031960,
"domNodes": 79,
"jsHeapTotalBytes": 23592960,
"scriptDurationMs": 8.23,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1724.1840000000366,
"styleRecalcs": 31,
"styleRecalcDurationMs": 13.158999999999999,
"layouts": 6,
"layoutDurationMs": 0.533,
"taskDurationMs": 303.333,
"heapDeltaBytes": 8547992,
"heapUsedBytes": 74101996,
"domNodes": 77,
"jsHeapTotalBytes": 23330816,
"scriptDurationMs": 8.293999999999999,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 469.4839999999658,
"styleRecalcs": 10,
"styleRecalcDurationMs": 5.227,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 297.014,
"heapDeltaBytes": -10576100,
"heapUsedBytes": 54908480,
"domNodes": 16,
"jsHeapTotalBytes": 23855104,
"scriptDurationMs": 42.955000000000005,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-clipping",
"durationMs": 575.4259999999931,
"styleRecalcs": 12,
"styleRecalcDurationMs": 7.461999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 354.358,
"heapDeltaBytes": -11712648,
"heapUsedBytes": 53820324,
"domNodes": 20,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 50.876999999999995,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "large-graph-idle",
"durationMs": 2023.678000000018,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.143000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 482.202,
"heapDeltaBytes": 12807196,
"heapUsedBytes": 73089004,
"domNodes": -281,
"jsHeapTotalBytes": 2715648,
"scriptDurationMs": 13.843000000000002,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 1998.7840000000006,
"styleRecalcs": 9,
"styleRecalcDurationMs": 6.1759999999999975,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 498.46700000000004,
"heapDeltaBytes": 12970476,
"heapUsedBytes": 73136608,
"domNodes": -281,
"jsHeapTotalBytes": 1929216,
"scriptDurationMs": 12.535,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2090.9919999999147,
"styleRecalcs": 68,
"styleRecalcDurationMs": 12.671,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 907.0970000000001,
"heapDeltaBytes": 8936232,
"heapUsedBytes": 70113344,
"domNodes": -284,
"jsHeapTotalBytes": 3956736,
"scriptDurationMs": 247.62900000000002,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2110.2300000000014,
"styleRecalcs": 69,
"styleRecalcDurationMs": 14.065,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 973.2579999999999,
"heapDeltaBytes": 636508,
"heapUsedBytes": 61891456,
"domNodes": -282,
"jsHeapTotalBytes": 3170304,
"scriptDurationMs": 270.23900000000003,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3117.8109999999606,
"styleRecalcs": 66,
"styleRecalcDurationMs": 13.371,
"layouts": 60,
"layoutDurationMs": 6.812,
"taskDurationMs": 1100.8239999999998,
"heapDeltaBytes": -6830768,
"heapUsedBytes": 55539640,
"domNodes": -287,
"jsHeapTotalBytes": 2977792,
"scriptDurationMs": 309.683,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3170.780000000036,
"styleRecalcs": 67,
"styleRecalcDurationMs": 15.507,
"layouts": 60,
"layoutDurationMs": 7.095000000000001,
"taskDurationMs": 1149.564,
"heapDeltaBytes": -4102008,
"heapUsedBytes": 58280844,
"domNodes": -283,
"jsHeapTotalBytes": 3502080,
"scriptDurationMs": 313.482,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2000.6879999999683,
"styleRecalcs": 9,
"styleRecalcDurationMs": 5.377,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 470.48300000000006,
"heapDeltaBytes": 13180856,
"heapUsedBytes": 73765164,
"domNodes": -284,
"jsHeapTotalBytes": 2191360,
"scriptDurationMs": 14.074999999999998,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2034.2269999999871,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.052000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 541.231,
"heapDeltaBytes": 13406644,
"heapUsedBytes": 74181032,
"domNodes": -284,
"jsHeapTotalBytes": 1929216,
"scriptDurationMs": 14.626999999999997,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 535.2619999999888,
"styleRecalcs": 47,
"styleRecalcDurationMs": 9.153,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 316.651,
"heapDeltaBytes": -10036484,
"heapUsedBytes": 55607224,
"domNodes": 20,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 91.931,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 524.9430000000075,
"styleRecalcs": 49,
"styleRecalcDurationMs": 10.422999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 315.268,
"heapDeltaBytes": -9974464,
"heapUsedBytes": 55618620,
"domNodes": 24,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 92.801,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 1998.817000000031,
"styleRecalcs": 10,
"styleRecalcDurationMs": 5.737999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 361.65899999999993,
"heapDeltaBytes": 5493028,
"heapUsedBytes": 71216124,
"domNodes": 20,
"jsHeapTotalBytes": 24117248,
"scriptDurationMs": 5.715,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 1991.0480000000916,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.622000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 483.00499999999994,
"heapDeltaBytes": 5923312,
"heapUsedBytes": 71655092,
"domNodes": 20,
"jsHeapTotalBytes": 23592960,
"scriptDurationMs": 9.105999999999998,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1691.919000000098,
"styleRecalcs": 76,
"styleRecalcDurationMs": 28.294,
"layouts": 16,
"layoutDurationMs": 3.569,
"taskDurationMs": 582.3480000000001,
"heapDeltaBytes": -3314472,
"heapUsedBytes": 62341080,
"domNodes": 62,
"jsHeapTotalBytes": 24117248,
"scriptDurationMs": 63.165,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1671.3570000000573,
"styleRecalcs": 77,
"styleRecalcDurationMs": 34.681,
"layouts": 16,
"layoutDurationMs": 4.186999999999999,
"taskDurationMs": 680.415,
"heapDeltaBytes": -3421992,
"heapUsedBytes": 62359692,
"domNodes": 63,
"jsHeapTotalBytes": 24379392,
"scriptDurationMs": 74.608,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-transition-enter",
"durationMs": 1251.8479999999954,
"styleRecalcs": 20,
"styleRecalcDurationMs": 25.263,
"layouts": 15,
"layoutDurationMs": 9.933000000000002,
"taskDurationMs": 811.49,
"heapDeltaBytes": -6070396,
"heapUsedBytes": 79139904,
"domNodes": 13673,
"jsHeapTotalBytes": 10747904,
"scriptDurationMs": 15.270999999999999,
"eventListeners": 2375,
"totalBlockingTimeMs": 89,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8101.350000000025,
"styleRecalcs": 249,
"styleRecalcDurationMs": 35.297000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3157.056,
"heapDeltaBytes": 9929540,
"heapUsedBytes": 70223368,
"domNodes": -282,
"jsHeapTotalBytes": 3170304,
"scriptDurationMs": 781.3520000000001,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8131.226999999967,
"styleRecalcs": 249,
"styleRecalcDurationMs": 36.21099999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3246.552,
"heapDeltaBytes": 9785964,
"heapUsedBytes": 70486364,
"domNodes": -282,
"jsHeapTotalBytes": 3170304,
"scriptDurationMs": 797.6289999999999,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 14618.32400000003,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13586.048999999999,
"heapDeltaBytes": -41206916,
"heapUsedBytes": 171974572,
"domNodes": -8312,
"jsHeapTotalBytes": -10162176,
"scriptDurationMs": 91.90200000000002,
"eventListeners": -16389,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 14801.449000000048,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14166.509,
"heapDeltaBytes": -28321452,
"heapUsedBytes": 171987828,
"domNodes": -8312,
"jsHeapTotalBytes": -10424320,
"scriptDurationMs": 94.43900000000001,
"eventListeners": -16391,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 17037.257000000067,
"styleRecalcs": 146,
"styleRecalcDurationMs": 14.840999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16399.966000000004,
"heapDeltaBytes": -25184908,
"heapUsedBytes": 188895600,
"domNodes": -8312,
"jsHeapTotalBytes": -7876608,
"scriptDurationMs": 338.562,
"eventListeners": -16387,
"totalBlockingTimeMs": 7,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 17448.65200000004,
"styleRecalcs": 148,
"styleRecalcDurationMs": 16.176999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16854.576999999997,
"heapDeltaBytes": -36293528,
"heapUsedBytes": 164237804,
"domNodes": -8312,
"jsHeapTotalBytes": -16457728,
"scriptDurationMs": 365.564,
"eventListeners": -16383,
"totalBlockingTimeMs": 6,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 427.6869999999917,
"styleRecalcs": 15,
"styleRecalcDurationMs": 18.326999999999995,
"layouts": 3,
"layoutDurationMs": 0.9700000000000001,
"taskDurationMs": 95.59200000000001,
"heapDeltaBytes": 5014736,
"heapUsedBytes": 69636516,
"domNodes": 128,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 7.324000000000001,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "workflow-execution",
"durationMs": 426.59599999990405,
"styleRecalcs": 13,
"styleRecalcDurationMs": 13.482,
"layouts": 2,
"layoutDurationMs": 0.31900000000000006,
"taskDurationMs": 79.99899999999998,
"heapDeltaBytes": 4998336,
"heapUsedBytes": 69492604,
"domNodes": 123,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 5.422999999999999,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000273
}
]
} |
This comment has been minimized.
This comment has been minimized.
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## backport-ingest-types-to-cloud-1.51 #15906 +/- ##
=======================================================================
+ Coverage 79.24% 79.26% +0.02%
=======================================================================
Files 2212 2217 +5
Lines 122756 123582 +826
Branches 38432 38367 -65
=======================================================================
+ Hits 97274 97954 +680
- Misses 24901 25043 +142
- Partials 581 585 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Regenerate packages/ingest-types from the Comfy-Org/cloud ingest OpenAPI spec at 8c26db3a68 (2026-08-21), projected through the FE-facing openapi-project -fe tool, so cloud/1.51 carries the billing contract that the embedded-checkout backport (#15906) consumes. Regenerated rather than cherry-picked: main's ingest-types commits are interleaved with an @hey-api/openapi-ts bump and the ENTERPRISE tier addition, neither of which belongs on 1.51. Pinned deliberately to 8c26db3a68 rather than current cloud main: that spec carries every billing symbol #14483 needs while predating the ENTERPRISE subscription tier. Regenerating from current main would widen SubscriptionTier with ENTERPRISE, breaking the `satisfies never` exhaustiveness guard in useBillingPolicyState.ts and tierPricing.ts -- files #14483 never touches. Enterprise is scoped to 1.52. Purely additive: 13 new exported types (SavedPaymentMethod, SubscriptionDiscount, ListSavedPaymentMethods*, GetCurrentWorkspace*, CurrentWorkspaceResponse), zero exported symbols removed. The only non-comment line changes widen BillingOpStatusResponse.status with 'reconciliation_needed'. Generated with this branch's pinned @hey-api/openapi-ts 0.93.0 and normalized with oxfmt. Zero Admin/internal refs in the generated output.
Consolidates the complete embedded subscription checkout frontend onto current `main` as the single review tip, including the design stack, safety gates, exact quote contract UI, saved methods, and 3DS recovery. - **What**: Replays and reconciles the frontend work from #14447, branches. - **Dependencies**: Requires the combined backend environment for end-to-end preview validation. Review exact quote freshness, reactivation safeguards, saved-method confirmation, and retryable/reconciliation 3DS states together. Checks run locally: typecheck, browser fixture typecheck, format, lint/oxlint, knip, 231 billing-focused Vitest tests, and cloud Playwright test discovery. AS IS / TO BE screenshots and preview will be attached after the combined environment exists. --------- Co-authored-by: Amp <amp@ampcode.com>
…/1.51 cloud/1.51 has not taken #15281, so previewSubscribe still forwards billing_cycle. Assert it here, matching the sibling team-change test at line 1255. Recommitted through the pre-commit hooks (oxfmt, oxlint --type-aware, eslint, whole-project typecheck), which now pass because the ingest-types contract regeneration is stacked underneath this branch. The earlier --no-verify commit this replaces is no longer needed.
460b275 to
89bcd82
Compare
Comfy-Org#15915) ## Summary `workspaceApi.subscribe()` guards `confirmationToken` and `savedPaymentMethodId` as mutually exclusive, but tests truthiness: ```ts if (options.confirmationToken && options.savedPaymentMethodId) { throw new TypeError('confirmationToken and savedPaymentMethodId are mutually exclusive') } ``` An empty-string `confirmationToken` is falsy, so it slips the guard and **both** credential fields are serialized into the request body — `confirmation_token: ''` alongside `saved_payment_method_id`. Checking presence instead refuses that combination. ## Scope One condition and one test. Valid single-credential calls are unchanged: passing only a token, only a saved method, or neither all behave exactly as before, since the guard only fires when both keys are present. Note this makes the guard stricter in one further case — explicitly passing `undefined` for one of them still passes, but passing both keys with *any* defined values now throws, which is what "mutually exclusive" should mean. ## Verification - The new test `subscribe() rejects an empty credential alongside a saved one` was confirmed to **fail against the unfixed guard** (1 failed / 41 passed) and pass with it (42/42) — not assumed. - `pnpm typecheck` and `typecheck:browser` clean. - Full unit suite: **17,727 passed**. The 12 `check-binary-size` failures are pre-existing and environmental. ## Origin Found by CodeRabbit on Comfy-Org#15803, where it landed as an outside-diff-range comment with no thread. The code is not that PR's — it came from Comfy-Org#14483 and reached the branch through a merge from `main` — so it is fixed here on its own rather than folded into a capability-migration PR. **Sequencing note:** Comfy-Org#15906 backports Comfy-Org#14483 to `cloud/1.51` and carries the same guard. Landing this on `main` first lets that backport pick the fix up, rather than shipping the bug to the release line and needing a second backport.
…pi (#15927) Regenerates `packages/ingest-types` on `cloud/1.51` so the branch carries the billing contract that the embedded-checkout backport [#15906](#15906) consumes. **Types only** — no runtime code, no behaviour change. ## Regenerated, not cherry-picked Per team guidance (Jaewon), this is a regeneration rather than a cherry-pick of `main`'s ingest-types commits. Those commits are interleaved with an `@hey-api/openapi-ts` bump (#15166) and the ENTERPRISE tier addition (#15855), neither of which belongs on a release branch. Regenerating lets us pick the exact contract snapshot 1.51 needs. ## Spec pin: cloud `8c26db3a68`, not current main Source: `Comfy-Org/cloud` @ **`8c26db3a684a0595254c5051cba88b60e40810c8`** (2026-08-21), `services/ingest/openapi.yaml`. That commit is pinned deliberately. It carries **all 17 billing symbols** #14483 needs while **predating the ENTERPRISE tier**: - Verified at the pin: all 17 of `SavedPaymentMethod`, `authentication_state`, `decline_reason`, `payment_intent_client_secret`, `reconciliation_needed`, `confirmation_token`, `quote_id`, `quote_version`, `saved_payment_method_id`, `promotion_code`, `amount_due_cents`, `requires_reactivation_confirmation`, `renewal_at`, `renewal_amount_cents`, `discounts`, `currency`, `payment_method_configuration_id` are present. - Verified at the pin: **zero** `ENTERPRISE` occurrences. Regenerating from **current** cloud main would widen `SubscriptionTier` with `ENTERPRISE`, which trips the `satisfies never` exhaustiveness guard in `useBillingPolicyState.ts` and `tierPricing.ts` — breaking files #14483 never touches, and pulling a product decision into a release branch. **Enterprise is scoped to 1.52** (confirmed by Jaewon and Wei Hai), not 1.51. Generated `SubscriptionTier` on this branch stays at six members: ```ts export type SubscriptionTier = | 'FREE' | 'STANDARD' | 'CREATOR' | 'PRO' | 'FOUNDERS_EDITION' | 'TEAM' ``` ## Pipeline Followed `cloud/.github/workflows/push-ingest-types-to-frontend.yml` exactly — `pnpm generate` alone is **not** sufficient: 1. **Project the spec** (mandatory, BE-2669 security boundary): `go run ./services/ingest/scripts/openapi-project -fe -in services/ingest/openapi.yaml -out <fe>/packages/ingest-types/openapi.yaml` Result: `kept 186 ops | excluded 41 x-internal | removed 36 empty paths + 3 orphaned tag decls | kept 192 schemas, pruned 40 schemas + 1 security scheme` (17070 → 13436 lines). 2. `pnpm generate` using **this branch's own pinned `@hey-api/openapi-ts` 0.93.0** (not bumped; handles this spec cleanly). 3. `npx oxfmt --write src/` — raw generator output is 4-space + semicolons; committed files are oxfmt-normalized. Skipping this makes the diff ~99% whitespace noise (`+11499/−12702` unformatted vs `+413/−7` formatted). Skipping step 1 is what leaked cloud's internal admin surface previously (52 `Admin*` refs), the defect #15878 reverted. **Leak guard:** `git grep -c 'Admin' packages/ingest-types/src/types.gen.ts` → **0**. The workflow's full guard pattern (`/admin|/api/internal|/api/webhooks|/m2m|/monitoring|/debug`) also returns clean on the projected spec, `types.gen.ts` and `zod.gen.ts`. `packages/ingest-types/openapi.yaml` is gitignored and is **not** committed. Only `src/*.gen.ts` and `src/index.ts` are. ## Delta — purely additive ``` packages/ingest-types/src/index.ts | 13 ++ packages/ingest-types/src/types.gen.ts | 282 +++++++++++++++++++++++++++++- packages/ingest-types/src/zod.gen.ts | 125 ++++++++++++++- 3 files changed, 413 insertions(+), 7 deletions(-) ``` - **Zero exported symbols removed** (1014 → 1027; set difference in the removal direction is empty). - **13 new exported types**: `SavedPaymentMethod`, `SubscriptionDiscount`, `CurrentWorkspaceResponse`, `ListSavedPaymentMethods{Data,Error,Errors,Response,Responses}`, `GetCurrentWorkspace{Data,Error,Errors,Response,Responses}`. - All 7 deleted lines are benign: 5 are doc-comment rewordings, and the other 2 are the same union being **widened** — `status: 'pending' | 'succeeded' | 'failed'` → `… | 'reconciliation_needed'` (plus its Zod counterpart). No narrowing anywhere. ## Verification - `pnpm typecheck` → **exit 0, zero errors**, with #14483 **not** applied. Because the spec predates ENTERPRISE this is genuinely types-only: no `satisfies never` breakage and no compatibility shims were needed. - `npx oxfmt --check packages/ingest-types/src/` → clean. - Committed **through** the pre-commit hooks (oxfmt, `oxlint --type-aware`, eslint, whole-project `pnpm typecheck`) — no `--no-verify`. ## Merge order Prerequisite for **#15906** (embedded-checkout backport), which is stacked on this branch and fails typecheck with 94 errors without it. **Merge this first.** Not merged here, auto-merge not enabled.
Manual backport of #14483 to
cloud/1.51. The auto-backport workflow failed on merge conflicts, so this was cherry-picked and resolved by hand.Source commit:
8c48cb56506c47fd082afdff971e6fc2372b3fcd(single-parent squash; plaincherry-pick, no-m 1).Important
Stacked PR — merge order matters. This is based on #15927 (
chore: regenerate ingest types from cloud openapi), not directly oncloud/1.51. Merge #15927 first. GitHub will auto-retarget this PR tocloud/1.51once #15927 lands. Without #15927 this branch failspnpm typecheckwith 94 errors.Blocker resolved
The previous revision of this PR was a draft blocked by 94 typecheck errors:
cloud/1.51carried an older generated@comfyorg/ingest-typescontract lacking the embedded-checkout fields this PR consumes (SavedPaymentMethod,authentication_state,payment_intent_client_secret,decline_reason,reconciliation_needed,confirmation_token,quote_id,quote_version,saved_payment_method_id,promotion_code,amount_due_cents,requires_reactivation_confirmation,renewal_at,renewal_amount_cents,discounts,currency,payment_method_configuration_id).#15927 supplies exactly that contract, regenerated from cloud spec
8c26db3a68(2026-08-21) — pinned deliberately to a snapshot that has all 17 symbols but predates the ENTERPRISE tier, so it does not widenSubscriptionTierand trip thesatisfies neverguards inuseBillingPolicyState.ts/tierPricing.ts. Enterprise is 1.52-scoped.pnpm typechecknow: 94 errors → 0 errors (exit 0).Conflicts and how each was resolved
Three files conflicted. The root cause in all three is that #15281 ("fix: use generated workspace API response types") is on
mainbut has not been backported tocloud/1.51. #15281 removed the frontend-onlybilling_cyclefield from the preview-subscribe request;cloud/1.51still has it. #14483 was written on top of that removal.src/platform/workspace/api/workspaceApi.ts— two hunks, both the same underlying issue.PreviewSubscribeOptionsand thepreviewSubscriberequest body.mainhas onlyteamCreditStopId(post-#15281) and #14483 addspromotionCode;cloud/1.51still hasbillingCycle. Resolved as a union: keptcloud/1.51'sbillingCycle/billing_cycleand added #14483'spromotionCode/promotion_code. DroppingbillingCyclewould have silently revertedcloud/1.51behaviour that #15281 has not yet removed there.src/platform/workspace/composables/useSubscriptionCheckout.ts— the team preview call.cloud/1.51callspreviewSubscribe(planSlug, { teamCreditStopId, billingCycle }); #14483 rewrites it asPromise.all([previewSubscribe(...), loadSavedPaymentMethods()]). Kept #14483's parallel structure (that is the PR's intent — warm saved payment methods alongside the preview) and retainedcloud/1.51'sbillingCycleargument.src/platform/workspace/api/workspaceApi.test.ts— kept all five tests #14483 adds (listSavedPaymentMethods, promotion-code preview, quote/saved-method echo, promotion-code omission, mutually-exclusive credentials). The only other difference was a test rename that came from #15281, not #14483:'previewSubscribe() sends POST with plan_slug'→'…sends fields defined by the ingest contract'. Keptcloud/1.51's original name, because oncloud/1.51the request still sendsbilling_cycle, which #15281 explicitly describes as not defined by the ingest contract — importing that wording here would have made the test name false.One follow-on change outside the conflict regions, in its own commit:
useSubscriptionCheckout.test.tsassertedpreviewSubscribewas called with{ teamCreditStopId }only. Oncloud/1.51that call legitimately also carriesbillingCycle, so the assertion was updated to match — consistent with the sibling team-change test at line 1255 which already asserts{ teamCreditStopId: 'team_1400', billingCycle: 'monthly' }.The
billing_cycleunion — re-verified against the new contractRe-checked against the newly generated types from #15927, because if the regenerated
PreviewSubscribeRequesthad gainedbilling_cycle, the local augmentation would be redundant. It has not:PreviewSubscribeRequeststill has nobilling_cycle.cloud/1.51supplies it through a local augmentation atworkspaceApi.ts:88, which predates this backport:satisfies PreviewSubscribeRequeston the request body would not compile without it.SubscribeRequesthas bothbilling_cycleandpromotion_code, so no augmentation is needed there.Verdict: the union resolution stands and is still required. Taking #14483's side verbatim would have dropped
billingCyclefrom the preview request and silently reverted livecloud/1.51behaviour.#15401 ordering — not a stacking conflict
The workflow flagged that #15401 (
[backport cloud/1.51] refactor(workspace): simplify ended subscription state) is open against this branch and might be the cause. It is not. This is genuinemain↔cloud/1.51divergence.SubscriptionPanelContentWorkspace.vue. That file is not among feat(billing): consolidate embedded checkout frontend #14483's 49 files, nor among the three conflicted files.cloud/1.51and then cherry-picking feat(billing): consolidate embedded checkout frontend #14483 produces the identical three conflicts.#15401 and this PR are independent and can land in either order. No ordering constraint.
Verification
Run in the checkout, real results, on the rebased branch:
pnpm install --frozen-lockfile— passes (exit 0)pnpm typecheck— exit 0, zero errors. Before the rebase onto [backport cloud/1.51] chore: regenerate ingest types from cloud openapi #15927 this same tree produced 94 errors (exit 2); all 94 were the contract gap and none were resolution mistakes.pnpm vitest run src/platform/workspace src/platform/cloud/subscription src/composables/useUrlActionLoaders.test.ts src/composables/useFeatureFlags.test.ts src/components/dialog/GlobalDialog.test.ts src/components/graph/GraphCanvas.firstRunEntry.test.ts— 91 files, 1656 tests, all pass (exit 0)oxfmt --check,oxlint --type-aware,eslintacross all 41 changed.ts/.vuefiles — all pass (exit 0)Note that green Vitest is not evidence of type safety on its own — Vitest strips types. The
pnpm typecheckexit 0 above is the type-level evidence.No
--no-verifycommits remain on this branch. The earlier460b275120was made with--no-verifybecause the pre-commit hook runs whole-project typecheck, which no commit could pass before the contract landed. It has been dropped and recommitted as89bcd823b1through the full hook chain (oxfmt,oxlint --type-aware, eslint,pnpm typecheck), which now passes.Per the workflow rules: no
browser_tests/**/*-snapshots/files were involved;package.jsonversion correctly stays atcloud/1.51's version;pnpm-lock.yamlpasses--frozen-lockfile.Not done
Not merged, auto-merge not enabled.
main, #14483, #15401 and all other branches untouched.CI status
65 checks pass, 1 fails:
playwright-video-new-tests. That failure is a pre-existing tagging/workflow mismatch, not a broken test and not a regression from this backport:checkoutRecovery.spec.tsis undertest.describe('Redirect checkout recovery', { tag: '@cloud' }, …).playwright.config.ts'schromiumproject setsgrepInvert: /@mobile|@perf|@audit|@cloud/, so it deliberately excludes@cloud. A@cloud-tagged spec can only run under thecloudproject.playwright-video-new-testsjob hardcodes--project=chromium, so for any newly added@cloud-only spec it matches zero tests and exits 1.No test executed and none failed. This backport does not touch
playwright.config.ts, andcheckoutRecovery.spec.tsis byte-identical to the version #14483 merged tomain— where thechromiumproject carries the same@cloudgrepInvert. Fixing the job to select the right project is out of scope for a backport; flagging it for whoever ownsci-tests-e2e.yaml.The
@cloudspecs themselves are exercised by thecloudproject, andwebsite-e2e,perf-tests,lint-and-format,build,storybook-build,scan,validate-licensesandvalidate-fontsall pass.