Skip to content

[backport cloud/1.51] feat(billing): consolidate embedded checkout frontend - #15906

Merged
comfy-pr-bot merged 3 commits into
cloud/1.51from
backport-14483-to-cloud-1.51
Aug 27, 2026
Merged

comfy-pr-bot merged 3 commits into
cloud/1.51from
backport-14483-to-cloud-1.51

Conversation

@huntcsg

@huntcsg huntcsg commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

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; plain cherry-pick, no -m 1).

Important

Stacked PR — merge order matters. This is based on #15927 (chore: regenerate ingest types from cloud openapi), not directly on cloud/1.51. Merge #15927 first. GitHub will auto-retarget this PR to cloud/1.51 once #15927 lands. Without #15927 this branch fails pnpm typecheck with 94 errors.

Blocker resolved

The previous revision of this PR was a draft blocked by 94 typecheck errors: cloud/1.51 carried an older generated @comfyorg/ingest-types contract 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 widen SubscriptionTier and trip the satisfies never guards in useBillingPolicyState.ts / tierPricing.ts. Enterprise is 1.52-scoped.

pnpm typecheck now: 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 main but has not been backported to cloud/1.51. #15281 removed the frontend-only billing_cycle field from the preview-subscribe request; cloud/1.51 still has it. #14483 was written on top of that removal.

src/platform/workspace/api/workspaceApi.ts — two hunks, both the same underlying issue. PreviewSubscribeOptions and the previewSubscribe request body. main has only teamCreditStopId (post-#15281) and #14483 adds promotionCode; cloud/1.51 still has billingCycle. Resolved as a union: kept cloud/1.51's billingCycle / billing_cycle and added #14483's promotionCode / promotion_code. Dropping billingCycle would have silently reverted cloud/1.51 behaviour that #15281 has not yet removed there.

src/platform/workspace/composables/useSubscriptionCheckout.ts — the team preview call. cloud/1.51 calls previewSubscribe(planSlug, { teamCreditStopId, billingCycle }); #14483 rewrites it as Promise.all([previewSubscribe(...), loadSavedPaymentMethods()]). Kept #14483's parallel structure (that is the PR's intent — warm saved payment methods alongside the preview) and retained cloud/1.51's billingCycle argument.

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'. Kept cloud/1.51's original name, because on cloud/1.51 the request still sends billing_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.ts asserted previewSubscribe was called with { teamCreditStopId } only. On cloud/1.51 that call legitimately also carries billingCycle, 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_cycle union — re-verified against the new contract

Re-checked against the newly generated types from #15927, because if the regenerated PreviewSubscribeRequest had gained billing_cycle, the local augmentation would be redundant. It has not:

// packages/ingest-types/src/types.gen.ts — generated
export type PreviewSubscribeRequest = {
  plan_slug: string
  promotion_code?: string
  team_credit_stop_id?: string
}                                  // <- no billing_cycle

export type SubscribeRequest = {
  billing_cycle?: 'monthly' | 'yearly'   // <- has it
  promotion_code?: string                // <- and promotion_code
  ...
}
  • PreviewSubscribeRequest still has no billing_cycle. cloud/1.51 supplies it through a local augmentation at workspaceApi.ts:88, which predates this backport:
    interface PreviewSubscribeRequest extends GeneratedPreviewSubscribeRequest {
      billing_cycle?: SubscribeBillingCycle
    }
    That augmentation is load-bearing — the satisfies PreviewSubscribeRequest on the request body would not compile without it.
  • SubscribeRequest has both billing_cycle and promotion_code, so no augmentation is needed there.

Verdict: the union resolution stands and is still required. Taking #14483's side verbatim would have dropped billingCycle from the preview request and silently reverted live cloud/1.51 behaviour.

#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 genuine main ↔ cloud/1.51 divergence.

#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, eslint across all 41 changed .ts/.vue files — all pass (exit 0)

Note that green Vitest is not evidence of type safety on its own — Vitest strips types. The pnpm typecheck exit 0 above is the type-level evidence.

No --no-verify commits remain on this branch. The earlier 460b275120 was made with --no-verify because the pre-commit hook runs whole-project typecheck, which no commit could pass before the contract landed. It has been dropped and recommitted as 89bcd823b1 through 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.json version correctly stays at cloud/1.51's version; pnpm-lock.yaml passes --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:

NEW_SPEC_FILES: browser_tests/tests/dialogs/checkoutRecovery.spec.ts
$ pnpm exec playwright test --project=chromium browser_tests/tests/dialogs/checkoutRecovery.spec.ts
Error: No tests found.
  • Every test in checkoutRecovery.spec.ts is under test.describe('Redirect checkout recovery', { tag: '@cloud' }, …).
  • playwright.config.ts's chromium project sets grepInvert: /@mobile|@perf|@audit|@cloud/, so it deliberately excludes @cloud. A @cloud-tagged spec can only run under the cloud project.
  • The playwright-video-new-tests job 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, and checkoutRecovery.spec.ts is byte-identical to the version #14483 merged to main — where the chromium project carries the same @cloud grepInvert. Fixing the job to select the right project is out of scope for a backport; flagging it for whoever owns ci-tests-e2e.yaml.

The @cloud specs themselves are exercised by the cloud project, and website-e2e, perf-tests, lint-and-format, build, storybook-build, scan, validate-licenses and validate-fonts all pass.

@huntcsg huntcsg added the backport Backporting a PR onto a release candidate label Aug 25, 2026
@coderabbitai

coderabbitai Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (2)
  • [release]
  • [backport

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e91ab47d-1419-49fc-9a03-adf03bfa9c98

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ✅ 1828 passed, 0 failed · 2 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1807 / ❌ 0 / ⚠️ 2 / ⏭️ 5)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • New-test walkthrough (chromium, recorded video): View Report

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 08/25/2026, 11:35:31 PM UTC

Links

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.8 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 55.9 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.6 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 51.8 MB heap
large-graph-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.7 MB heap
large-graph-pan: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 62.9 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 54.3 MB heap
minimap-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.5 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 53.0 MB heap
subgraph-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 68.1 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 59.5 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 89ms TBT · 75.5 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.1 MB heap
vue-large-graph-idle: · 57.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 164.0 MB heap
vue-large-graph-pan: · 57.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 7ms TBT · 168.4 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 66.3 MB heap

ℹ️ No baseline found — significance unavailable.

Absolute values
Metric Value
canvas-idle: avg frame time 17ms
canvas-idle: p95 frame time 17ms
canvas-idle: layout duration 0ms
canvas-idle: style recalc duration 7ms
canvas-idle: layout count 0
canvas-idle: style recalc count 10
canvas-idle: task duration 419ms
canvas-idle: script duration 10ms
canvas-idle: TBT 0ms
canvas-idle: heap used 67.8 MB
canvas-idle: DOM nodes 20
canvas-idle: event listeners 5
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 3ms
canvas-mouse-sweep: style recalc duration 30ms
canvas-mouse-sweep: layout count 12
canvas-mouse-sweep: style recalc count 73
canvas-mouse-sweep: task duration 775ms
canvas-mouse-sweep: script duration 90ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 55.9 MB
canvas-mouse-sweep: DOM nodes -112
canvas-mouse-sweep: event listeners -74
canvas-zoom-sweep: avg frame time 17ms
canvas-zoom-sweep: p95 frame time 17ms
canvas-zoom-sweep: layout duration 1ms
canvas-zoom-sweep: style recalc duration 14ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 32
canvas-zoom-sweep: task duration 301ms
canvas-zoom-sweep: script duration 8ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 70.6 MB
canvas-zoom-sweep: DOM nodes 78
canvas-zoom-sweep: event listeners 19
dom-widget-clipping: avg frame time 17ms
dom-widget-clipping: p95 frame time 17ms
dom-widget-clipping: layout duration 0ms
dom-widget-clipping: style recalc duration 6ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 11
dom-widget-clipping: task duration 326ms
dom-widget-clipping: script duration 47ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 51.8 MB
dom-widget-clipping: DOM nodes 18
dom-widget-clipping: event listeners 2
large-graph-idle: avg frame time 17ms
large-graph-idle: p95 frame time 17ms
large-graph-idle: layout duration 0ms
large-graph-idle: style recalc duration 6ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 10
large-graph-idle: task duration 490ms
large-graph-idle: script duration 13ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 69.7 MB
large-graph-idle: DOM nodes -281
large-graph-idle: event listeners -149
large-graph-pan: avg frame time 17ms
large-graph-pan: p95 frame time 17ms
large-graph-pan: layout duration 0ms
large-graph-pan: style recalc duration 13ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 69
large-graph-pan: task duration 940ms
large-graph-pan: script duration 259ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 62.9 MB
large-graph-pan: DOM nodes -283
large-graph-pan: event listeners -164
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 7ms
large-graph-zoom: style recalc duration 14ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 67
large-graph-zoom: task duration 1125ms
large-graph-zoom: script duration 312ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 54.3 MB
large-graph-zoom: DOM nodes -285
large-graph-zoom: event listeners -167
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 6ms
minimap-idle: layout count 0
minimap-idle: style recalc count 9
minimap-idle: task duration 506ms
minimap-idle: script duration 14ms
minimap-idle: TBT 0ms
minimap-idle: heap used 70.5 MB
minimap-idle: DOM nodes -284
minimap-idle: event listeners -149
subgraph-dom-widget-clipping: avg frame time 17ms
subgraph-dom-widget-clipping: p95 frame time 17ms
subgraph-dom-widget-clipping: layout duration 0ms
subgraph-dom-widget-clipping: style recalc duration 10ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 48
subgraph-dom-widget-clipping: task duration 316ms
subgraph-dom-widget-clipping: script duration 92ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 53.0 MB
subgraph-dom-widget-clipping: DOM nodes 22
subgraph-dom-widget-clipping: event listeners 8
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 7ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 10
subgraph-idle: task duration 422ms
subgraph-idle: script duration 7ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 68.1 MB
subgraph-idle: DOM nodes 20
subgraph-idle: event listeners 6
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 4ms
subgraph-mouse-sweep: style recalc duration 31ms
subgraph-mouse-sweep: layout count 16
subgraph-mouse-sweep: style recalc count 77
subgraph-mouse-sweep: task duration 631ms
subgraph-mouse-sweep: script duration 69ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 59.5 MB
subgraph-mouse-sweep: DOM nodes 63
subgraph-mouse-sweep: event listeners 4
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 10ms
subgraph-transition-enter: style recalc duration 25ms
subgraph-transition-enter: layout count 15
subgraph-transition-enter: style recalc count 20
subgraph-transition-enter: task duration 811ms
subgraph-transition-enter: script duration 15ms
subgraph-transition-enter: TBT 89ms
subgraph-transition-enter: heap used 75.5 MB
subgraph-transition-enter: DOM nodes 13673
subgraph-transition-enter: event listeners 2375
viewport-pan-sweep: avg frame time 17ms
viewport-pan-sweep: p95 frame time 17ms
viewport-pan-sweep: layout duration 0ms
viewport-pan-sweep: style recalc duration 36ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 249
viewport-pan-sweep: task duration 3202ms
viewport-pan-sweep: script duration 789ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 67.1 MB
viewport-pan-sweep: DOM nodes -282
viewport-pan-sweep: event listeners -131
vue-large-graph-idle: avg frame time 17ms
vue-large-graph-idle: p95 frame time 17ms
vue-large-graph-idle: layout duration 0ms
vue-large-graph-idle: style recalc duration 0ms
vue-large-graph-idle: layout count 0
vue-large-graph-idle: style recalc count 0
vue-large-graph-idle: task duration 13876ms
vue-large-graph-idle: script duration 93ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 164.0 MB
vue-large-graph-idle: DOM nodes -8312
vue-large-graph-idle: event listeners -16390
vue-large-graph-pan: avg frame time 18ms
vue-large-graph-pan: p95 frame time 17ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 16ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 147
vue-large-graph-pan: task duration 16627ms
vue-large-graph-pan: script duration 352ms
vue-large-graph-pan: TBT 7ms
vue-large-graph-pan: heap used 168.4 MB
vue-large-graph-pan: DOM nodes -8312
vue-large-graph-pan: event listeners -16385
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 16ms
workflow-execution: layout count 3
workflow-execution: style recalc count 14
workflow-execution: task duration 88ms
workflow-execution: script duration 6ms
workflow-execution: TBT 0ms
workflow-execution: heap used 66.3 MB
workflow-execution: DOM nodes 126
workflow-execution: event listeners 98
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
    }
  ]
}

@datadog-official

This comment has been minimized.

@codecov

codecov Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.35973% with 160 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...m/workspace/composables/useSubscriptionCheckout.ts 79.18% 55 Missing and 1 partial ⚠️
...nents/SubscriptionRequiredDialogContentUnified.vue 50.00% 32 Missing ⚠️
...platform/workspace/stores/billingOperationStore.ts 90.95% 18 Missing and 1 partial ⚠️
...ponents/SubscriptionTransitionPreviewWorkspace.vue 74.64% 18 Missing ⚠️
...ponents/SubscriptionAddPaymentPreviewWorkspace.vue 87.09% 15 Missing and 1 partial ⚠️
...kspace/components/UnifiedStripePaymentSelector.vue 88.63% 9 Missing and 1 partial ⚠️
...orm/workspace/utils/pendingSubscriptionCheckout.ts 94.91% 3 Missing ⚠️
...kspace/components/SubscriptionSuccessWorkspace.vue 81.81% 2 Missing ⚠️
src/composables/useUrlActionLoaders.ts 90.00% 1 Missing ⚠️
src/main.ts 0.00% 1 Missing ⚠️
... and 2 more
@@                           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     
Flag Coverage Δ
unit 73.28% <84.35%> (+0.07%) ⬆️
website-unit 22.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/composables/useFeatureFlags.ts 81.69% <100.00%> (+0.94%) ⬆️
...scription/composables/usePaymentReturnUrlLoader.ts 100.00% <100.00%> (ø)
.../subscription/composables/useSubscriptionDialog.ts 95.00% <100.00%> (+2.35%) ⬆️
...tform/cloud/subscription/utils/paymentReturnUrl.ts 100.00% <100.00%> (ø)
.../subscription/utils/subscriptionQuoteFormatting.ts 100.00% <100.00%> (ø)
...subscription/utils/teamSubscriptionCheckoutUtil.ts 100.00% <ø> (ø)
src/platform/telemetry/types.ts 62.50% <ø> (ø)
src/platform/workspace/auth/WorkspaceAuthGate.vue 97.03% <ø> (-0.09%) ⬇️
...nts/SubscriptionRequiredDialogContentWorkspace.vue 100.00% <ø> (ø)
src/composables/useUrlActionLoaders.ts 94.73% <90.00%> (-1.70%) ⬇️
... and 11 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added the risk:R3 PR risk grade (advisory shadow check; grader-owned) label Aug 25, 2026
@dante01yoon dante01yoon added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch cloud/1.51 core/1.52 Backport PRs for core/1.52 cloud/1.52 Backport PRs for cloud/1.52 labels Aug 25, 2026
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.
huntcsg and others added 2 commits August 25, 2026 23:23
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.
@huntcsg
huntcsg force-pushed the backport-14483-to-cloud-1.51 branch from 460b275 to 89bcd82 Compare August 25, 2026 23:33
@huntcsg
huntcsg changed the base branch from cloud/1.51 to backport-ingest-types-to-cloud-1.51 August 25, 2026 23:34
@huntcsg
huntcsg marked this pull request as ready for review August 25, 2026 23:34
@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Aug 25, 2026
@github-actions
github-actions Bot requested a review from thedatalife August 25, 2026 23:34
@huntcsg huntcsg assigned dante01yoon and unassigned thedatalife Aug 25, 2026
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Aug 26, 2026
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.
comfy-pr-bot pushed a commit that referenced this pull request Aug 26, 2026
…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.
Base automatically changed from backport-ingest-types-to-cloud-1.51 to cloud/1.51 August 26, 2026 23:37
@huntcsg huntcsg removed needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch core/1.52 Backport PRs for core/1.52 labels Aug 27, 2026
@huntcsg huntcsg removed the cloud/1.52 Backport PRs for cloud/1.52 label Aug 27, 2026
@comfy-pr-bot
comfy-pr-bot merged commit 3467024 into cloud/1.51 Aug 27, 2026
92 of 95 checks passed
@comfy-pr-bot
comfy-pr-bot deleted the backport-14483-to-cloud-1.51 branch August 27, 2026 00:41
@huang47 huang47 added the risk:xhigh PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026 — with ChatGPT Codex Connector
@huang47 huang47 removed the risk:R3 PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026
@dante01yoon dante01yoon mentioned this pull request Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Backporting a PR onto a release candidate risk:xhigh PR risk grade (advisory shadow check; grader-owned) size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants