Skip to content

feat(account-ui): billing view package with the headless top-up experience (FE-2215) - #17662

Merged
dante01yoon merged 4 commits into
mainfrom
jaewon/fe-2215-phase-4-new-view-package-for-billing-composables-and
Sep 15, 2026
Merged

dante01yoon merged 4 commits into
mainfrom
jaewon/fe-2215-phase-4-new-view-package-for-billing-composables-and

Conversation

@dante01yoon

@dante01yoon dante01yoon commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Stacked on the Phase 3 integration branch (jaewon/fe-2227-phase3-integration, PR 0 + #17657 + #17659); retarget main once Phase 3 lands.

Phase 4 of the billing SDK track: the core in @comfyorg/account/billing is framework-free by construction, so the Vue composables that present it need a package of their own. This PR scaffolds it and ships the composables; the unstyled CheckoutSteps component follows in the stacked PR #17663 to keep this one reviewable.

  • Linear: https://linear.app/comfyorg/issue/FE-2215
  • Name decision: the ticket left @comfyorg/account-ui vs @comfyorg/billing-ui open. Picked @comfyorg/account-ui — it is the view half of @comfyorg/account and will also be the natural home for the sign-in pieces if they ever leave @comfyorg/account/vue (explicitly out of scope here).

How

New package packages/account-ui (@comfyorg/account-ui, private, workspace:*), entry ./billing only. Modelled on packages/account: same tsconfig, lint/typecheck scripts, vue + @vueuse/core as peers, @comfyorg/account as a real dependency. @comfyorg/account gains no Vue dependency and is not modified.

Registration: knip.config.ts workspace, root lint/lint:no-cache/typecheck scripts (typecheck:account-ui), and the license workflow's --excludePackages list (a private package reports as UNLICENSED, same as @comfyorg/account). Root tsconfig.json has no references array; the eslint resolver already globs ./packages/*/tsconfig.json, and vitest already globs packages/**.

Contents (src/billing/), ported from the PoC vue/billing.ts and re-seated on the merged core API:

  • billingClient.ts — BillingClient (lifecycle + capabilities + credits + topup command + subscription commands), BILLING_CLIENT_KEY, provideBillingClient, useBillingClient. Every composable takes an explicit client or falls back to the injected one.
  • useBillingOperation(selector, client?) — subscribes to BillingOperationLifecycle once, selects by { id } or { kind } (newest of that kind, so a resumed operation is picked up from the snapshot), unsubscribes on scope end via tryOnScopeDispose.
  • useTopUp(options) — the headless top-up over createTopupCommand + driveEmbeddedChallenge + projectPaymentStep. Exposes canTopUp/denial read from the server's capabilities snapshot (undefined until read, never derived locally), host-owned presetsCents/minAmountCents/maxAmountCents/creditsPerDollar (an amount outside the host bounds returns INVALID_AMOUNT without reaching the core), amountCents, submitting, result, the eight-state projection, submit/retry/preview/cancel/reset/continueVerification. A hosted continuation goes to the host's openUrl(url, mode) with mode: 'new_tab' | 'redirect' | 'preopened' (host picks the mode via navigationMode); an embedded challenge is driven through the host's challengePort. No router, no window, no Stripe here.
  • useCheckout(options) — the same attempt machinery over createBillingCommands: subscribe, resubscribe, retry (resends the last request), openPaymentPortal (resolves the URL and hands it to openUrl). cancelSubscription is not a checkout and stays on client.commands.
  • useCredits(options) — balance in micros as the core reports it, loading, failure (a failed refresh keeps the last balance), refresh.
  • usePaymentAttempt (internal) — what top-up and checkout share: the followed operation, the projection over it, the host-reported step, the once-per-continuation effect. A host-reported cancel outranks a pending operation; reset drops only a settled one from view, never a live one.

Copy: nothing here renders text. The projection carries coded keys only; CheckoutSteps (next PR) resolves them through createPaymentCopy/paymentCopyKeys.

Tests (vitest + @testing-library/vue, 12 tests) run the real core over a scripted transport (__fixtures__/billingHarness.ts): can_top_up gating with the coded denial and no POST, host bounds outside the core, hosted continuation opened once in the configured mode and again on continueVerification, embedded challenge driven through the port with a capabilities re-read after settlement, coded decline with no provider text in result/projection/operation, cancel/reset semantics, provide/inject resolution, scope-end unsubscribe.

AS-IS / TO-BE

No UI surface, no screenshots.

  • AS-IS: the billing core has no Vue consumer; every host would re-derive operation tracking, projection, continuation, and gating.
  • TO-BE: @comfyorg/account-ui/billing exposes the headless top-up and checkout experiences; hosts supply navigation, the challenge port, presets, bounds, and copy.

Notes for review

  • Non-test source is ~556 lines; CheckoutSteps is split into the stacked PR to stay under the ~600 guard.
  • useCredits reads once on setup by default (immediate: false to opt out).
  • useTopUp does not gate submit on the cached canTopUp; the core re-reads capabilities itself, and the cached value exists to disable the CTA.

Stack (2026-09-14)

Merge top-down. After a parent is squash-merged, rebase each child with git rebase --onto origin/main <parent tip> and force-push; GitHub retargets the base. Solid edges are code dependencies, dashed edges are sequencing.

flowchart TD
  P12["Phase 1 + 2 merged<br/>#17436 · #17442"] --> C["FE-2227 Phase 3 core<br/>#17655 · base main"]
  C --> P0["PR 0 coded error bodies + 3DS driver<br/>#17656"]
  P0 --> A["FE-2214 top-up command<br/>#17657"]
  P0 --> B1["FE-2223 B1 subscription commands<br/>#17658"]
  B1 --> B2["FE-2223 B2 eight-state projection<br/>#17659"]
  A --> I["Integration, do not merge<br/>#17660"]
  B2 --> I
  I --> V1["FE-2215 @comfyorg/account-ui composables<br/>#17662"]
  V1 --> V2["FE-2215 CheckoutSteps<br/>#17663"]
  I --> SES["core: narrowed BillingSession type<br/>#17664"]
  SES --> AD1["FE-2216 slice 1 top-up behind a flag<br/>#17665"]
  AD1 -.-> AD2["FE-2216 slice 2 subscription<br/>needs previewSubscribe + plan-change decision"]
  AD1 --> E["FE-2217 Phase 6 evidence"]
  S["FE-2211 salvage tag d059104ac3<br/>before 2026-09-30"] -.-> E
  BW["billing-web #17370 → #17574"] --> H["FE-2218 Phase 7 separate origin"]
  AD1 --> H
  V2 -.-> H
  AD1 -.-> SPLIT["account-core / account-ui rename PR"]
  SPLIT -.-> H
Loading

@coderabbitai

coderabbitai Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 3a38a1a8-7fbc-44ae-9257-0837df40c190

📥 Commits

Reviewing files that changed from the base of the PR and between e327424 and 77aaa2d.

📒 Files selected for processing (3)
  • packages/account-ui/src/billing/__fixtures__/billingHarness.ts
  • packages/account-ui/src/billing/billingClient.test.ts
  • packages/account-ui/src/billing/billingClient.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 4 remain after this review.


📝 Walkthrough

Walkthrough

The pull request adds the @comfyorg/account-ui package. It provides Vue billing composables for credits, top-ups, checkout, lifecycle operations, navigation, and client disposal. Repository workflows now lint, type-check, test, cover, scan, and validate the package.

Changes

Account UI billing

Layer / File(s) Summary
Package and tooling integration
.github/workflows/*, package.json, packages/account-ui/package.json, packages/account-ui/tsconfig.json, packages/account-ui/vitest.config.ts, eslint.config.ts, knip.config.ts
Adds the package manifest and test configuration. Repository linting, type-checking, coverage, Knip scanning, and license validation now include account-ui.
Billing client and lifecycle access
packages/account-ui/src/billing/billingClient.ts, packages/account-ui/src/billing/useBillingOperation.ts, packages/account-ui/src/billing/__fixtures__/*, packages/account-ui/src/billing/*test.ts
Adds client injection and disposal, lifecycle operation selection, deterministic billing fixtures, and tests for scoped lifecycle behavior.
Payment attempt state and navigation
packages/account-ui/src/billing/usePaymentAttempt.ts
Adds shared payment-attempt state with hosted URL navigation, embedded challenge handling, cancellation, reset, and continuation controls.
Credits, top-up, checkout, and public exports
packages/account-ui/src/billing/useCredits.ts, packages/account-ui/src/billing/useTopUp.ts, packages/account-ui/src/billing/useCheckout.ts, packages/account-ui/src/billing/index.ts, packages/account-ui/src/billing/*test.ts
Adds credits refresh state, top-up validation and capability handling, subscription checkout and retry behavior, payment portal navigation, test coverage, and the public billing API barrel.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Host
  participant useTopUp
  participant BillingCommands
  participant BillingLifecycle
  participant PaymentNavigation
  Host->>useTopUp: submit(amount)
  useTopUp->>BillingCommands: create top-up checkout
  BillingCommands->>BillingLifecycle: publish operation state
  BillingLifecycle-->>useTopUp: return pending or settled state
  useTopUp->>PaymentNavigation: open hosted URL or submit challenge
Loading

Suggested reviewers: anupreet-comfy

Merge Risk: ⚪ Minimal · up to 77aaa

No actionable current-head issue remains from the finalized findings.

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the new account-ui billing package and its headless top-up functionality. It is concise and directly related to the main changes.
Description check ✅ Passed The description provides the change rationale, implementation details, testing scope, review focus, dependencies, sequencing, and screenshot applicability. It does not use the template headings exactl…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
End-To-End Regression Coverage For Fixes ✅ Passed The PR contains a bug-fix signal in the commit subject fix(account-ui): carry the status reader so disposal covers it and changes packages/account-ui without changing browser_tests/. However, th…
Website End-To-End Regression Coverage ✅ Passed No files under apps/website/src/ or apps/website/public/ changed. The listed changes are confined to packages/account-ui, repository tooling, CI, and package configuration. This check is therefo…
Adr Compliance For Entity/Litegraph Changes ✅ Passed The changed files are limited to the new @comfyorg/account-ui billing package and repository configuration. No files under src/lib/litegraph/ or src/ecs/ changed, and no files related to graph e…
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jaewon/fe-2215-phase-4-new-view-package-for-billing-composables-and

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

@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/15/2026, 06:40:57 PM UTC

Links

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🎭 Playwright: ❌ 2016 passed, 1 failed

❌ Failed Tests

📊 Browser Reports
  • chromium: View Report (✅ 1995 / ❌ 1 / ⚠️ 0 / ⏭️ 13)
  • 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)

📦 Bundle: 10 MB gzip 🔴 +136 B

Details

Summary

  • Raw size: 42.5 MB baseline 42.5 MB — 🟢 -74 B
  • Gzip: 10 MB baseline 10 MB — 🔴 +136 B
  • Brotli: 7.06 MB baseline 7.06 MB — 🟢 -2 B
  • Bundles: 451 current • 451 baseline • 151 added / 151 removed

Category Glance
Other 🟢 -74 B (17.5 MB) · Vendor & Third-Party ⚪ 0 B (18.2 MB) · Data & Services ⚪ 0 B (3.73 MB) · Graph Workspace ⚪ 0 B (1.44 MB) · Panels & Settings ⚪ 0 B (622 kB) · Utilities & Hooks ⚪ 0 B (560 kB) · + 5 more

App Entry Points — 3.73 kB (baseline 3.73 kB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-B6Rdg0iy.js (new) — 3.73 kB 🔴 +3.73 kB 🔴 +1.87 kB 🔴 +1.61 kB
assets/index-ByVGIdsN.js (removed) 3.73 kB — 🟢 -3.73 kB 🟢 -1.87 kB 🟢 -1.64 kB

Status: 1 added / 1 removed

Graph Workspace — 1.44 MB (baseline 1.44 MB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-4qtw3LQh.js (new) — 1.43 MB 🔴 +1.43 MB 🔴 +314 kB 🔴 +235 kB
assets/GraphView-BM_baVXy.js (removed) 1.43 MB — 🟢 -1.43 MB 🟢 -314 kB 🟢 -235 kB
assets/WidgetCompositor-B1ULs5Zf.js (removed) 8.5 kB — 🟢 -8.5 kB 🟢 -2.8 kB 🟢 -2.48 kB
assets/WidgetCompositor-CwmmmnTS.js (new) — 8.5 kB 🔴 +8.5 kB 🔴 +2.8 kB 🔴 +2.48 kB

Status: 2 added / 2 removed / 1 unchanged

Views & Navigation — 132 kB (baseline 132 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/CloudSurveyView-BLr1iRug.js (removed) 25 kB — 🟢 -25 kB 🟢 -6.25 kB 🟢 -5.52 kB
assets/CloudSurveyView-D3e9IyBk.js (new) — 25 kB 🔴 +25 kB 🔴 +6.25 kB 🔴 +5.52 kB
assets/CloudLayoutView-C3tgNqdW.js (new) — 21.7 kB 🔴 +21.7 kB 🔴 +6.56 kB 🔴 +5.73 kB
assets/CloudLayoutView-DR_lvDx3.js (removed) 21.7 kB — 🟢 -21.7 kB 🟢 -6.55 kB 🟢 -5.73 kB
assets/useCloudAuthPage-B3zciY9E.js (removed) 11.1 kB — 🟢 -11.1 kB 🟢 -4.2 kB 🟢 -3.55 kB
assets/useCloudAuthPage-eDBuOQlb.js (new) — 11.1 kB 🔴 +11.1 kB 🔴 +4.2 kB 🔴 +3.56 kB
assets/CloudLoginView-C-ev6ANA.js (removed) 8.74 kB — 🟢 -8.74 kB 🟢 -2.55 kB 🟢 -2.25 kB
assets/CloudLoginView-hNeAsobh.js (new) — 8.74 kB 🔴 +8.74 kB 🔴 +2.56 kB 🔴 +2.26 kB
assets/UserCheckView-Dq89WWlY.js (new) — 8.51 kB 🔴 +8.51 kB 🔴 +2.13 kB 🔴 +1.86 kB
assets/UserCheckView-ea65UBkj.js (removed) 8.51 kB — 🟢 -8.51 kB 🟢 -2.13 kB 🟢 -1.86 kB
assets/CloudSignupView-_quO5A3V.js (removed) 7 kB — 🟢 -7 kB 🟢 -2.29 kB 🟢 -2.01 kB
assets/CloudSignupView-cbJT2q0u.js (new) — 7 kB 🔴 +7 kB 🔴 +2.3 kB 🔴 +2.01 kB
assets/WidgetTextPreview-CnDJ1nB3.js (new) — 6.06 kB 🔴 +6.06 kB 🔴 +2.13 kB 🔴 +1.9 kB
assets/WidgetTextPreview-DGT6IGVe.js (removed) 6.06 kB — 🟢 -6.06 kB 🟢 -2.12 kB 🟢 -1.89 kB
assets/CloudSubscriptionRedirectView-CQ8p1bYa.js (new) — 5.69 kB 🔴 +5.69 kB 🔴 +1.94 kB 🔴 +1.7 kB
assets/CloudSubscriptionRedirectView-DLSSGhu6.js (removed) 5.69 kB — 🟢 -5.69 kB 🟢 -1.93 kB 🟢 -1.7 kB
assets/UserSelectView-Cfe2wb3k.js (new) — 5.63 kB 🔴 +5.63 kB 🔴 +2 kB 🔴 +1.75 kB
assets/UserSelectView-nx3fvDeS.js (removed) 5.63 kB — 🟢 -5.63 kB 🟢 -2 kB 🟢 -1.75 kB
assets/CloudForgotPasswordView-CvSL5RSk.js (removed) 5 kB — 🟢 -5 kB 🟢 -1.72 kB 🟢 -1.5 kB
assets/CloudForgotPasswordView-DV1h469E.js (new) — 5 kB 🔴 +5 kB 🔴 +1.72 kB 🔴 +1.5 kB
assets/CloudAuthTimeoutView-CU_c85EQ.js (new) — 4.43 kB 🔴 +4.43 kB 🔴 +1.54 kB 🔴 +1.33 kB
assets/CloudAuthTimeoutView-vplMOt7o.js (removed) 4.43 kB — 🟢 -4.43 kB 🟢 -1.54 kB 🟢 -1.34 kB
assets/WidgetResolutionPreview-C_iqzzUa.js (removed) 3.78 kB — 🟢 -3.78 kB 🟢 -1.49 kB 🟢 -1.33 kB
assets/WidgetResolutionPreview-DEJm94oC.js (new) — 3.78 kB 🔴 +3.78 kB 🔴 +1.49 kB 🔴 +1.33 kB
assets/OAuthLayoutView-cLcFq5m8.js (removed) 1.32 kB — 🟢 -1.32 kB 🟢 -706 B 🟢 -595 B
assets/OAuthLayoutView-CNdxxNI7.js (new) — 1.32 kB 🔴 +1.32 kB 🔴 +706 B 🔴 +596 B
assets/WidgetTextPreview-D4Nz7X4C.js (removed) 131 B — 🟢 -131 B 🟢 -100 B 🟢 -88 B
assets/WidgetTextPreview-eF7B8coF.js (new) — 131 B 🔴 +131 B 🔴 +100 B 🔴 +89 B

Status: 14 added / 14 removed / 4 unchanged

Panels & Settings — 622 kB (baseline 622 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/KeybindingPanel-pNZwUQpA.js (new) — 49.4 kB 🔴 +49.4 kB 🔴 +9.95 kB 🔴 +8.8 kB
assets/KeybindingPanel-Q90fi06_.js (removed) 49.4 kB — 🟢 -49.4 kB 🟢 -9.95 kB 🟢 -8.8 kB
assets/CreditsPanel-BkN-imc9.js (new) — 38 kB 🔴 +38 kB 🔴 +9.12 kB 🔴 +7.99 kB
assets/CreditsPanel-Bzr0FxDh.js (removed) 38 kB — 🟢 -38 kB 🟢 -9.12 kB 🟢 -7.99 kB
assets/SecretsPanel-CBypCEF_.js (new) — 33.8 kB 🔴 +33.8 kB 🔴 +7.9 kB 🔴 +6.93 kB
assets/SecretsPanel-Fi0_HDif.js (removed) 33.8 kB — 🟢 -33.8 kB 🟢 -7.9 kB 🟢 -6.93 kB
assets/AboutPanel-BP7d7a7e.js (removed) 11.4 kB — 🟢 -11.4 kB 🟢 -3.14 kB 🟢 -2.82 kB
assets/AboutPanel-C0D1q2hv.js (new) — 11.4 kB 🔴 +11.4 kB 🔴 +3.14 kB 🔴 +2.8 kB
assets/ExtensionPanel-BLMOcNJf.js (new) — 9.19 kB 🔴 +9.19 kB 🔴 +2.52 kB 🔴 +2.23 kB
assets/ExtensionPanel-DbbGhLKu.js (removed) 9.19 kB — 🟢 -9.19 kB 🟢 -2.52 kB 🟢 -2.23 kB
assets/ServerConfigPanel-B3__BbHL.js (removed) 6.15 kB — 🟢 -6.15 kB 🟢 -1.96 kB 🟢 -1.74 kB
assets/ServerConfigPanel-BH-YoRCK.js (new) — 6.15 kB 🔴 +6.15 kB 🔴 +1.96 kB 🔴 +1.74 kB
assets/UserPanel-DexqqE_K.js (new) — 5.76 kB 🔴 +5.76 kB 🔴 +1.8 kB 🔴 +1.55 kB
assets/UserPanel-uSihDIIh.js (removed) 5.76 kB — 🟢 -5.76 kB 🟢 -1.8 kB 🟢 -1.55 kB
assets/refreshRemoteConfig-CmVeO8Ph.js (new) — 4.54 kB 🔴 +4.54 kB 🔴 +1.6 kB 🔴 +1.43 kB
assets/refreshRemoteConfig-ZuCE083y.js (removed) 4.54 kB — 🟢 -4.54 kB 🟢 -1.61 kB 🟢 -1.43 kB
assets/CreditsPanel-BNAm1BnL.js (new) — 116 B 🔴 +116 B 🔴 +95 B 🔴 +83 B
assets/CreditsPanel-Do2wGRvR.js (removed) 116 B — 🟢 -116 B 🟢 -95 B 🟢 -86 B
assets/refreshRemoteConfig-B4Xed7b7.js (removed) 110 B — 🟢 -110 B 🟢 -89 B 🟢 -92 B
assets/refreshRemoteConfig-cqjPNiNl.js (new) — 110 B 🔴 +110 B 🔴 +89 B 🔴 +92 B

Status: 10 added / 10 removed / 17 unchanged

User & Accounts — 26.2 kB (baseline 26.2 kB) • ⚪ 0 B

Authentication, profile, and account management bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SignUpForm-B7doBRxa.js (removed) 11.3 kB — 🟢 -11.3 kB 🟢 -3.98 kB 🟢 -3.46 kB
assets/SignUpForm-DMrIh3L2.js (new) — 11.3 kB 🔴 +11.3 kB 🔴 +3.98 kB 🔴 +3.46 kB
assets/auth-_4Me41-Q.js (removed) 3.48 kB — 🟢 -3.48 kB 🟢 -1.21 kB 🟢 -1.01 kB
assets/auth-BRoO4NPg.js (new) — 3.48 kB 🔴 +3.48 kB 🔴 +1.21 kB 🔴 +1.01 kB
assets/UpdatePasswordContent-CMGRnGt3.js (removed) 1.85 kB — 🟢 -1.85 kB 🟢 -842 B 🟢 -734 B
assets/UpdatePasswordContent-T4BgSnaz.js (new) — 1.85 kB 🔴 +1.85 kB 🔴 +844 B 🔴 +736 B
assets/authStore-CBofvP8J.js (removed) 126 B — 🟢 -126 B 🟢 -106 B 🟢 -101 B
assets/authStore-vt48lyDq.js (new) — 126 B 🔴 +126 B 🔴 +106 B 🔴 +102 B
assets/workspaceAuthStore-C5p1dyaq.js (new) — 108 B 🔴 +108 B 🔴 +99 B 🔴 +106 B
assets/workspaceAuthStore-vCDiJqMY.js (removed) 108 B — 🟢 -108 B 🟢 -99 B 🟢 -100 B
assets/auth-DRCBoiJT.js (new) — 105 B 🔴 +105 B 🔴 +96 B 🔴 +89 B
assets/auth-Dx4v71bp.js (removed) 105 B — 🟢 -105 B 🟢 -96 B 🟢 -79 B

Status: 6 added / 6 removed / 5 unchanged

Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 B

Modals, dialogs, drawers, and in-app editors

File Before After Δ Raw Δ Gzip Δ Brotli
assets/ComfyHubPublishDialog-2ib41Kiq.js (new) — 90.8 kB 🔴 +90.8 kB 🔴 +19.3 kB 🔴 +16.6 kB
assets/ComfyHubPublishDialog-Bw83Cpxm.js (removed) 90.8 kB — 🟢 -90.8 kB 🟢 -19.3 kB 🟢 -16.5 kB
assets/useShareDialog-52R_TyMJ.js (removed) 23.9 kB — 🟢 -23.9 kB 🟢 -5.74 kB 🟢 -5.07 kB
assets/useShareDialog-CjTfBJyD.js (new) — 23.9 kB 🔴 +23.9 kB 🔴 +5.74 kB 🔴 +5.08 kB
assets/feedbackDialog-DBw989du.js (new) — 4.45 kB 🔴 +4.45 kB 🔴 +1.87 kB 🔴 +1.59 kB
assets/feedbackDialog-DUyvIe5m.js (removed) 4.45 kB — 🟢 -4.45 kB 🟢 -1.86 kB 🟢 -1.59 kB
assets/useRangeEditor-CkCK9r4k.js (new) — 3.29 kB 🔴 +3.29 kB 🔴 +1.14 kB 🔴 +1.04 kB
assets/useRangeEditor-DwYwMgBc.js (removed) 3.29 kB — 🟢 -3.29 kB 🟢 -1.14 kB 🟢 -1.03 kB
assets/useLayerEditor-Cu8M-PZP.js (new) — 1.19 kB 🔴 +1.19 kB 🔴 +564 B 🔴 +487 B
assets/useLayerEditor-IzVnqwtL.js (removed) 1.19 kB — 🟢 -1.19 kB 🟢 -563 B 🟢 -494 B
assets/ComfyHubPublishDialog-B7A_33BL.js (removed) 143 B — 🟢 -143 B 🟢 -105 B 🟢 -93 B
assets/ComfyHubPublishDialog-BNSq4C18.js (new) — 143 B 🔴 +143 B 🔴 +105 B 🔴 +87 B
assets/useSubscriptionDialog-DyoygtNB.js (removed) 107 B — 🟢 -107 B 🟢 -101 B 🟢 -88 B
assets/useSubscriptionDialog-qUYpHdEc.js (new) — 107 B 🔴 +107 B 🔴 +101 B 🔴 +92 B

Status: 7 added / 7 removed / 1 unchanged

UI Components — 123 kB (baseline 123 kB) • ⚪ 0 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/useMoreOptionsMenu-CgUIO6jW.js (removed) 47.8 kB — 🟢 -47.8 kB 🟢 -11.5 kB 🟢 -9.97 kB
assets/useMoreOptionsMenu-CNYuc-Bu.js (new) — 47.8 kB 🔴 +47.8 kB 🔴 +11.5 kB 🔴 +9.97 kB
assets/ComfyQueueButton-BfeodXRN.js (new) — 14.6 kB 🔴 +14.6 kB 🔴 +3.98 kB 🔴 +3.53 kB
assets/ComfyQueueButton-FjqIuO0u.js (removed) 14.6 kB — 🟢 -14.6 kB 🟢 -3.98 kB 🟢 -3.53 kB
assets/useTerminalTabs-C5RcGoIv.js (new) — 11.8 kB 🔴 +11.8 kB 🔴 +3.71 kB 🔴 +3.29 kB
assets/useTerminalTabs-DUbqrIcY.js (removed) 11.8 kB — 🟢 -11.8 kB 🟢 -3.71 kB 🟢 -3.28 kB
assets/InviteMembersForm-Ba4Ds0QV.js (removed) 10.2 kB — 🟢 -10.2 kB 🟢 -3.1 kB 🟢 -2.76 kB
assets/InviteMembersForm-BeYFFbhA.js (new) — 10.2 kB 🔴 +10.2 kB 🔴 +3.1 kB 🔴 +2.76 kB
assets/SubscribeButton-D2EsSHTi.js (removed) 2.15 kB — 🟢 -2.15 kB 🟢 -969 B 🟢 -847 B
assets/SubscribeButton-T8mEUdRL.js (new) — 2.15 kB 🔴 +2.15 kB 🔴 +970 B 🔴 +847 B
assets/cloudFeedbackTopbarButton-CMBQ0hEe.js (removed) 701 B — 🟢 -701 B 🟢 -418 B 🟢 -380 B
assets/cloudFeedbackTopbarButton-D7K-i529.js (new) — 701 B 🔴 +701 B 🔴 +421 B 🔴 +371 B
assets/ComfyQueueButton-CWgYXKbc.js (new) — 128 B 🔴 +128 B 🔴 +99 B 🔴 +92 B
assets/ComfyQueueButton-DbdQkcGf.js (removed) 128 B — 🟢 -128 B 🟢 -99 B 🟢 -96 B

Status: 7 added / 7 removed / 9 unchanged

Data & Services — 3.73 MB (baseline 3.73 MB) • ⚪ 0 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/settingStore-Cz9FqPuY.js (new) — 3.4 MB 🔴 +3.4 MB 🔴 +807 kB 🔴 +609 kB
assets/settingStore-Jup5crec.js (removed) 3.4 MB — 🟢 -3.4 MB 🟢 -807 kB 🟢 -609 kB
assets/api-C78joR58.js (new) — 179 kB 🔴 +179 kB 🔴 +41.1 kB 🔴 +34.7 kB
assets/api-X_PRwD7z.js (removed) 179 kB — 🟢 -179 kB 🟢 -41.1 kB 🟢 -34.7 kB
assets/load3dService-4FAo2OIt.js (new) — 86.9 kB 🔴 +86.9 kB 🔴 +20.3 kB 🔴 +17.5 kB
assets/load3dService-BM7fvvLR.js (removed) 86.9 kB — 🟢 -86.9 kB 🟢 -20.3 kB 🟢 -17.5 kB
assets/releaseStore-CSRKtix_.js (new) — 23.8 kB 🔴 +23.8 kB 🔴 +7.07 kB 🔴 +6.21 kB
assets/releaseStore-DeZkrw5b.js (removed) 23.8 kB — 🟢 -23.8 kB 🟢 -7.07 kB 🟢 -6.21 kB
assets/workflowShareService-2KnoUItY.js (removed) 17 kB — 🟢 -17 kB 🟢 -5.06 kB 🟢 -4.47 kB
assets/workflowShareService-Bkd3XtuP.js (new) — 17 kB 🔴 +17 kB 🔴 +5.06 kB 🔴 +4.46 kB
assets/keybindingService-Bjzc7-Bq.js (removed) 6.95 kB — 🟢 -6.95 kB 🟢 -1.74 kB 🟢 -1.52 kB
assets/keybindingService-CtJ1s8yK.js (new) — 6.95 kB 🔴 +6.95 kB 🔴 +1.74 kB 🔴 +1.51 kB
assets/userStore-Byz5ks2r.js (removed) 2.38 kB — 🟢 -2.38 kB 🟢 -900 B 🟢 -794 B
assets/userStore-Ck89kNBS.js (new) — 2.38 kB 🔴 +2.38 kB 🔴 +899 B 🔴 +794 B
assets/audioService-B9L_mR6E.js (removed) 1.71 kB — 🟢 -1.71 kB 🟢 -831 B 🟢 -727 B
assets/audioService-JorHvoni.js (new) — 1.71 kB 🔴 +1.71 kB 🔴 +831 B 🔴 +732 B
assets/dialogService-Brb0Z0Hf.js (new) — 97 B 🔴 +97 B 🔴 +96 B 🔴 +87 B
assets/dialogService-C3zxpdMF.js (removed) 97 B — 🟢 -97 B 🟢 -96 B 🟢 -80 B
assets/releaseStore-BM2g7Emi.js (removed) 95 B — 🟢 -95 B 🟢 -86 B 🟢 -83 B
assets/releaseStore-Dm64pO9_.js (new) — 95 B 🔴 +95 B 🔴 +86 B 🔴 +85 B
assets/settingStore-DlelMeiy.js (new) — 95 B 🔴 +95 B 🔴 +86 B 🔴 +83 B
assets/settingStore-MBu0MKak.js (removed) 95 B — 🟢 -95 B 🟢 -86 B 🟢 -81 B
assets/assetsStore-BS_z7UF_.js (new) — 94 B 🔴 +94 B 🔴 +92 B 🔴 +85 B
assets/assetsStore-CjZOH34Q.js (removed) 94 B — 🟢 -94 B 🟢 -92 B 🟢 -80 B
assets/api-CVWoUkN5.js (new) — 62 B 🔴 +62 B 🔴 +74 B 🔴 +66 B
assets/api-DLD46bYE.js (removed) 62 B — 🟢 -62 B 🟢 -74 B 🟢 -66 B

Status: 13 added / 13 removed / 3 unchanged

Utilities & Hooks — 560 kB (baseline 560 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/useConflictDetection-Bm3hFuKA.js (removed) 235 kB — 🟢 -235 kB 🟢 -53 kB 🟢 -43.2 kB
assets/useConflictDetection-CYtWuMS5.js (new) — 235 kB 🔴 +235 kB 🔴 +53 kB 🔴 +43.2 kB
assets/useLayerEditorSession-CKUpgvYX.js (new) — 159 kB 🔴 +159 kB 🔴 +41 kB 🔴 +34.5 kB
assets/useLayerEditorSession-CVRDj9EJ.js (removed) 159 kB — 🟢 -159 kB 🟢 -41 kB 🟢 -34.5 kB
assets/useLoad3d-BH6-o4n5.js (new) — 26.3 kB 🔴 +26.3 kB 🔴 +5.95 kB 🔴 +5.27 kB
assets/useLoad3d-Bn7N99Is.js (removed) 26.3 kB — 🟢 -26.3 kB 🟢 -5.95 kB 🟢 -5.26 kB
assets/useLoad3dViewer-DvPzNrQ9.js (new) — 21.9 kB 🔴 +21.9 kB 🔴 +5.25 kB 🔴 +4.59 kB
assets/useLoad3dViewer-ZcjrHV2I.js (removed) 21.9 kB — 🟢 -21.9 kB 🟢 -5.25 kB 🟢 -4.59 kB
assets/useImageCrop-B2xLRG7P.js (removed) 15.3 kB — 🟢 -15.3 kB 🟢 -3.53 kB 🟢 -3.08 kB
assets/useImageCrop-BDsgZcP9.js (new) — 15.3 kB 🔴 +15.3 kB 🔴 +3.54 kB 🔴 +3.08 kB
assets/useDowngradeToPersonal-DPhZUJW_.js (new) — 11 kB 🔴 +11 kB 🔴 +2.78 kB 🔴 +2.39 kB
assets/useDowngradeToPersonal-kDIGUH0Q.js (removed) 11 kB — 🟢 -11 kB 🟢 -2.78 kB 🟢 -2.38 kB
assets/useFeatureFlags-9GqLe4Mi.js (new) — 8.27 kB 🔴 +8.27 kB 🔴 +2.26 kB 🔴 +1.92 kB
assets/useFeatureFlags-DnW5oXRH.js (removed) 8.27 kB — 🟢 -8.27 kB 🟢 -2.25 kB 🟢 -1.92 kB
assets/useExternalLink-B7VY3Txj.js (new) — 7.57 kB 🔴 +7.57 kB 🔴 +2.55 kB 🔴 +2.18 kB
assets/useExternalLink-mVnz57UW.js (removed) 7.57 kB — 🟢 -7.57 kB 🟢 -2.55 kB 🟢 -2.17 kB
assets/usePricingTableUrlLoader-CAOwYoqx.js (removed) 4.81 kB — 🟢 -4.81 kB 🟢 -1.65 kB 🟢 -1.41 kB
assets/usePricingTableUrlLoader-DDiFoZC6.js (new) — 4.81 kB 🔴 +4.81 kB 🔴 +1.66 kB 🔴 +1.41 kB
assets/useCompositorLayers-C6wnOyHH.js (new) — 2.93 kB 🔴 +2.93 kB 🔴 +860 B 🔴 +776 B
assets/useCompositorLayers-e0_iWZ6N.js (removed) 2.93 kB — 🟢 -2.93 kB 🟢 -856 B 🟢 -773 B
assets/useScheduledPlanChange-BEMa_Ntz.js (removed) 2.4 kB — 🟢 -2.4 kB 🟢 -961 B 🟢 -838 B
assets/useScheduledPlanChange-Dih_3izw.js (new) — 2.4 kB 🔴 +2.4 kB 🔴 +964 B 🔴 +839 B
assets/useUpstreamValue-C8CZU9vt.js (removed) 1.97 kB — 🟢 -1.97 kB 🟢 -750 B 🟢 -665 B
assets/useUpstreamValue-V1QerSVu.js (new) — 1.97 kB 🔴 +1.97 kB 🔴 +753 B 🔴 +664 B
assets/useWorkspaceTierLabel-9ntyKMps.js (removed) 1.97 kB — 🟢 -1.97 kB 🟢 -842 B 🟢 -712 B
assets/useWorkspaceTierLabel-JUDI-kjw.js (new) — 1.97 kB 🔴 +1.97 kB 🔴 +845 B 🔴 +712 B
assets/useSessionCookie-Cx8YqzSs.js (new) — 688 B 🔴 +688 B 🔴 +354 B 🔴 +307 B
assets/useSessionCookie-DaKVY9br.js (removed) 688 B — 🟢 -688 B 🟢 -354 B 🟢 -307 B
assets/useLoad3d-B5BsqviP.js (removed) 311 B — 🟢 -311 B 🟢 -165 B 🟢 -150 B
assets/useLoad3d-kTAJkI77.js (new) — 311 B 🔴 +311 B 🔴 +164 B 🔴 +147 B
assets/useSessionCookie-BgTHw_o3.js (removed) 101 B — 🟢 -101 B 🟢 -86 B 🟢 -84 B
assets/useSessionCookie-CdoVmJiz.js (new) — 101 B 🔴 +101 B 🔴 +86 B 🔴 +85 B
assets/useFeatureFlags-DF3kThP2.js (new) — 98 B 🔴 +98 B 🔴 +85 B 🔴 +80 B
assets/useFeatureFlags-UrukWSJr.js (removed) 98 B — 🟢 -98 B 🟢 -85 B 🟢 -80 B
assets/useLoad3dViewer-CzeWNKRR.js (new) — 98 B 🔴 +98 B 🔴 +85 B 🔴 +83 B
assets/useLoad3dViewer-v1Guijsy.js (removed) 98 B — 🟢 -98 B 🟢 -85 B 🟢 -87 B
assets/useCurrentUser-DlIzsxi-.js (new) — 93 B 🔴 +93 B 🔴 +94 B 🔴 +79 B
assets/useCurrentUser-DPGC76np.js (removed) 93 B — 🟢 -93 B 🟢 -94 B 🟢 -78 B

Status: 19 added / 19 removed / 18 unchanged

Vendor & Third-Party — 18.2 MB (baseline 18.2 MB) • ⚪ 0 B

External libraries and shared vendor chunks

Status: 18 unchanged

Other — 17.5 MB (baseline 17.5 MB) • 🟢 -74 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/core-Cl_32eXC.js (removed) 118 kB — 🟢 -118 kB 🟢 -30.9 kB 🟢 -26.1 kB
assets/core-k8f08qwn.js (new) — 118 kB 🔴 +118 kB 🔴 +30.9 kB 🔴 +26.1 kB
assets/WorkspaceSettingsPanelContent-D8rKeD_f.js (removed) 110 kB — 🟢 -110 kB 🟢 -21.7 kB 🟢 -18.1 kB
assets/WorkspaceSettingsPanelContent-DSPeloVC.js (new) — 110 kB 🔴 +110 kB 🔴 +21.7 kB 🔴 +18.1 kB
assets/SubscriptionTransitionPreviewWorkspace-BN6Vevq_.js (removed) 103 kB — 🟢 -103 kB 🟢 -20.1 kB 🟢 -17 kB
assets/SubscriptionTransitionPreviewWorkspace-CPxb7pyy.js (new) — 103 kB 🔴 +103 kB 🔴 +20 kB 🔴 +17 kB
assets/WidgetSelect-BeIXYOK3.js (removed) 88.6 kB — 🟢 -88.6 kB 🟢 -20.1 kB 🟢 -17.1 kB
assets/WidgetSelect-Bsyh1Gv2.js (new) — 88.5 kB 🔴 +88.5 kB 🔴 +20 kB 🔴 +17.1 kB
assets/Load3D-DgQKfuvr.js (removed) 82.4 kB — 🟢 -82.4 kB 🟢 -13.6 kB 🟢 -11.4 kB
assets/Load3D-sEScqtpg.js (new) — 82.4 kB 🔴 +82.4 kB 🔴 +13.6 kB 🔴 +11.4 kB
assets/WidgetVideoEdit-D-agY9C0.js (new) — 73.2 kB 🔴 +73.2 kB 🔴 +17.4 kB 🔴 +15.2 kB
assets/WidgetVideoEdit-FFZcvyTB.js (removed) 73.2 kB — 🟢 -73.2 kB 🟢 -17.4 kB 🟢 -15.2 kB
assets/CameraInfo-CglrDBLf.js (removed) 67 kB — 🟢 -67 kB 🟢 -14.5 kB 🟢 -12.7 kB
assets/CameraInfo-D-A_dnD0.js (new) — 67 kB 🔴 +67 kB 🔴 +14.5 kB 🔴 +12.7 kB
assets/Preview3d-Bu8ht_yf.js (new) — 52.6 kB 🔴 +52.6 kB 🔴 +8.6 kB 🔴 +7.5 kB
assets/Preview3d-kSVCpguC.js (removed) 52.6 kB — 🟢 -52.6 kB 🟢 -8.59 kB 🟢 -7.5 kB
assets/SubscriptionRequiredDialogContentUnified-CTTsHx3s.js (removed) 52.4 kB — 🟢 -52.4 kB 🟢 -11 kB 🟢 -9.63 kB
assets/SubscriptionRequiredDialogContentUnified-Cu4xYET0.js (new) — 52.4 kB 🔴 +52.4 kB 🔴 +11 kB 🔴 +9.67 kB
assets/Viewport3d-BxlJ8Tfy.js (new) — 48 kB 🔴 +48 kB 🔴 +10.2 kB 🔴 +9.02 kB
assets/Viewport3d-C00e1Y6J.js (removed) 48 kB — 🟢 -48 kB 🟢 -10.2 kB 🟢 -9.01 kB
assets/LayerEditorContent-cY7JK_c-.js (removed) 45.4 kB — 🟢 -45.4 kB 🟢 -10.6 kB 🟢 -9.26 kB
assets/LayerEditorContent-DCk02AUu.js (new) — 45.4 kB 🔴 +45.4 kB 🔴 +10.6 kB 🔴 +9.27 kB
assets/main-5ZyR6x36.js (new) — 44 kB 🔴 +44 kB 🔴 +13.2 kB 🔴 +11.4 kB
assets/main-BytciQQd.js (removed) 44 kB — 🟢 -44 kB 🟢 -13.2 kB 🟢 -11.4 kB
assets/WidgetBoundingBoxes-BExNBkpK.js (new) — 33.8 kB 🔴 +33.8 kB 🔴 +9.18 kB 🔴 +8.13 kB
assets/WidgetBoundingBoxes-CUeNzO8Y.js (removed) 33.8 kB — 🟢 -33.8 kB 🟢 -9.17 kB 🟢 -8.13 kB
assets/WidgetPainter-CNCXmmm2.js (removed) 32.1 kB — 🟢 -32.1 kB 🟢 -7.89 kB 🟢 -6.96 kB
assets/WidgetPainter-xnp53VL4.js (new) — 32.1 kB 🔴 +32.1 kB 🔴 +7.89 kB 🔴 +6.97 kB
assets/Load3dViewerContent-C8OABLGU.js (removed) 30.6 kB — 🟢 -30.6 kB 🟢 -6.21 kB 🟢 -5.37 kB
assets/Load3dViewerContent-P9ztH7ll.js (new) — 30.6 kB 🔴 +30.6 kB 🔴 +6.21 kB 🔴 +5.37 kB
assets/SubscriptionRequiredDialogContent-BtJmCA-2.js (new) — 27.1 kB 🔴 +27.1 kB 🔴 +6.4 kB 🔴 +5.64 kB
assets/SubscriptionRequiredDialogContent-DM7yz_UC.js (removed) 27.1 kB — 🟢 -27.1 kB 🟢 -6.4 kB 🟢 -5.64 kB
assets/SubscriptionRequiredDialogContentWorkspace-Bq3D4YRM.js (removed) 26.5 kB — 🟢 -26.5 kB 🟢 -6.08 kB 🟢 -5.37 kB
assets/SubscriptionRequiredDialogContentWorkspace-BQQZYVz-.js (new) — 26.5 kB 🔴 +26.5 kB 🔴 +6.09 kB 🔴 +5.37 kB
assets/load3d-BDOjNXT-.js (removed) 22.2 kB — 🟢 -22.2 kB 🟢 -5.42 kB 🟢 -4.69 kB
assets/load3d-BqIhtAqh.js (new) — 22.2 kB 🔴 +22.2 kB 🔴 +5.42 kB 🔴 +4.69 kB
assets/SignInContent-CeDrs0xN.js (removed) 20.7 kB — 🟢 -20.7 kB 🟢 -5.23 kB 🟢 -4.58 kB
assets/SignInContent-D7VW3jdo.js (new) — 20.7 kB 🔴 +20.7 kB 🔴 +5.24 kB 🔴 +4.58 kB
assets/CurrentUserPopoverWorkspace-BrC1ziFM.js (new) — 18.1 kB 🔴 +18.1 kB 🔴 +4.19 kB 🔴 +3.71 kB
assets/CurrentUserPopoverWorkspace-CKPXi75z.js (removed) 18.1 kB — 🟢 -18.1 kB 🟢 -4.19 kB 🟢 -3.72 kB
assets/WidgetRecordAudio-B1YIQ2Ww.js (removed) 16.5 kB — 🟢 -16.5 kB 🟢 -4.59 kB 🟢 -4.1 kB
assets/WidgetRecordAudio-DNRw1O_j.js (new) — 16.5 kB 🔴 +16.5 kB 🔴 +4.59 kB 🔴 +4.1 kB
assets/WidgetInputNumber-1OdGreoQ.js (new) — 13.9 kB 🔴 +13.9 kB 🔴 +3.63 kB 🔴 +3.21 kB
assets/WidgetInputNumber-Di4pr-SF.js (removed) 13.9 kB — 🟢 -13.9 kB 🟢 -3.63 kB 🟢 -3.2 kB
assets/WidgetRange-BBxaBG88.js (removed) 13.7 kB — 🟢 -13.7 kB 🟢 -3.54 kB 🟢 -3.12 kB
assets/WidgetRange-BrO8dpZ4.js (new) — 13.7 kB 🔴 +13.7 kB 🔴 +3.55 kB 🔴 +3.13 kB
assets/WaveAudioPlayer-BMDqRRGo.js (removed) 12.9 kB — 🟢 -12.9 kB 🟢 -3.49 kB 🟢 -3.05 kB
assets/WaveAudioPlayer-Dm5lA-tK.js (new) — 12.9 kB 🔴 +12.9 kB 🔴 +3.49 kB 🔴 +3.05 kB
assets/GlobalToast--CYdT-rE.js (removed) 12.2 kB — 🟢 -12.2 kB 🟢 -4.01 kB 🟢 -3.49 kB
assets/GlobalToast-D4lcUYxt.js (new) — 12.2 kB 🔴 +12.2 kB 🔴 +4.01 kB 🔴 +3.49 kB
assets/WidgetCurve-D0h6JyS9.js (removed) 11.2 kB — 🟢 -11.2 kB 🟢 -3.48 kB 🟢 -3.16 kB
assets/WidgetCurve-DTpfmzGw.js (new) — 11.2 kB 🔴 +11.2 kB 🔴 +3.48 kB 🔴 +3.15 kB
assets/TeamWorkspacesDialogContent-Bk7AcukQ.js (new) — 10.4 kB 🔴 +10.4 kB 🔴 +2.99 kB 🔴 +2.65 kB
assets/TeamWorkspacesDialogContent-DJAyFF-m.js (removed) 10.4 kB — 🟢 -10.4 kB 🟢 -2.99 kB 🟢 -2.65 kB
assets/onboardingCloudRoutes-KYs47PsV.js (new) — 9.76 kB 🔴 +9.76 kB 🔴 +2.86 kB 🔴 +2.45 kB
assets/onboardingCloudRoutes-XWlxvlYW.js (removed) 9.76 kB — 🟢 -9.76 kB 🟢 -2.87 kB 🟢 -2.46 kB
assets/Load3DConfiguration-BtHu2Rpr.js (new) — 8.91 kB 🔴 +8.91 kB 🔴 +2.61 kB 🔴 +2.31 kB
assets/Load3DConfiguration-GcJ2IK8P.js (removed) 8.91 kB — 🟢 -8.91 kB 🟢 -2.61 kB 🟢 -2.31 kB
assets/nodeTemplates-BnWfreJ3.js (removed) 8.63 kB — 🟢 -8.63 kB 🟢 -2.98 kB 🟢 -2.62 kB
assets/nodeTemplates-C2VHcQsn.js (new) — 8.63 kB 🔴 +8.63 kB 🔴 +2.98 kB 🔴 +2.62 kB
assets/WidgetImageCrop-1XIU5jzT.js (new) — 8.49 kB 🔴 +8.49 kB 🔴 +2.66 kB 🔴 +2.34 kB
assets/WidgetImageCrop-CehkjaGb.js (removed) 8.49 kB — 🟢 -8.49 kB 🟢 -2.66 kB 🟢 -2.34 kB
assets/SetMemberCreditLimitDialogContent-Cybtiycn.js (new) — 8.47 kB 🔴 +8.47 kB 🔴 +2.34 kB 🔴 +2.05 kB
assets/SetMemberCreditLimitDialogContent-DKCYgkQ6.js (removed) 8.47 kB — 🟢 -8.47 kB 🟢 -2.34 kB 🟢 -2.04 kB
assets/CloudRunButtonWrapper-CgFsCva6.js (new) — 8.15 kB 🔴 +8.15 kB 🔴 +2.45 kB 🔴 +2.15 kB
assets/CloudRunButtonWrapper-hJMgyHNP.js (removed) 8.15 kB — 🟢 -8.15 kB 🟢 -2.45 kB 🟢 -2.15 kB
assets/WorkspaceSwitcherPopover-B5NNauQG.js (removed) 8.08 kB — 🟢 -8.08 kB 🟢 -2.39 kB 🟢 -2.13 kB
assets/WorkspaceSwitcherPopover-CYu17cId.js (new) — 8.08 kB 🔴 +8.08 kB 🔴 +2.39 kB 🔴 +2.13 kB
assets/NightlySurveyController-PXThluxU.js (removed) 7.5 kB — 🟢 -7.5 kB 🟢 -2.56 kB 🟢 -2.25 kB
assets/NightlySurveyController-RxC9OOHe.js (new) — 7.5 kB 🔴 +7.5 kB 🔴 +2.56 kB 🔴 +2.26 kB
assets/LayoutDefault-BA2X8ytr.js (removed) 7.41 kB — 🟢 -7.41 kB 🟢 -2.44 kB 🟢 -2.15 kB
assets/LayoutDefault-l5Q2-ZzS.js (new) — 7.41 kB 🔴 +7.41 kB 🔴 +2.44 kB 🔴 +2.15 kB
assets/missingModelMetadata-5aeJTg-P.js (new) — 6.52 kB 🔴 +6.52 kB 🔴 +2.22 kB 🔴 +1.95 kB
assets/missingModelMetadata-BAj9bI-E.js (removed) 6.52 kB — 🟢 -6.52 kB 🟢 -2.22 kB 🟢 -1.95 kB
assets/WidgetWithControl-CMHSMu80.js (removed) 6.46 kB — 🟢 -6.46 kB 🟢 -2.64 kB 🟢 -2.31 kB
assets/WidgetWithControl-IKihkDYF.js (new) — 6.46 kB 🔴 +6.46 kB 🔴 +2.64 kB 🔴 +2.35 kB
assets/CancelSubscriptionDialogContent-CW_lsNTn.js (new) — 6.05 kB 🔴 +6.05 kB 🔴 +2.01 kB 🔴 +1.76 kB
assets/CancelSubscriptionDialogContent-DS9mOnbn.js (removed) 6.05 kB — 🟢 -6.05 kB 🟢 -2.01 kB 🟢 -1.76 kB
assets/load3dPreviewExtensions-C-MOJQKC.js (removed) 5.88 kB — 🟢 -5.88 kB 🟢 -1.81 kB 🟢 -1.6 kB
assets/load3dPreviewExtensions-C5bwX3p0.js (new) — 5.88 kB 🔴 +5.88 kB 🔴 +1.81 kB 🔴 +1.6 kB
assets/ApiNodesSignInContent-A4lY6mZ7.js (new) — 5.68 kB 🔴 +5.68 kB 🔴 +2.02 kB 🔴 +1.78 kB
assets/ApiNodesSignInContent-BWPsPfBS.js (removed) 5.68 kB — 🟢 -5.68 kB 🟢 -2.01 kB 🟢 -1.78 kB
assets/launchCancellationFlow-BLXrTk1N.js (removed) 5.18 kB — 🟢 -5.18 kB 🟢 -1.78 kB 🟢 -1.56 kB
assets/launchCancellationFlow-DkqPdHbY.js (new) — 5.18 kB 🔴 +5.18 kB 🔴 +1.78 kB 🔴 +1.56 kB
assets/CreateWorkspaceDialogContent-B22EPl9z.js (removed) 5.12 kB — 🟢 -5.12 kB 🟢 -1.79 kB 🟢 -1.55 kB
assets/CreateWorkspaceDialogContent-BIzkn6UK.js (new) — 5.12 kB 🔴 +5.12 kB 🔴 +1.8 kB 🔴 +1.55 kB
assets/ChangeMemberRoleDialogContent-B0auk_Kl.js (new) — 4.97 kB 🔴 +4.97 kB 🔴 +1.64 kB 🔴 +1.43 kB
assets/ChangeMemberRoleDialogContent-Y_AKQI8Y.js (removed) 4.97 kB — 🟢 -4.97 kB 🟢 -1.64 kB 🟢 -1.43 kB
assets/InviteMemberDialogContent-2fxVhnBB.js (new) — 4.94 kB 🔴 +4.94 kB 🔴 +1.64 kB 🔴 +1.42 kB
assets/InviteMemberDialogContent-DqAJQRVl.js (removed) 4.94 kB — 🟢 -4.94 kB 🟢 -1.63 kB 🟢 -1.42 kB
assets/EditWorkspaceDialogContent-B_Sa6K-Y.js (removed) 4.93 kB — 🟢 -4.93 kB 🟢 -1.76 kB 🟢 -1.53 kB
assets/EditWorkspaceDialogContent-Cyrk3gxF.js (new) — 4.93 kB 🔴 +4.93 kB 🔴 +1.76 kB 🔴 +1.52 kB
assets/WidgetTextarea-Ddz7ATKa.js (removed) 4.83 kB — 🟢 -4.83 kB 🟢 -1.88 kB 🟢 -1.64 kB
assets/WidgetTextarea-p56IZV4M.js (new) — 4.83 kB 🔴 +4.83 kB 🔴 +1.88 kB 🔴 +1.64 kB
assets/saveMesh-D8xwBqCn.js (new) — 4.72 kB 🔴 +4.72 kB 🔴 +1.5 kB 🔴 +1.32 kB
assets/saveMesh-wbv_hSvv.js (removed) 4.72 kB — 🟢 -4.72 kB 🟢 -1.5 kB 🟢 -1.33 kB
assets/ValueControlPopover-76x3uUah.js (new) — 4.49 kB 🔴 +4.49 kB 🔴 +1.55 kB 🔴 +1.38 kB
assets/ValueControlPopover-BizxmRD6.js (removed) 4.49 kB — 🟢 -4.49 kB 🟢 -1.55 kB 🟢 -1.38 kB
assets/DeleteWorkspaceDialogContent-BwFI1tQD.js (new) — 3.84 kB 🔴 +3.84 kB 🔴 +1.44 kB 🔴 +1.24 kB
assets/DeleteWorkspaceDialogContent-DTsOw9Q_.js (removed) 3.84 kB — 🟢 -3.84 kB 🟢 -1.44 kB 🟢 -1.23 kB
assets/RemoveMemberDialogContent-BuM3BCwY.js (removed) 3.76 kB — 🟢 -3.76 kB 🟢 -1.38 kB 🟢 -1.19 kB
assets/RemoveMemberDialogContent-BxHSNlao.js (new) — 3.76 kB 🔴 +3.76 kB 🔴 +1.39 kB 🔴 +1.2 kB
assets/RevokeInviteDialogContent-BmBiHcJx.js (new) — 3.67 kB 🔴 +3.67 kB 🔴 +1.39 kB 🔴 +1.21 kB
assets/RevokeInviteDialogContent-C-4iBBBo.js (removed) 3.67 kB — 🟢 -3.67 kB 🟢 -1.39 kB 🟢 -1.21 kB
assets/LeaveWorkspaceDialogContent-BMfUS632.js (new) — 3.67 kB 🔴 +3.67 kB 🔴 +1.39 kB 🔴 +1.19 kB
assets/LeaveWorkspaceDialogContent-BZVw0a-1.js (removed) 3.67 kB — 🟢 -3.67 kB 🟢 -1.38 kB 🟢 -1.19 kB
assets/InviteMemberUpsellDialogContent-D9iO0HuY.js (removed) 3.47 kB — 🟢 -3.47 kB 🟢 -1.24 kB 🟢 -1.07 kB
assets/InviteMemberUpsellDialogContent-YObNa5op.js (new) — 3.47 kB 🔴 +3.47 kB 🔴 +1.24 kB 🔴 +1.07 kB
assets/SubscribeToRun-BmmIU8jS.js (new) — 3.34 kB 🔴 +3.34 kB 🔴 +1.42 kB 🔴 +1.22 kB
assets/SubscribeToRun-kJcn8ghN.js (removed) 3.34 kB — 🟢 -3.34 kB 🟢 -1.42 kB 🟢 -1.22 kB
assets/Media3DTop-CEfSdit-.js (removed) 3.21 kB — 🟢 -3.21 kB 🟢 -1.27 kB 🟢 -1.1 kB
assets/Media3DTop-Cf1KYP3Q.js (new) — 3.21 kB 🔴 +3.21 kB 🔴 +1.27 kB 🔴 +1.1 kB
assets/load3dAdvanced-3_zYxXeE.js (new) — 2.82 kB 🔴 +2.82 kB 🔴 +1.09 kB 🔴 +954 B
assets/load3dAdvanced-BCyGKNoR.js (removed) 2.82 kB — 🟢 -2.82 kB 🟢 -1.1 kB 🟢 -956 B
assets/LocalRunButtonWrapper-BxudhPo8.js (new) — 2.49 kB 🔴 +2.49 kB 🔴 +1.14 kB 🔴 +995 B
assets/LocalRunButtonWrapper-DFhuICLv.js (removed) 2.49 kB — 🟢 -2.49 kB 🟢 -1.14 kB 🟢 -1.02 kB
assets/MediaAudioTop-BJgvPV3T.js (removed) 1.62 kB — 🟢 -1.62 kB 🟢 -809 B 🟢 -671 B
assets/MediaAudioTop-DnFPJ0nY.js (new) — 1.62 kB 🔴 +1.62 kB 🔴 +808 B 🔴 +667 B
assets/paymentReturnUrl-CSLJCf7q.js (removed) 1.58 kB — 🟢 -1.58 kB 🟢 -782 B 🟢 -622 B
assets/paymentReturnUrl-DpnXkeFS.js (new) — 1.58 kB 🔴 +1.58 kB 🔴 +785 B 🔴 +628 B
assets/cameraInfo-D3aVyysh.js (new) — 1.1 kB 🔴 +1.1 kB 🔴 +572 B 🔴 +492 B
assets/cameraInfo-DqYkPdpH.js (removed) 1.1 kB — 🟢 -1.1 kB 🟢 -571 B 🟢 -491 B
assets/Load3DAdvanced-3IPHbyWk.js (removed) 761 B — 🟢 -761 B 🟢 -422 B 🟢 -359 B
assets/Load3DAdvanced-CLADTFHm.js (new) — 761 B 🔴 +761 B 🔴 +422 B 🔴 +358 B
assets/nightlyBadges-BEbfsvUW.js (removed) 411 B — 🟢 -411 B 🟢 -271 B 🟢 -235 B
assets/nightlyBadges-dj2SLdjO.js (new) — 411 B 🔴 +411 B 🔴 +272 B 🔴 +234 B
assets/Load3dViewerContent-CKTJpJ95.js (removed) 137 B — 🟢 -137 B 🟢 -103 B 🟢 -95 B
assets/Load3dViewerContent-DycQbDRP.js (new) — 137 B 🔴 +137 B 🔴 +103 B 🔴 +94 B
assets/missingModelMetadata-DQOsxkSd.js (removed) 125 B — 🟢 -125 B 🟢 -103 B 🟢 -104 B
assets/missingModelMetadata-DzXFd_G8.js (new) — 125 B 🔴 +125 B 🔴 +103 B 🔴 +103 B
assets/Load3DAdvanced-CPbJ1d5o.js (removed) 122 B — 🟢 -122 B 🟢 -97 B 🟢 -90 B
assets/Load3DAdvanced-UF9Dy-3E.js (new) — 122 B 🔴 +122 B 🔴 +97 B 🔴 +88 B
assets/LayoutDefault-BLVhXXlz.js (removed) 119 B — 🟢 -119 B 🟢 -92 B 🟢 -83 B
assets/LayoutDefault-D8eo7KBm.js (new) — 119 B 🔴 +119 B 🔴 +92 B 🔴 +91 B
assets/WidgetLegacy-5RKBL28u.js (removed) 117 B — 🟢 -117 B 🟢 -106 B 🟢 -93 B
assets/WidgetLegacy-CiOHThCC.js (new) — 117 B 🔴 +117 B 🔴 +106 B 🔴 +103 B
assets/workflowDraftStoreV2-C_oA2UHX.js (removed) 112 B — 🟢 -112 B 🟢 -101 B 🟢 -107 B
assets/workflowDraftStoreV2-C--5NTS9.js (new) — 112 B 🔴 +112 B 🔴 +101 B 🔴 +109 B
assets/CameraInfo-D0Xq6avW.js (new) — 110 B 🔴 +110 B 🔴 +93 B 🔴 +87 B
assets/CameraInfo-DTws15Hq.js (removed) 110 B — 🟢 -110 B 🟢 -93 B 🟢 -91 B
assets/Load3D-gmvCXoyj.js (removed) 98 B — 🟢 -98 B 🟢 -89 B 🟢 -78 B
assets/Load3D-sJwjgS7W.js (new) — 98 B 🔴 +98 B 🔴 +89 B 🔴 +78 B
assets/changeTracker-Bfcgkljg.js (new) — 92 B 🔴 +92 B 🔴 +94 B 🔴 +86 B
assets/changeTracker-BM5q_qhR.js (removed) 92 B — 🟢 -92 B 🟢 -94 B 🟢 -77 B

Status: 72 added / 72 removed / 224 unchanged

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 66.9 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.8 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.4 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 76.4 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 79.0 MB heap
large-graph-pan: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 75.8 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 71.5 MB heap
legacy-node-drag: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 82.1 MB heap
minimap-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 80.1 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.6 MB heap
subgraph-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.0 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.4 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 129ms TBT · 96.0 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.4 MB heap
vue-large-graph-idle: · 56.3 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 165.3 MB heap
vue-large-graph-pan: · 56.3 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 195ms TBT · 177.5 MB heap
vue-node-resize-workload: · 55.4 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 529ms TBT · 172.7 MB heap
vue-zoom-out-idle: · 56.3 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 2ms TBT · 171.6 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 62.0 MB heap

✅ No regressions detected.

All metrics
Metric Baseline PR (median) Δ Sig
canvas-idle: avg frame time 17ms 17ms +0% z=0.6
canvas-idle: p95 frame time 17ms 17ms +0% z=-2.2
canvas-idle: layout duration 0ms 0ms +0% —
canvas-idle: style recalc duration 9ms 7ms -19% z=-0.4
canvas-idle: layout count 0 0 +0% —
canvas-idle: style recalc count 9 8 -17% z=-1.4
canvas-idle: task duration 505ms 479ms -5% z=0.4
canvas-idle: script duration 10ms 11ms +11% z=0.5
canvas-idle: TBT 0ms 0ms +0% —
canvas-idle: heap used 55.8 MB 66.9 MB +20% z=0.8
canvas-idle: DOM nodes -279 -265 -5% z=-0.6
canvas-idle: event listeners -152 -154 +1% z=-0.1
canvas-mouse-sweep: avg frame time 17ms 17ms +0% z=0.5
canvas-mouse-sweep: p95 frame time 17ms 17ms -1% z=-2.1
canvas-mouse-sweep: layout duration 5ms 5ms +6% z=0.7
canvas-mouse-sweep: style recalc duration 42ms 34ms -19% z=1.0
canvas-mouse-sweep: layout count 14 14 +0% —
canvas-mouse-sweep: style recalc count 77 77 +0% z=0.7
canvas-mouse-sweep: task duration 894ms 921ms +3% z=0.7
canvas-mouse-sweep: script duration 163ms 161ms -1% z=0.3
canvas-mouse-sweep: TBT 0ms 0ms +0% variance too high
canvas-mouse-sweep: heap used 59.5 MB 67.8 MB +14% z=0.3
canvas-mouse-sweep: DOM nodes -280 -263 -6% z=-0.7
canvas-mouse-sweep: event listeners -150 -170 +13% z=-0.5
canvas-zoom-sweep: avg frame time 17ms 17ms +0% z=1.0
canvas-zoom-sweep: p95 frame time 17ms 17ms -1% z=-1.6
canvas-zoom-sweep: layout duration 1ms 1ms +20% z=1.5
canvas-zoom-sweep: style recalc duration 19ms 16ms -15% z=0.1
canvas-zoom-sweep: layout count 6 6 +0% —
canvas-zoom-sweep: style recalc count 31 31 +0% z=-0.9
canvas-zoom-sweep: task duration 376ms 364ms -3% z=0.6
canvas-zoom-sweep: script duration 12ms 13ms +9% z=0.6
canvas-zoom-sweep: TBT 0ms 0ms +0% —
canvas-zoom-sweep: heap used 71.9 MB 61.4 MB -15% z=-0.1
canvas-zoom-sweep: DOM nodes 76 75 -2% z=-1.7
canvas-zoom-sweep: event listeners 19 19 +0% z=-0.4
dom-widget-clipping: avg frame time 17ms 17ms -0% z=-0.9
dom-widget-clipping: p95 frame time 17ms 17ms -0% z=-0.0
dom-widget-clipping: layout duration 0ms 0ms +0% —
dom-widget-clipping: style recalc duration 7ms 8ms +16% z=0.7
dom-widget-clipping: layout count 0 0 +0% —
dom-widget-clipping: style recalc count 10 11 +10% z=0.3
dom-widget-clipping: task duration 444ms 452ms +2% z=0.4
dom-widget-clipping: script duration 159ms 162ms +2% z=0.3
dom-widget-clipping: TBT 0ms 0ms +0% —
dom-widget-clipping: heap used 60.0 MB 76.4 MB +27% z=0.7
dom-widget-clipping: DOM nodes 16 18 +13% z=0.4
dom-widget-clipping: event listeners 2 2 +0% z=0.7
large-graph-idle: avg frame time 17ms 17ms +0% z=0.5
large-graph-idle: p95 frame time 17ms 17ms +0% z=-0.2
large-graph-idle: layout duration 0ms 0ms +0% —
large-graph-idle: style recalc duration 6ms 5ms -21% z=-1.4
large-graph-idle: layout count 0 0 +0% —
large-graph-idle: style recalc count 6 5 -17% z=-0.8
large-graph-idle: task duration 608ms 600ms -1% z=0.3
large-graph-idle: script duration 36ms 35ms -4% z=0.2
large-graph-idle: TBT 0ms 0ms +0% —
large-graph-idle: heap used 83.5 MB 79.0 MB -5% z=0.6
large-graph-idle: DOM nodes -266 -249 -7% z=-0.4
large-graph-idle: event listeners -148 -153 +3% z=0.5
large-graph-pan: avg frame time 17ms 17ms -0% z=-1.0
large-graph-pan: p95 frame time 17ms 17ms +0% z=0.3
large-graph-pan: layout duration 0ms 0ms +0% —
large-graph-pan: style recalc duration 10ms 13ms +34% z=1.1
large-graph-pan: layout count 0 0 +0% —
large-graph-pan: style recalc count 64 67 +4% z=0.2
large-graph-pan: task duration 1678ms 1658ms -1% z=0.5
large-graph-pan: script duration 847ms 831ms -2% z=0.4
large-graph-pan: TBT 0ms 0ms +0% —
large-graph-pan: heap used 81.3 MB 75.8 MB -7% z=0.1
large-graph-pan: DOM nodes -273 -249 -9% z=-1.5
large-graph-pan: event listeners -148 -152 +3% z=-0.9
large-graph-zoom: avg frame time 17ms 17ms +0% z=0.3
large-graph-zoom: p95 frame time 17ms 17ms -0% z=0.1
large-graph-zoom: layout duration 12ms 15ms +24% z=1.4
large-graph-zoom: style recalc duration 10ms 12ms +17% z=0.1
large-graph-zoom: layout count 60 60 +0% —
large-graph-zoom: style recalc count 60 61 +1% z=-1.1
large-graph-zoom: task duration 1746ms 1762ms +1% z=0.6
large-graph-zoom: script duration 780ms 808ms +3% z=0.5
large-graph-zoom: TBT 0ms 0ms +0% —
large-graph-zoom: heap used 72.7 MB 71.5 MB -2% z=0.5
large-graph-zoom: DOM nodes -279 -258 -8% z=-1.5
large-graph-zoom: event listeners 8 10 +25% z=1.2
legacy-node-drag: avg frame time 17ms 17ms +0% z=0.7
legacy-node-drag: p95 frame time 17ms 17ms +0% z=-1.8
legacy-node-drag: layout duration 0ms 0ms +0% —
legacy-node-drag: style recalc duration 5ms 6ms +27% z=-0.4
legacy-node-drag: layout count 0 0 +0% —
legacy-node-drag: style recalc count 40 41 +1% z=-0.9
legacy-node-drag: task duration 1979ms 1975ms -0% z=0.6
legacy-node-drag: script duration 961ms 1004ms +4% z=0.6
legacy-node-drag: TBT 0ms 0ms +0% —
legacy-node-drag: heap used 88.6 MB 82.1 MB -7% z=0.5
legacy-node-drag: DOM nodes 0 1 — z=1.1
legacy-node-drag: event listeners 188 188 +0% z=1.1
minimap-idle: avg frame time 17ms 17ms +0% z=0.1
minimap-idle: p95 frame time 17ms 17ms +0% z=0.3
minimap-idle: layout duration 0ms 0ms +0% —
minimap-idle: style recalc duration 2ms 4ms +110% z=-1.1
minimap-idle: layout count 0 0 +0% —
minimap-idle: style recalc count 2 5 +125% z=-0.7
minimap-idle: task duration 553ms 603ms +9% z=0.3
minimap-idle: script duration 34ms 40ms +17% z=0.9
minimap-idle: TBT 0ms 0ms +0% —
minimap-idle: heap used 83.9 MB 80.1 MB -5% z=1.1
minimap-idle: DOM nodes -274 -252 -8% z=-0.2
minimap-idle: event listeners 6 -154 -2667% z=0.1
subgraph-dom-widget-clipping: avg frame time 17ms 17ms +0% z=0.7
subgraph-dom-widget-clipping: p95 frame time 17ms 17ms +0% z=-2.1
subgraph-dom-widget-clipping: layout duration 0ms 0ms +0% —
subgraph-dom-widget-clipping: style recalc duration 11ms 12ms +11% z=1.0
subgraph-dom-widget-clipping: layout count 0 0 +0% —
subgraph-dom-widget-clipping: style recalc count 46 47 +2% z=0.7
subgraph-dom-widget-clipping: task duration 421ms 430ms +2% z=0.8
subgraph-dom-widget-clipping: script duration 143ms 151ms +5% z=0.8
subgraph-dom-widget-clipping: TBT 0ms 0ms +0% —
subgraph-dom-widget-clipping: heap used 83.7 MB 73.6 MB -12% z=0.4
subgraph-dom-widget-clipping: DOM nodes 18 20 +11% z=0.7
subgraph-dom-widget-clipping: event listeners 6 7 +17% z=-1.0
subgraph-idle: avg frame time 17ms 17ms +0% z=1.3
subgraph-idle: p95 frame time 17ms 17ms -1% z=-1.8
subgraph-idle: layout duration 0ms 0ms +0% —
subgraph-idle: style recalc duration 10ms 9ms -3% z=1.1
subgraph-idle: layout count 0 0 +0% —
subgraph-idle: style recalc count 10 10 -5% z=-0.4
subgraph-idle: task duration 490ms 552ms +12% z=1.2
subgraph-idle: script duration 8ms 11ms +47% z=1.3
subgraph-idle: TBT 0ms 0ms +0% —
subgraph-idle: heap used 67.5 MB 70.0 MB +4% z=1.0
subgraph-idle: DOM nodes -294 -277 -6% z=-0.3
subgraph-idle: event listeners -226 -215 -5% z=-0.3
subgraph-mouse-sweep: avg frame time 17ms 17ms +0% z=0.3
subgraph-mouse-sweep: p95 frame time 17ms 17ms +0% z=0.2
subgraph-mouse-sweep: layout duration 6ms 6ms +1% z=1.2
subgraph-mouse-sweep: style recalc duration 38ms 30ms -22% z=0.6
subgraph-mouse-sweep: layout count 18 18 +0% —
subgraph-mouse-sweep: style recalc count 77 77 +0% z=-1.2
subgraph-mouse-sweep: task duration 842ms 831ms -1% z=0.7
subgraph-mouse-sweep: script duration 112ms 114ms +2% z=0.6
subgraph-mouse-sweep: TBT 0ms 0ms +0% —
subgraph-mouse-sweep: heap used 58.0 MB 67.4 MB +16% z=0.7
subgraph-mouse-sweep: DOM nodes -295 -276 -6% z=-0.6
subgraph-mouse-sweep: event listeners -196 -216 +10% z=-0.1
subgraph-transition-enter: avg frame time 17ms 17ms +0% z=-1.2
subgraph-transition-enter: p95 frame time 17ms 17ms -0% z=1.0
subgraph-transition-enter: layout duration 16ms 12ms -21% z=0.2
subgraph-transition-enter: style recalc duration 33ms 28ms -13% z=0.3
subgraph-transition-enter: layout count 14 5 -64% —
subgraph-transition-enter: style recalc count 18 17 -6% z=-0.1
subgraph-transition-enter: task duration 954ms 960ms +1% z=1.0
subgraph-transition-enter: script duration 33ms 33ms -1% z=0.9
subgraph-transition-enter: TBT 143ms 129ms -10% z=-0.0
subgraph-transition-enter: heap used 100.2 MB 96.0 MB -4% z=0.6
subgraph-transition-enter: DOM nodes 13751 13587 -1% —
subgraph-transition-enter: event listeners 2385 2387 +0% z=1.4
viewport-pan-sweep: avg frame time 17ms 17ms +0% z=-0.1
viewport-pan-sweep: p95 frame time 17ms 17ms -0% z=0.2
viewport-pan-sweep: layout duration 0ms 0ms +0% —
viewport-pan-sweep: style recalc duration 37ms 42ms +14% z=1.0
viewport-pan-sweep: layout count 0 0 +0% —
viewport-pan-sweep: style recalc count 247 247 +0% z=-1.0
viewport-pan-sweep: task duration 5962ms 5888ms -1% z=0.5
viewport-pan-sweep: script duration 2682ms 2735ms +2% z=0.3
viewport-pan-sweep: TBT 0ms 0ms +0% —
viewport-pan-sweep: heap used 84.9 MB 67.4 MB -21% z=-0.8
viewport-pan-sweep: DOM nodes -272 -249 -9% z=-0.7
viewport-pan-sweep: event listeners -162 -138 -15% z=1.6
vue-large-graph-idle: avg frame time 18ms 18ms +0% z=0.4
vue-large-graph-idle: p95 frame time 17ms 17ms -0% z=-0.6
vue-large-graph-idle: layout duration 0ms 0ms +0% —
vue-large-graph-idle: style recalc duration 0ms 0ms +0% —
vue-large-graph-idle: layout count 0 0 +0% —
vue-large-graph-idle: style recalc count 0 0 +0% —
vue-large-graph-idle: task duration 16671ms 17962ms +8% z=1.0
vue-large-graph-idle: script duration 276ms 334ms +21% z=1.2
vue-large-graph-idle: TBT 0ms 0ms +0% —
vue-large-graph-idle: heap used 171.3 MB 165.3 MB -4% z=-1.0
vue-large-graph-idle: DOM nodes -6548 -6542 -0% z=0.4
vue-large-graph-idle: event listeners -7475 -7476 +0% z=0.6
vue-large-graph-pan: avg frame time 18ms 18ms -0% z=0.5
vue-large-graph-pan: p95 frame time 17ms 17ms +0% z=0.9
vue-large-graph-pan: layout duration 0ms 0ms +0% —
vue-large-graph-pan: style recalc duration 18ms 25ms +40% z=1.4
vue-large-graph-pan: layout count 0 0 +0% —
vue-large-graph-pan: style recalc count 170 174 +2% z=1.0
vue-large-graph-pan: task duration 20862ms 23008ms +10% z=1.2
vue-large-graph-pan: script duration 917ms 936ms +2% z=0.7
vue-large-graph-pan: TBT 106ms 195ms +83% variance too high
vue-large-graph-pan: heap used 172.8 MB 177.5 MB +3% z=1.4
vue-large-graph-pan: DOM nodes -6548 -6542 -0% z=0.5
vue-large-graph-pan: event listeners -7469 -7472 +0% z=0.8
vue-node-resize-workload: avg frame time 18ms 18ms +2% z=1.0
vue-node-resize-workload: p95 frame time 17ms 17ms +0% z=1.0
vue-node-resize-workload: layout duration 28ms 26ms -7% z=0.7
vue-node-resize-workload: style recalc duration 89ms 75ms -17% z=0.1
vue-node-resize-workload: layout count 20 20 +0% —
vue-node-resize-workload: style recalc count 20 20 +0% —
vue-node-resize-workload: task duration 6132ms 6634ms +8% z=1.1
vue-node-resize-workload: script duration 115ms 125ms +9% z=1.0
vue-node-resize-workload: TBT 383ms 529ms +38% variance too high
vue-node-resize-workload: heap used 168.0 MB 172.7 MB +3% z=0.3
vue-node-resize-workload: DOM nodes -6548 -6542 -0% z=0.5
vue-node-resize-workload: event listeners -7469 -7475 +0% z=0.9
vue-zoom-out-idle: avg frame time 18ms 18ms -0% z=0.6
vue-zoom-out-idle: p95 frame time 17ms 17ms +0% z=1.1
vue-zoom-out-idle: layout duration 0ms 0ms +0% —
vue-zoom-out-idle: style recalc duration 0ms 0ms +0% variance too high
vue-zoom-out-idle: layout count 0 0 +0% —
vue-zoom-out-idle: style recalc count 0 0 +0% variance too high
vue-zoom-out-idle: task duration 8552ms 9022ms +5% z=1.0
vue-zoom-out-idle: script duration 168ms 171ms +2% z=1.5
vue-zoom-out-idle: TBT 0ms 2ms — —
vue-zoom-out-idle: heap used 168.1 MB 171.6 MB +2% z=0.6
vue-zoom-out-idle: DOM nodes 0 0 +0% z=0.3
vue-zoom-out-idle: event listeners -14 -12 -14% z=-0.3
workflow-execution: avg frame time 17ms 17ms -0% z=-1.8
workflow-execution: p95 frame time 17ms 17ms +0% z=0.3
workflow-execution: layout duration 1ms 2ms +153% z=0.4
workflow-execution: style recalc duration 18ms 20ms +9% z=0.4
workflow-execution: layout count 3 4 +33% z=1.4
workflow-execution: style recalc count 13 10 -27% z=-0.7
workflow-execution: task duration 98ms 99ms +2% z=0.2
workflow-execution: script duration 8ms 12ms +48% z=1.5
workflow-execution: TBT 0ms 0ms +0% —
workflow-execution: heap used 69.9 MB 62.0 MB -11% z=-1.5
workflow-execution: DOM nodes 121 122 +0% z=-0.9
workflow-execution: event listeners 67 26 -61% z=-1.8
Historical variance (last 15 runs)
Metric μ σ CV
canvas-idle: avg frame time 17ms 0ms 0.0%
canvas-idle: p95 frame time 17ms 0ms 0.1%
canvas-idle: layout duration 0ms 0ms 0.0%
canvas-idle: style recalc duration 8ms 1ms 16.7%
canvas-idle: layout count 0 0 0.0%
canvas-idle: style recalc count 9 1 8.9%
canvas-idle: task duration 443ms 96ms 21.6%
canvas-idle: script duration 10ms 2ms 25.3%
canvas-idle: TBT 0ms 0ms 0.0%
canvas-idle: heap used 63.7 MB 4.0 MB 6.3%
canvas-idle: DOM nodes -237 44 0.0%
canvas-idle: event listeners -150 29 0.0%
canvas-mouse-sweep: avg frame time 17ms 0ms 0.0%
canvas-mouse-sweep: p95 frame time 17ms 0ms 0.1%
canvas-mouse-sweep: layout duration 4ms 1ms 14.1%
canvas-mouse-sweep: style recalc duration 29ms 6ms 19.9%
canvas-mouse-sweep: layout count 14 0 0.0%
canvas-mouse-sweep: style recalc count 76 2 2.7%
canvas-mouse-sweep: task duration 830ms 128ms 15.4%
canvas-mouse-sweep: script duration 154ms 27ms 17.8%
canvas-mouse-sweep: TBT 0ms 1ms 387.3%
canvas-mouse-sweep: heap used 66.2 MB 4.7 MB 7.2%
canvas-mouse-sweep: DOM nodes -261 2 0.0%
canvas-mouse-sweep: event listeners -165 10 0.0%
canvas-zoom-sweep: avg frame time 17ms 0ms 0.0%
canvas-zoom-sweep: p95 frame time 17ms 0ms 0.2%
canvas-zoom-sweep: layout duration 1ms 0ms 8.1%
canvas-zoom-sweep: style recalc duration 16ms 3ms 16.4%
canvas-zoom-sweep: layout count 6 0 0.0%
canvas-zoom-sweep: style recalc count 31 0 1.3%
canvas-zoom-sweep: task duration 330ms 57ms 17.4%
canvas-zoom-sweep: script duration 12ms 2ms 20.2%
canvas-zoom-sweep: TBT 0ms 0ms 0.0%
canvas-zoom-sweep: heap used 61.5 MB 919.1 KB 1.5%
canvas-zoom-sweep: DOM nodes 75 1 0.8%
canvas-zoom-sweep: event listeners 19 1 3.7%
dom-widget-clipping: avg frame time 17ms 0ms 0.0%
dom-widget-clipping: p95 frame time 17ms 0ms 0.2%
dom-widget-clipping: layout duration 0ms 0ms 0.0%
dom-widget-clipping: style recalc duration 7ms 1ms 16.3%
dom-widget-clipping: layout count 0 0 0.0%
dom-widget-clipping: style recalc count 11 1 6.4%
dom-widget-clipping: task duration 423ms 67ms 15.9%
dom-widget-clipping: script duration 153ms 25ms 16.6%
dom-widget-clipping: TBT 0ms 0ms 0.0%
dom-widget-clipping: heap used 76.2 MB 424.0 KB 0.5%
dom-widget-clipping: DOM nodes 17 1 7.4%
dom-widget-clipping: event listeners 2 0 25.3%
large-graph-idle: avg frame time 17ms 0ms 0.0%
large-graph-idle: p95 frame time 17ms 0ms 0.2%
large-graph-idle: layout duration 0ms 0ms 0.0%
large-graph-idle: style recalc duration 6ms 1ms 10.7%
large-graph-idle: layout count 0 0 0.0%
large-graph-idle: style recalc count 6 1 22.8%
large-graph-idle: task duration 572ms 94ms 16.5%
large-graph-idle: script duration 34ms 6ms 16.3%
large-graph-idle: TBT 0ms 0ms 0.0%
large-graph-idle: heap used 78.1 MB 1.4 MB 1.8%
large-graph-idle: DOM nodes -248 2 0.0%
large-graph-idle: event listeners -162 19 0.0%
large-graph-pan: avg frame time 17ms 0ms 0.0%
large-graph-pan: p95 frame time 17ms 0ms 0.2%
large-graph-pan: layout duration 0ms 0ms 0.0%
large-graph-pan: style recalc duration 12ms 1ms 11.2%
large-graph-pan: layout count 0 0 0.0%
large-graph-pan: style recalc count 66 2 2.3%
large-graph-pan: task duration 1552ms 229ms 14.7%
large-graph-pan: script duration 785ms 123ms 15.6%
large-graph-pan: TBT 0ms 0ms 0.0%
large-graph-pan: heap used 75.3 MB 3.4 MB 4.5%
large-graph-pan: DOM nodes -189 41 0.0%
large-graph-pan: event listeners -114 43 0.0%
large-graph-zoom: avg frame time 17ms 0ms 0.0%
large-graph-zoom: p95 frame time 17ms 0ms 0.1%
large-graph-zoom: layout duration 13ms 1ms 10.8%
large-graph-zoom: style recalc duration 12ms 1ms 10.4%
large-graph-zoom: layout count 60 0 0.0%
large-graph-zoom: style recalc count 62 1 2.4%
large-graph-zoom: task duration 1619ms 234ms 14.5%
large-graph-zoom: script duration 743ms 120ms 16.1%
large-graph-zoom: TBT 0ms 0ms 0.0%
large-graph-zoom: heap used 70.1 MB 2.7 MB 3.9%
large-graph-zoom: DOM nodes -143 79 0.0%
large-graph-zoom: event listeners -72 66 0.0%
legacy-node-drag: avg frame time 17ms 0ms 0.0%
legacy-node-drag: p95 frame time 17ms 0ms 0.1%
legacy-node-drag: layout duration 0ms 0ms 0.0%
legacy-node-drag: style recalc duration 7ms 1ms 13.8%
legacy-node-drag: layout count 0 0 0.0%
legacy-node-drag: style recalc count 42 2 4.3%
legacy-node-drag: task duration 1803ms 299ms 16.6%
legacy-node-drag: script duration 915ms 162ms 17.8%
legacy-node-drag: TBT 0ms 0ms 0.0%
legacy-node-drag: heap used 80.0 MB 4.6 MB 5.8%
legacy-node-drag: DOM nodes -76 68 0.0%
legacy-node-drag: event listeners 137 48 35.2%
minimap-idle: avg frame time 17ms 0ms 0.0%
minimap-idle: p95 frame time 17ms 0ms 0.1%
minimap-idle: layout duration 0ms 0ms 0.0%
minimap-idle: style recalc duration 5ms 1ms 21.1%
minimap-idle: layout count 0 0 0.0%
minimap-idle: style recalc count 6 2 28.4%
minimap-idle: task duration 568ms 100ms 17.7%
minimap-idle: script duration 35ms 6ms 17.6%
minimap-idle: TBT 0ms 0ms 0.0%
minimap-idle: heap used 78.1 MB 1.7 MB 2.2%
minimap-idle: DOM nodes -246 21 0.0%
minimap-idle: event listeners -157 26 0.0%
subgraph-dom-widget-clipping: avg frame time 17ms 0ms 0.0%
subgraph-dom-widget-clipping: p95 frame time 17ms 0ms 0.1%
subgraph-dom-widget-clipping: layout duration 0ms 0ms 0.0%
subgraph-dom-widget-clipping: style recalc duration 10ms 2ms 16.2%
subgraph-dom-widget-clipping: layout count 0 0 0.0%
subgraph-dom-widget-clipping: style recalc count 47 1 1.3%
subgraph-dom-widget-clipping: task duration 382ms 62ms 16.2%
subgraph-dom-widget-clipping: script duration 134ms 22ms 16.5%
subgraph-dom-widget-clipping: TBT 0ms 0ms 0.0%
subgraph-dom-widget-clipping: heap used 73.4 MB 547.8 KB 0.7%
subgraph-dom-widget-clipping: DOM nodes 19 1 6.1%
subgraph-dom-widget-clipping: event listeners 8 1 7.2%
subgraph-idle: avg frame time 17ms 0ms 0.0%
subgraph-idle: p95 frame time 17ms 0ms 0.1%
subgraph-idle: layout duration 0ms 0ms 0.0%
subgraph-idle: style recalc duration 8ms 1ms 15.9%
subgraph-idle: layout count 0 0 0.0%
subgraph-idle: style recalc count 10 1 5.2%
subgraph-idle: task duration 453ms 79ms 17.5%
subgraph-idle: script duration 9ms 2ms 22.4%
subgraph-idle: TBT 0ms 0ms 0.0%
subgraph-idle: heap used 64.4 MB 5.6 MB 8.7%
subgraph-idle: DOM nodes -269 26 0.0%
subgraph-idle: event listeners -211 12 0.0%
subgraph-mouse-sweep: avg frame time 17ms 0ms 0.0%
subgraph-mouse-sweep: p95 frame time 17ms 0ms 0.1%
subgraph-mouse-sweep: layout duration 5ms 1ms 14.8%
subgraph-mouse-sweep: style recalc duration 27ms 5ms 17.8%
subgraph-mouse-sweep: layout count 18 0 0.0%
subgraph-mouse-sweep: style recalc count 78 1 0.7%
subgraph-mouse-sweep: task duration 757ms 109ms 14.4%
subgraph-mouse-sweep: script duration 104ms 17ms 16.5%
subgraph-mouse-sweep: TBT 0ms 0ms 0.0%
subgraph-mouse-sweep: heap used 65.1 MB 3.2 MB 4.9%
subgraph-mouse-sweep: DOM nodes -275 1 0.0%
subgraph-mouse-sweep: event listeners -215 10 0.0%
subgraph-transition-enter: avg frame time 17ms 0ms 0.0%
subgraph-transition-enter: p95 frame time 17ms 0ms 0.3%
subgraph-transition-enter: layout duration 12ms 3ms 22.4%
subgraph-transition-enter: style recalc duration 27ms 4ms 15.8%
subgraph-transition-enter: layout count 5 0 0.0%
subgraph-transition-enter: style recalc count 17 1 5.3%
subgraph-transition-enter: task duration 812ms 151ms 18.6%
subgraph-transition-enter: script duration 28ms 5ms 18.6%
subgraph-transition-enter: TBT 130ms 26ms 20.2%
subgraph-transition-enter: heap used 89.8 MB 10.7 MB 11.9%
subgraph-transition-enter: DOM nodes 13587 0 0.0%
subgraph-transition-enter: event listeners 2386 1 0.0%
viewport-pan-sweep: avg frame time 17ms 0ms 0.0%
viewport-pan-sweep: p95 frame time 17ms 0ms 0.1%
viewport-pan-sweep: layout duration 0ms 0ms 0.0%
viewport-pan-sweep: style recalc duration 37ms 5ms 14.3%
viewport-pan-sweep: layout count 0 0 0.0%
viewport-pan-sweep: style recalc count 248 1 0.4%
viewport-pan-sweep: task duration 5458ms 837ms 15.3%
viewport-pan-sweep: script duration 2611ms 418ms 16.0%
viewport-pan-sweep: TBT 0ms 0ms 0.0%
viewport-pan-sweep: heap used 71.8 MB 5.7 MB 8.0%
viewport-pan-sweep: DOM nodes -242 9 0.0%
viewport-pan-sweep: event listeners -152 9 0.0%
vue-large-graph-idle: avg frame time 18ms 0ms 2.6%
vue-large-graph-idle: p95 frame time 17ms 0ms 0.2%
vue-large-graph-idle: layout duration 0ms 0ms 0.0%
vue-large-graph-idle: style recalc duration 0ms 0ms 0.0%
vue-large-graph-idle: layout count 0 0 0.0%
vue-large-graph-idle: style recalc count 0 0 0.0%
vue-large-graph-idle: task duration 15147ms 2898ms 19.1%
vue-large-graph-idle: script duration 257ms 63ms 24.4%
vue-large-graph-idle: TBT 0ms 0ms 0.0%
vue-large-graph-idle: heap used 171.2 MB 5.7 MB 3.3%
vue-large-graph-idle: DOM nodes -6543 3 0.0%
vue-large-graph-idle: event listeners -7478 4 0.0%
vue-large-graph-pan: avg frame time 18ms 0ms 2.1%
vue-large-graph-pan: p95 frame time 17ms 0ms 0.2%
vue-large-graph-pan: layout duration 0ms 0ms 0.0%
vue-large-graph-pan: style recalc duration 18ms 5ms 25.5%
vue-large-graph-pan: layout count 0 0 0.0%
vue-large-graph-pan: style recalc count 136 39 29.0%
vue-large-graph-pan: task duration 18734ms 3475ms 18.6%
vue-large-graph-pan: script duration 849ms 120ms 14.1%
vue-large-graph-pan: TBT 84ms 77ms 91.7%
vue-large-graph-pan: heap used 169.5 MB 5.7 MB 3.4%
vue-large-graph-pan: DOM nodes -6544 3 0.0%
vue-large-graph-pan: event listeners -7476 4 0.0%
vue-node-resize-workload: avg frame time 18ms 0ms 2.4%
vue-node-resize-workload: p95 frame time 17ms 0ms 0.2%
vue-node-resize-workload: layout duration 24ms 3ms 11.6%
vue-node-resize-workload: style recalc duration 74ms 10ms 14.0%
vue-node-resize-workload: layout count 20 0 0.0%
vue-node-resize-workload: style recalc count 20 0 0.0%
vue-node-resize-workload: task duration 5451ms 1055ms 19.4%
vue-node-resize-workload: script duration 103ms 24ms 23.0%
vue-node-resize-workload: TBT 301ms 162ms 53.7%
vue-node-resize-workload: heap used 171.0 MB 5.5 MB 3.2%
vue-node-resize-workload: DOM nodes -6542 1 0.0%
vue-node-resize-workload: event listeners -7476 2 0.0%
vue-zoom-out-idle: avg frame time 18ms 0ms 2.2%
vue-zoom-out-idle: p95 frame time 17ms 0ms 0.2%
vue-zoom-out-idle: layout duration 0ms 0ms 0.0%
vue-zoom-out-idle: style recalc duration 0ms 0ms 387.3%
vue-zoom-out-idle: layout count 0 0 0.0%
vue-zoom-out-idle: style recalc count 0 0 387.3%
vue-zoom-out-idle: task duration 7594ms 1480ms 19.5%
vue-zoom-out-idle: script duration 130ms 28ms 21.3%
vue-zoom-out-idle: TBT 0ms 0ms 0.0%
vue-zoom-out-idle: heap used 168.7 MB 5.0 MB 2.9%
vue-zoom-out-idle: DOM nodes -0 0 0.0%
vue-zoom-out-idle: event listeners -11 2 0.0%
workflow-execution: avg frame time 17ms 0ms 0.0%
workflow-execution: p95 frame time 17ms 0ms 0.1%
workflow-execution: layout duration 2ms 0ms 26.7%
workflow-execution: style recalc duration 19ms 4ms 21.9%
workflow-execution: layout count 3 1 16.5%
workflow-execution: style recalc count 11 3 23.4%
workflow-execution: task duration 96ms 17ms 17.6%
workflow-execution: script duration 9ms 2ms 18.7%
workflow-execution: TBT 0ms 0ms 0.0%
workflow-execution: heap used 62.7 MB 484.8 KB 0.8%
workflow-execution: DOM nodes 126 5 4.3%
workflow-execution: event listeners 50 13 26.3%
Trend (last 15 commits on main)
Metric Trend Dir Latest
canvas-idle: avg frame time ▃▆▆▃█▃▃█▆▆▁▁▆▃▁ ➡️ 17ms
canvas-idle: p95 frame time ▄▅█▁▄███▄███▅▄▄ ➡️ 17ms
canvas-idle: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
canvas-idle: style recalc duration ▆▆▅▅▆█▇█▅▇▁█▃▄▃ 📉 6ms
canvas-idle: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
canvas-idle: style recalc count ▅▅▄▄▆▅▇▆▄▃▇▁█▇▇ ➡️ 9
canvas-idle: task duration ▄▄▄▃▄▆▄▅▅▇▂█▁▄▁ ➡️ 285ms
canvas-idle: script duration ▃▄▄▃▃▇▄▅▃█▁█▂▃▂ ➡️ 7ms
canvas-idle: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
canvas-idle: heap used ▆▂▆▅█▃▂▆▇▄▂▁▃▁▆ ➡️ 66.6 MB
canvas-idle: DOM nodes ▁▁▁▁█▁█▁▁▁▁▁█▁█ ➡️ -167
canvas-idle: event listeners ▄▃▃▃█▃▇▄▄▃▂▂▇▁█ ➡️ -99
canvas-mouse-sweep: avg frame time ▃▆▁▆▆▅▅█▆▁▅▆█▅▆ ➡️ 17ms
canvas-mouse-sweep: p95 frame time ▁▅█▅▁█▅▁▁▁▁▅▁▁▁ ➡️ 17ms
canvas-mouse-sweep: layout duration ▇▅▇▆▅▇▅▆▆█▁▇▁▆▆ ➡️ 5ms
canvas-mouse-sweep: style recalc duration █▅██▅█▄▆▆█▁█▁▄▄ 📉 25ms
canvas-mouse-sweep: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 14
canvas-mouse-sweep: style recalc count █▄▆▆▆▇▂▄▅█▁█▂▅▂ ➡️ 73
canvas-mouse-sweep: task duration ▆▅▇▆▅▇▃▆▆█▁▇▁▄▁ ➡️ 616ms
canvas-mouse-sweep: script duration ▆▇▆▇▆█▄▇▇▇▁█▂▄▂ 📉 117ms
canvas-mouse-sweep: TBT ▁▁▁▁▁▁▁▁▁▁█▁▁▁▁ 📈 0ms
canvas-mouse-sweep: heap used ▆█▇▇▅▅▆▇█▇▁▇▂▃▅ ➡️ 65.3 MB
canvas-mouse-sweep: DOM nodes ▂▄▂▃▄▄▅▁▅▂▆▃▅▅█ ➡️ -258
canvas-mouse-sweep: event listeners ██▆█▃▆▆█▅▆▁█▁▆▆ ➡️ -164
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 ▅▅▅▅▅▇▄▆▅█▁▇▂▃▄ ➡️ 15ms
canvas-zoom-sweep: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 6
canvas-zoom-sweep: style recalc count ▅▄▅▂▂█▁▄▅▄▂▂▄▄▅ ➡️ 32
canvas-zoom-sweep: task duration ▄▅▄▅▄▇▃▅▅█▁▆▂▃▁ ➡️ 235ms
canvas-zoom-sweep: script duration ▃▃▅▄▃▇▄▄▃█▁▅▂▃▃ ➡️ 10ms
canvas-zoom-sweep: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
canvas-zoom-sweep: heap used ▂▂▂▂▂▁▁▂▂▂▂▂▂▁█ ➡️ 64.7 MB
canvas-zoom-sweep: DOM nodes ▆▃▁▃▃▆▂▅▃▁▅▁▆▅█ ➡️ 77
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 ▄▅▅▇▄▅▄▆▅█▁█▂▃▄ ➡️ 7ms
dom-widget-clipping: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
dom-widget-clipping: style recalc count ▂▃▂▇▁▁▃▃▂▁█▃█▅▆ ➡️ 11
dom-widget-clipping: task duration ▅▆▆▆▅▇▃▆▆█▁▇▂▅▁ ➡️ 306ms
dom-widget-clipping: script duration ▆▇▆▇▆█▄▇▇█▁█▃▅▂ 📉 109ms
dom-widget-clipping: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
dom-widget-clipping: heap used ▃▆▅█▇▁▆▆▇▆▆▆▆▆▇ ➡️ 76.4 MB
dom-widget-clipping: DOM nodes ▂▄▂▇▁▁▃▄▂▁█▄█▅▆ ➡️ 19
dom-widget-clipping: event listeners ██▄█▄█▁█▄█▄███▄ ➡️ 1
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 ▅▂▄▅▅▁▆▃▄▂█▂█▅▇ 📈 8
large-graph-idle: task duration ▄▃▆▄▄▆▄▅▄█▁▅▂▃▁ ➡️ 431ms
large-graph-idle: script duration ▄▄▅▄▃▇▄▆▄█▁▅▂▃▂ ➡️ 27ms
large-graph-idle: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
large-graph-idle: heap used ▄█▆▇▇█▆▇▇▇▂█▁▇▃ ➡️ 76.4 MB
large-graph-idle: DOM nodes ▁▁▃▆▅▁█▂▅▃▇▂▃█▅ ➡️ -247
large-graph-idle: event listeners ▂▄▃▂▃▃▃▃▂█▁▃▁▃▂ ➡️ -171
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 ▆▃▃▂▃▃▅▂▃▃▁▂▁▄█ ➡️ 15ms
large-graph-pan: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
large-graph-pan: style recalc count ▄▄▃▄▄▃▆▃▄▁▆▃█▅▆ ➡️ 68
large-graph-pan: task duration ▆▇▆▆▆█▃▇▇█▁▇▂▅▂ ➡️ 1221ms
large-graph-pan: script duration ▆▇▆▇▇█▃▇▇█▁█▂▅▂ ➡️ 612ms
large-graph-pan: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
large-graph-pan: heap used ▆▇▇▄▆▆▁▇▇▇▇█▅▆▅ ➡️ 73.0 MB
large-graph-pan: DOM nodes █▇▇▆▁▇▂▇▇▇█▁▂▂█ ➡️ -155
large-graph-pan: event listeners ▄▄█▄▁▅▁▄▅█▄█▁▁▄ ➡️ -118
large-graph-zoom: avg frame time ▆▁▃█▃▃▃▁▅▄▁▁▆▃█ ➡️ 17ms
large-graph-zoom: p95 frame time ▃▃▆█▆▃▆▃▆▁▃▃▃▆▃ ➡️ 17ms
large-graph-zoom: layout duration ▅▄▆▄▄▅▄▄▄█▁▄▂▆▆ ➡️ 15ms
large-graph-zoom: style recalc duration ▃▄▄▂▃▃▄▁▃▅▁▅▂▆█ ➡️ 15ms
large-graph-zoom: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 60
large-graph-zoom: style recalc count ▃▅▃▂▄▂▅▁▄▂█▅█▅▇ ➡️ 64
large-graph-zoom: task duration ▅▆▆▅▆▆▄▆▆█▁▇▂▅▂ ➡️ 1261ms
large-graph-zoom: script duration ▆▆▆▆▆▇▄▆▇█▁▆▂▅▂ 📉 554ms
large-graph-zoom: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
large-graph-zoom: heap used ▆▂▄▄▁▅▅▅▄▄█▄▂▄▅ ➡️ 71.1 MB
large-graph-zoom: DOM nodes ▆▃▆▃▃█▃▃▁▅█▁▃▃▃ 📈 -167
large-graph-zoom: event listeners █▃▆▆▃█▃█▃██▁▃▃▃ 📈 -117
legacy-node-drag: avg frame time ▃▁▁▃▆▆▃▆█▃▆▁▆▆▆ ➡️ 17ms
legacy-node-drag: p95 frame time ▁▅▁▁▁▁█▁▁▁▁▁▁█▁ ➡️ 17ms
legacy-node-drag: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
legacy-node-drag: style recalc duration ▂▅▄▅▃▆▄▄▆▅▃▁▄▇█ ➡️ 8ms
legacy-node-drag: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
legacy-node-drag: style recalc count ▁▃▁▃▃▃▃▃▃▂█▁█▅▅ ➡️ 44
legacy-node-drag: task duration ▆▆▆▅▆▇▄▆▆█▁▆▂▅▂ ➡️ 1377ms
legacy-node-drag: script duration ▆▆▆▆▆▇▄▆▆█▁▆▂▅▃ 📉 696ms
legacy-node-drag: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
legacy-node-drag: heap used ▇▅█▃▄▆▁▇▅▇▂▇▄▆▄ ➡️ 76.8 MB
legacy-node-drag: DOM nodes █▄█▁▄▁█▁▅▅▅█▅▂█ 📉 7
legacy-node-drag: event listeners █▄█▁█▁█▄▄▄▄█▄▁█ ➡️ 185
minimap-idle: avg frame time ▃▆▃▃▁▃▆▃▁▁▁▁▁▃█ ➡️ 17ms
minimap-idle: p95 frame time ██▄▅█▁▄▄█▅██▄▅▅ ➡️ 17ms
minimap-idle: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
minimap-idle: style recalc duration ▄▁▅▅▆▂▇▅▄▄▃▃▃▄█ ➡️ 7ms
minimap-idle: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
minimap-idle: style recalc count ▃▁▃▃▄▁▆▂▃▂█▂▆▅█ 📈 8
minimap-idle: task duration ▄▃▅▃▄▆▄▄▄█▁▅▂▄▁ ➡️ 421ms
minimap-idle: script duration ▄▄▅▅▄▇▄▄▄█▁▇▃▄▂ ➡️ 27ms
minimap-idle: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
minimap-idle: heap used ▅█▅▅▇▇▁▆▆▆▄█▃▃▂ ➡️ 75.9 MB
minimap-idle: DOM nodes █▁▁▁▂▁▁▁▁▁▂▁▁▁▂ ➡️ -248
minimap-idle: event listeners ▇█▂▂▃▄▁▂▃▂▁▃▇▂▂ ➡️ -171
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 ▅▆▆▅▅▇▅▆▆█▁▇▂▄▆ ➡️ 11ms
subgraph-dom-widget-clipping: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
subgraph-dom-widget-clipping: style recalc count ▄▄▃▃▅▄▄▄▅▄▅▁▃▄█ ➡️ 48
subgraph-dom-widget-clipping: task duration ▅▆▆▅▅▇▄▆▆█▁█▃▅▂ ➡️ 282ms
subgraph-dom-widget-clipping: script duration ▆▆▇▆▆▇▄▇▇█▁█▃▅▂ ➡️ 97ms
subgraph-dom-widget-clipping: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
subgraph-dom-widget-clipping: heap used ▂▃▃▃▂▂▂▁▃▄▂▂█▃▃ ➡️ 73.3 MB
subgraph-dom-widget-clipping: DOM nodes ▅▅▃▃▆▅▅▄▆▅▆▁▃▅█ ➡️ 22
subgraph-dom-widget-clipping: event listeners ██▄██▁█▄██▄▄▁█▁ ➡️ 7
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 ▄▄▅▄▄▇▃▅▅█▁▆▃▄▁ ➡️ 319ms
subgraph-idle: script duration ▂▂▅▃▂█▄▅▂█▁▅▁▃▂ ➡️ 7ms
subgraph-idle: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
subgraph-idle: heap used ▆▆▇▇▃█▆▂▅▇▁▆▂█▁ ➡️ 55.2 MB
subgraph-idle: DOM nodes ▁▁▁▁▁▁▁▁▁▁▁▁▁▁█ ➡️ -176
subgraph-idle: event listeners ▆▆█▆▄█▆▆██▁█▂█▂ ➡️ -229
subgraph-mouse-sweep: avg frame time ▄▆▆█▆█▄▆▁▄█▆▆▅▄ ➡️ 17ms
subgraph-mouse-sweep: p95 frame time ▁█▅█▄▅██▄▄█▁█▄█ ➡️ 17ms
subgraph-mouse-sweep: layout duration ▅▄▆▄▄▅▄▄▄█▂▄▁▃▆ ➡️ 6ms
subgraph-mouse-sweep: style recalc duration ▄▄▅▄▄▅▄▄▄█▁▅▁▂▄ ➡️ 27ms
subgraph-mouse-sweep: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 18
subgraph-mouse-sweep: style recalc count ▆▂▆▅▂▂▃▂▂█▃▁▅▂▁ ➡️ 77
subgraph-mouse-sweep: task duration ▄▅▆▅▅▇▃▆▅█▁▅▁▄▂ ➡️ 619ms
subgraph-mouse-sweep: script duration ▅▆▆▆▆▇▄▇▆█▁▇▁▃▄ 📉 94ms
subgraph-mouse-sweep: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
subgraph-mouse-sweep: heap used ▅▇▅▅▆▄▁▂▇▇▄█▇▄▆ ➡️ 67.3 MB
subgraph-mouse-sweep: DOM nodes ▅▂▇▅▃▂▅▁▃▃▇▁▇▇█ ➡️ -273
subgraph-mouse-sweep: event listeners ▄█▄▆▄▆▂▁▆█▄█▆▄▆ ➡️ -210
subgraph-transition-enter: avg frame time ▁▁█▅▅▁▅█▅▅▁▁▅▅█ ➡️ 17ms
subgraph-transition-enter: p95 frame time ▁█▁█▁▁▁██▁██▁█▁ ➡️ 17ms
subgraph-transition-enter: layout duration ▄▅▄▅▅▅▃▅▅▅▁█▂▃▁ 📉 8ms
subgraph-transition-enter: style recalc duration ▅▇▆▆▆▇▃▇▆▇▁█▂▅▁ 📉 20ms
subgraph-transition-enter: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 5
subgraph-transition-enter: style recalc count ▆▅▁▅▅▃▅▅▆▅█▅▅▅▆ ➡️ 18
subgraph-transition-enter: task duration ▄▄▆▆▅▇▄▅▆█▁▇▃▅▂ ➡️ 569ms
subgraph-transition-enter: script duration ▃▄▅▅▅▆▂▄▆█▁▆▂▅▂ ➡️ 23ms
subgraph-transition-enter: TBT ▆▇▅▆▆▇▃▇▇▆▃█▅▆▁ ➡️ 67ms
subgraph-transition-enter: heap used ▆▁█▁▆▇▁▁▁▇▁▆▆▆█ ➡️ 101.6 MB
subgraph-transition-enter: DOM nodes ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 13587
subgraph-transition-enter: event listeners ▁▁█▁██▁▁▁█▁▁▁█▁ ➡️ 2385
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 ▆▅▆▅▄▆▆▆▅█▁▆▂▆█ ➡️ 43ms
viewport-pan-sweep: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
viewport-pan-sweep: style recalc count ▅▄▂▂▃▂▅▄▂▁▅▂█▄▇ ➡️ 249
viewport-pan-sweep: task duration ▅▆▇▆▅▇▄▇▆█▁▇▃▅▂ ➡️ 4189ms
viewport-pan-sweep: script duration ▆▇▇▇▇█▄▇▇█▁█▃▅▃ 📉 2032ms
viewport-pan-sweep: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
viewport-pan-sweep: heap used ▅▃▅▅▅█▂█▁▅▃▆▃▁▃ ➡️ 67.4 MB
viewport-pan-sweep: DOM nodes ▁▂▃▃▁▂▂▅▄▂▆▁█▂▇ ➡️ -225
viewport-pan-sweep: event listeners ▁█▄▆▆▆▆▁▃▆▆▄▄▆▄ ➡️ -155
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 ▇▆▇▆▅▇▅▇▆█▁▇▃▅▃ 📉 11464ms
vue-large-graph-idle: script duration ▆▅▆▆▅▇▄▅▆█▁▆▃▄▂ 📉 172ms
vue-large-graph-idle: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
vue-large-graph-idle: heap used ▄▄█▄▆▄▇▅▂▅▃▁▄▁█ ➡️ 180.8 MB
vue-large-graph-idle: DOM nodes ███▁▇███▇█▇█▇█▇ ➡️ -6543
vue-large-graph-idle: event listeners ▃▄▃▁▃▃█▃▄▃▂▃▃▃▃ ➡️ -7479
vue-large-graph-pan: avg frame time ▇▆▆▄▆▇▃▅▅█▁▅▃▇▂ ➡️ 17ms
vue-large-graph-pan: p95 frame time ▃█████▆██▆▃▆▆▆▁ ➡️ 17ms
vue-large-graph-pan: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
vue-large-graph-pan: style recalc duration ▄▂▅▂▃▅▂▃▃█▁▄▁▃▁ ➡️ 14ms
vue-large-graph-pan: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
vue-large-graph-pan: style recalc count ▇▇▇▅▇▇▃▅▇█▁▇▁▅▁ 📉 68
vue-large-graph-pan: task duration ▆▅▇▅▆▆▃▅▆█▁▆▂▄▂ 📉 13952ms
vue-large-graph-pan: script duration ▆▅▇▅▆▇▃▇▇█▁▆▃▅▁ ➡️ 643ms
vue-large-graph-pan: TBT ▃▃▅▂▁▃▁▄▃█▁▃▁▁▁ ➡️ 27ms
vue-large-graph-pan: heap used ▄▃▇█▁▅▄▅▅▇▆▇▃▅▄ ➡️ 166.9 MB
vue-large-graph-pan: DOM nodes ▇███▁▁███▇▇██▇▇ ➡️ -6543
vue-large-graph-pan: event listeners ▇█▇▇▇▁▆▇██▆▇▆▇▆ ➡️ -7477
vue-node-resize-workload: avg frame time █▆█▆▇███▆█▁█▃▄▃ ➡️ 17ms
vue-node-resize-workload: p95 frame time ▁▄██▁█▁▄██▄▄█▄▅ ➡️ 17ms
vue-node-resize-workload: layout duration ▄▃▅▃▃▄▃▃▄█▁▅▂▄▅ ➡️ 26ms
vue-node-resize-workload: style recalc duration ▆▇▆█▇▇▄▇██▁█▃▅▂ ➡️ 59ms
vue-node-resize-workload: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 20
vue-node-resize-workload: style recalc count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 20
vue-node-resize-workload: task duration ▇▆▇▆▆▇▅▇▆█▁▇▃▄▃ 📉 3955ms
vue-node-resize-workload: script duration ▆▅▇▅▆▇▆▆▆█▁▇▃▅▂ 📉 65ms
vue-node-resize-workload: TBT ▇▅█▅▆▇▅▇▆█▁▇▁▂▂ 📉 85ms
vue-node-resize-workload: heap used ▂▇▅▃█▁▁▄▂▄▄▃▃▂▆ ➡️ 177.3 MB
vue-node-resize-workload: DOM nodes ███▅██████▁█▅█▇ ➡️ -6542
vue-node-resize-workload: event listeners ▆▄▅▃█▇▆▅▄▇▁▅▃▂▄ ➡️ -7477
vue-zoom-out-idle: avg frame time ▆▅▇▆▄▆▄▆▆▅▁█▃▅▃ ➡️ 17ms
vue-zoom-out-idle: p95 frame time ▆█▃▆▆█▆▆██▁█▆▃▆ ➡️ 17ms
vue-zoom-out-idle: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
vue-zoom-out-idle: style recalc duration ▁▁▁▁▁▁▁▁▁▁█▁▁▁▁ 📈 0ms
vue-zoom-out-idle: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
vue-zoom-out-idle: style recalc count ▁▁▁▁▁▁▁▁▁▁█▁▁▁▁ 📈 0
vue-zoom-out-idle: task duration █▇█▇▇█▆▇▇█▁█▄▅▄ 📉 5905ms
vue-zoom-out-idle: script duration ▇▆▇▆▆▇▅█▇█▁▇▄▅▄ 📉 103ms
vue-zoom-out-idle: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
vue-zoom-out-idle: heap used ▄█▅▄▆▃▄▄▅▂▄▄▅▁▅ ➡️ 172.4 MB
vue-zoom-out-idle: DOM nodes ██▁████████████ 📉 0
vue-zoom-out-idle: event listeners ▄▃▃▃▃▄▅▁▅▃█▃▅▆▇ 📉 -9
workflow-execution: avg frame time ▆▃▃▃█▃▃▃▃█▁▃▁▆▁ ➡️ 17ms
workflow-execution: p95 frame time ▁▁▁▁▁▅▅▁▁▁█▁▁▅▁ ➡️ 17ms
workflow-execution: layout duration ▅▅▅▁▃▃▃▃▂█▁▃▃▂▁ ➡️ 1ms
workflow-execution: style recalc duration ▄▅▆▃▄▅▅▄▄█▁▅▅▃▂ ➡️ 14ms
workflow-execution: layout count ▇▆▆▁▃▅▆▂▂█▅▃▅▃▃ ➡️ 3
workflow-execution: style recalc count ▄▅▄▁▃▄▆▄▂▅▂▃█▄▂ ➡️ 8
workflow-execution: task duration ▅▆▆▃▄▆▅▅▄█▁▅▅▄▂ ➡️ 69ms
workflow-execution: script duration ▄▆▆▂▃▅▅▅▃█▁▃▅▄▁ ➡️ 6ms
workflow-execution: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
workflow-execution: heap used ▃▅▃▁▃▅▆▃▃▅▃▃█▅▃ ➡️ 62.5 MB
workflow-execution: DOM nodes ██▄▃▅▃█▆▁▇▅▂█▃▅ ➡️ 126
workflow-execution: event listeners ▃▆▅▁▄▅▇▄▃▅▄▃█▆▄ ➡️ 44
Raw data
{
  "timestamp": "2026-09-15T18:51:14.951Z",
  "gitSha": "58d4f207e5403b3f6541f2a3f1d993f96ac76844",
  "branch": "jaewon/fe-2215-phase-4-new-view-package-for-billing-composables-and",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2021.489000000031,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 9.061,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 582.931,
      "heapDeltaBytes": 7927572,
      "heapUsedBytes": 70173948,
      "domNodes": -263,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 11.315999999999999,
      "eventListeners": -154,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-idle",
      "durationMs": 2017.3849999999902,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 5.011000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 375.28599999999994,
      "heapDeltaBytes": 8764212,
      "heapUsedBytes": 70226200,
      "domNodes": -266,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 10.005999999999997,
      "eventListeners": -154,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1856.5919999999778,
      "styleRecalcs": 76,
      "styleRecalcDurationMs": 33.279999999999994,
      "layouts": 14,
      "layoutDurationMs": 4.717,
      "taskDurationMs": 886.447,
      "heapDeltaBytes": 18390404,
      "heapUsedBytes": 79939040,
      "domNodes": -261,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 155.702,
      "eventListeners": -156,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1906.7079999999805,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 34.81400000000001,
      "layouts": 14,
      "layoutDurationMs": 5.1770000000000005,
      "taskDurationMs": 955.7170000000001,
      "heapDeltaBytes": -110308,
      "heapUsedBytes": 62301744,
      "domNodes": -264,
      "jsHeapTotalBytes": 5758976,
      "scriptDurationMs": 166.375,
      "eventListeners": -184,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1734.5340000000533,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 17.429999999999996,
      "layouts": 6,
      "layoutDurationMs": 1.427,
      "taskDurationMs": 384.10999999999996,
      "heapDeltaBytes": 2184280,
      "heapUsedBytes": 64388452,
      "domNodes": 75,
      "jsHeapTotalBytes": 4980736,
      "scriptDurationMs": 14.286,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1707.928000000038,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 14.571000000000002,
      "layouts": 6,
      "layoutDurationMs": 1.3280000000000003,
      "taskDurationMs": 343.055,
      "heapDeltaBytes": 2164884,
      "heapUsedBytes": 64461168,
      "domNodes": 74,
      "jsHeapTotalBytes": 4980736,
      "scriptDurationMs": 11.916999999999996,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 676.7679999999814,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 8.259999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 457.98999999999995,
      "heapDeltaBytes": 17810152,
      "heapUsedBytes": 80140624,
      "domNodes": 18,
      "jsHeapTotalBytes": 5767168,
      "scriptDurationMs": 165.445,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 681.7049999999654,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 7.787000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 445.671,
      "heapDeltaBytes": 18169908,
      "heapUsedBytes": 80167440,
      "domNodes": 18,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 158.709,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2034.1119999999933,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 5.8180000000000005,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 611.1139999999999,
      "heapDeltaBytes": 2471024,
      "heapUsedBytes": 82379508,
      "domNodes": -247,
      "jsHeapTotalBytes": -1056768,
      "scriptDurationMs": 35.25399999999999,
      "eventListeners": -154,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2021.3119999999662,
      "styleRecalcs": 4,
      "styleRecalcDurationMs": 3.5330000000000013,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 589.862,
      "heapDeltaBytes": 3246880,
      "heapUsedBytes": 83192404,
      "domNodes": -250,
      "jsHeapTotalBytes": -270336,
      "scriptDurationMs": 34.535999999999994,
      "eventListeners": -152,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2302.7999999999906,
      "styleRecalcs": 67,
      "styleRecalcDurationMs": 13.667000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1666.739,
      "heapDeltaBytes": -553712,
      "heapUsedBytes": 79944040,
      "domNodes": -248,
      "jsHeapTotalBytes": 1527808,
      "scriptDurationMs": 843.466,
      "eventListeners": -152,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2277.310000000057,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 12.503000000000004,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1649.357,
      "heapDeltaBytes": -1233000,
      "heapUsedBytes": 79081024,
      "domNodes": -250,
      "jsHeapTotalBytes": 479232,
      "scriptDurationMs": 818.276,
      "eventListeners": -152,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3638.4419999999977,
      "styleRecalcs": 61,
      "styleRecalcDurationMs": 12.489999999999998,
      "layouts": 60,
      "layoutDurationMs": 15.323000000000002,
      "taskDurationMs": 1760.08,
      "heapDeltaBytes": 9826264,
      "heapUsedBytes": 74962420,
      "domNodes": -258,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 805.809,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3662.0869999999286,
      "styleRecalcs": 60,
      "styleRecalcDurationMs": 11.629000000000001,
      "layouts": 60,
      "layoutDurationMs": 15.633999999999999,
      "taskDurationMs": 1763.1800000000003,
      "heapDeltaBytes": 9770364,
      "heapUsedBytes": 74977260,
      "domNodes": -257,
      "jsHeapTotalBytes": 524288,
      "scriptDurationMs": 809.778,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3099.3070000000102,
      "styleRecalcs": 41,
      "styleRecalcDurationMs": 6.378000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1909.0929999999998,
      "heapDeltaBytes": 20005748,
      "heapUsedBytes": 88194868,
      "domNodes": 2,
      "jsHeapTotalBytes": 942080,
      "scriptDurationMs": 974.7220000000001,
      "eventListeners": 188,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666696,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3163.1450000000996,
      "styleRecalcs": 40,
      "styleRecalcDurationMs": 6.223999999999997,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2041.0469999999998,
      "heapDeltaBytes": 17925248,
      "heapUsedBytes": 83988360,
      "domNodes": 0,
      "jsHeapTotalBytes": 1990656,
      "scriptDurationMs": 1034.092,
      "eventListeners": 188,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666696,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2021.3660000000004,
      "styleRecalcs": 4,
      "styleRecalcDurationMs": 3.540999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 626.5250000000001,
      "heapDeltaBytes": 19760972,
      "heapUsedBytes": 83809388,
      "domNodes": -253,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 43.13600000000001,
      "eventListeners": -154,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2020.6849999999577,
      "styleRecalcs": 5,
      "styleRecalcDurationMs": 4.258999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 579.338,
      "heapDeltaBytes": -3115316,
      "heapUsedBytes": 84151932,
      "domNodes": -250,
      "jsHeapTotalBytes": -1019904,
      "scriptDurationMs": 36.836999999999996,
      "eventListeners": -154,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 601.6190000000279,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 10.328000000000003,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 411.3190000000001,
      "heapDeltaBytes": 13609840,
      "heapUsedBytes": 76990260,
      "domNodes": 18,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 145.59999999999997,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 639.6570000000565,
      "styleRecalcs": 48,
      "styleRecalcDurationMs": 13.377,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 447.85299999999995,
      "heapDeltaBytes": 13773692,
      "heapUsedBytes": 77357052,
      "domNodes": 22,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 156.058,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2022.717,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 10.012,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 558.701,
      "heapDeltaBytes": 4612500,
      "heapUsedBytes": 67990300,
      "domNodes": -276,
      "jsHeapTotalBytes": 5234688,
      "scriptDurationMs": 11.074,
      "eventListeners": -230,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2014.0390000000252,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 8.713999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 544.365,
      "heapDeltaBytes": 15741752,
      "heapUsedBytes": 78894496,
      "domNodes": -278,
      "jsHeapTotalBytes": 4710400,
      "scriptDurationMs": 11.042,
      "eventListeners": -200,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1715.4449999999883,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 30.926,
      "layouts": 18,
      "layoutDurationMs": 6.235000000000001,
      "taskDurationMs": 828.3109999999999,
      "heapDeltaBytes": 14728376,
      "heapUsedBytes": 77984752,
      "domNodes": -276,
      "jsHeapTotalBytes": 5234688,
      "scriptDurationMs": 113.24000000000001,
      "eventListeners": -200,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1720.715000000041,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 28.578999999999997,
      "layouts": 18,
      "layoutDurationMs": 6.275000000000001,
      "taskDurationMs": 833.7809999999998,
      "heapDeltaBytes": -69708,
      "heapUsedBytes": 63390880,
      "domNodes": -276,
      "jsHeapTotalBytes": 6021120,
      "scriptDurationMs": 115.73400000000001,
      "eventListeners": -232,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 1368.7049999999772,
      "styleRecalcs": 17,
      "styleRecalcDurationMs": 28.406999999999996,
      "layouts": 5,
      "layoutDurationMs": 12.298,
      "taskDurationMs": 959.6710000000002,
      "heapDeltaBytes": 19306580,
      "heapUsedBytes": 100696160,
      "domNodes": 13587,
      "jsHeapTotalBytes": 10747904,
      "scriptDurationMs": 33.105000000000004,
      "eventListeners": 2387,
      "totalBlockingTimeMs": 129,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8438.592000000028,
      "styleRecalcs": 247,
      "styleRecalcDurationMs": 41.945,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 5965.177,
      "heapDeltaBytes": -3901844,
      "heapUsedBytes": 75531820,
      "domNodes": -247,
      "jsHeapTotalBytes": -831488,
      "scriptDurationMs": 2750.655,
      "eventListeners": -138,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8444.209,
      "styleRecalcs": 247,
      "styleRecalcDurationMs": 41.855000000000004,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 5810.182999999999,
      "heapDeltaBytes": -14093052,
      "heapUsedBytes": 65888712,
      "domNodes": -250,
      "jsHeapTotalBytes": 516096,
      "scriptDurationMs": 2718.8950000000004,
      "eventListeners": -138,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 18023.37,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17797.543999999998,
      "heapDeltaBytes": -49277512,
      "heapUsedBytes": 165780512,
      "domNodes": -6542,
      "jsHeapTotalBytes": -991232,
      "scriptDurationMs": 353.353,
      "eventListeners": -7476,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 18289.14400000008,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18126.624,
      "heapDeltaBytes": -37611752,
      "heapUsedBytes": 180900204,
      "domNodes": -6542,
      "jsHeapTotalBytes": -2457600,
      "scriptDurationMs": 315.011,
      "eventListeners": -7476,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 22959.666000000027,
      "styleRecalcs": 175,
      "styleRecalcDurationMs": 23.479999999999972,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 22771.894000000004,
      "heapDeltaBytes": -32081060,
      "heapUsedBytes": 185941016,
      "domNodes": -6542,
      "jsHeapTotalBytes": -1339392,
      "scriptDurationMs": 908.7620000000001,
      "eventListeners": -7470,
      "totalBlockingTimeMs": 99,
      "frameDurationMs": 17.77666666666652,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 23337.362999999983,
      "styleRecalcs": 172,
      "styleRecalcDurationMs": 26.157000000000014,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 23244.501,
      "heapDeltaBytes": -34980984,
      "heapUsedBytes": 186301048,
      "domNodes": -6542,
      "jsHeapTotalBytes": -389120,
      "scriptDurationMs": 962.717,
      "eventListeners": -7474,
      "totalBlockingTimeMs": 290,
      "frameDurationMs": 17.77666666666652,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 6717.0209999999315,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 74.10299999999998,
      "layouts": 20,
      "layoutDurationMs": 25.868000000000002,
      "taskDurationMs": 6690.811,
      "heapDeltaBytes": -14439848,
      "heapUsedBytes": 187827212,
      "domNodes": -6542,
      "jsHeapTotalBytes": 11739136,
      "scriptDurationMs": 125.58900000000001,
      "eventListeners": -7476,
      "totalBlockingTimeMs": 552,
      "frameDurationMs": 18.333333333333332,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 6601.057999999966,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 75.19300000000001,
      "layouts": 20,
      "layoutDurationMs": 26.579000000000004,
      "taskDurationMs": 6578.164999999999,
      "heapDeltaBytes": -27615628,
      "heapUsedBytes": 174407680,
      "domNodes": -6542,
      "jsHeapTotalBytes": 20914176,
      "scriptDurationMs": 124.541,
      "eventListeners": -7474,
      "totalBlockingTimeMs": 505,
      "frameDurationMs": 17.780000000000047,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 9046.96899999999,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 8950.157,
      "heapDeltaBytes": 36857668,
      "heapUsedBytes": 192641212,
      "domNodes": 0,
      "jsHeapTotalBytes": -262144,
      "scriptDurationMs": 166.91899999999993,
      "eventListeners": -12,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666763,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 9184.033,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 9093.563000000002,
      "heapDeltaBytes": -20962248,
      "heapUsedBytes": 167216296,
      "domNodes": 0,
      "jsHeapTotalBytes": 2621440,
      "scriptDurationMs": 174.89999999999995,
      "eventListeners": -12,
      "totalBlockingTimeMs": 3,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "workflow-execution",
      "durationMs": 130.67799999998897,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 23.267000000000003,
      "layouts": 5,
      "layoutDurationMs": 2.603,
      "taskDurationMs": 115.33400000000002,
      "heapDeltaBytes": 3298768,
      "heapUsedBytes": 65110168,
      "domNodes": 135,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 16.618000000000002,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "workflow-execution",
      "durationMs": 114.78399999998601,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 16.836,
      "layouts": 3,
      "layoutDurationMs": 1.102,
      "taskDurationMs": 83.52699999999999,
      "heapDeltaBytes": 3018980,
      "heapUsedBytes": 64893172,
      "domNodes": 108,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 7.077000000000002,
      "eventListeners": 33,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    }
  ]
}

🔬 E2E Coverage

Metric Covered Total Pct
Lines 50882 76305 66.7% 🟡
Functions 0 0 — —
Branches 0 0 — —
Top 10 files by uncovered lines
File Coverage Missed
src/LGraphCanvas.ts 67.6% 1157
src/LGraphNode.ts 69.9% 388
src/extensions/core/cameraInfo/CameraInfoViewport.ts 2.0% 343
src/renderer/extensions/layerEditor/composables/useLayerEditorSession.ts 40.1% 332
src/platform/workspace/stores/workspaceAuthStore.ts 33.4% 327
src/platform/workspace/stores/billingOperationStore.ts 7.9% 313
src/LGraph.ts 79.1% 263
src/platform/workspace/stores/teamWorkspaceStore.ts 38.9% 256
src/scripts/app.ts 71.8% 251
src/scripts/pnginfo.ts 21.4% 221

@github-actions github-actions Bot added the risk:xhigh PR risk grade (advisory shadow check; grader-owned) label Sep 14, 2026
@codecov

codecov Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.23711% with 17 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ount-ui/src/billing/__fixtures__/billingHarness.ts 93.44% 3 Missing and 1 partial ⚠️
...ckages/account-ui/src/billing/usePaymentAttempt.ts 90.32% 0 Missing and 3 partials ⚠️
packages/account-ui/src/billing/useTopUp.ts 92.10% 0 Missing and 3 partials ⚠️
packages/account-ui/src/billing/billingClient.ts 80.00% 1 Missing and 1 partial ⚠️
...ages/account-ui/src/billing/useBillingOperation.ts 85.71% 0 Missing and 2 partials ⚠️
packages/account-ui/src/billing/useCheckout.ts 91.66% 1 Missing and 1 partial ⚠️
packages/account-ui/src/billing/useCredits.ts 93.75% 0 Missing and 1 partial ⚠️
@@            Coverage Diff            @@
##             main   #17662     +/-   ##
=========================================
  Coverage   82.52%   82.53%             
=========================================
  Files        2801     2811     +10     
  Lines      140641   140867    +226     
  Branches    37749    35957   -1792     
=========================================
+ Hits       116066   116266    +200     
- Misses      23386    23399     +13     
- Partials     1189     1202     +13     
Flag Coverage Δ
e2e 66.68% <ø> (-0.03%) ⬇️
unit 78.43% <91.23%> (+0.02%) ⬆️
website-unit 74.40% <ø> (+0.06%) ⬆️

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

Files with missing lines Coverage Δ
packages/account-ui/src/billing/useCredits.ts 93.75% <93.75%> (ø)
packages/account-ui/src/billing/billingClient.ts 80.00% <80.00%> (ø)
...ages/account-ui/src/billing/useBillingOperation.ts 85.71% <85.71%> (ø)
packages/account-ui/src/billing/useCheckout.ts 91.66% <91.66%> (ø)
...ckages/account-ui/src/billing/usePaymentAttempt.ts 90.32% <90.32%> (ø)
packages/account-ui/src/billing/useTopUp.ts 92.10% <92.10%> (ø)
...ount-ui/src/billing/__fixtures__/billingHarness.ts 93.44% <93.44%> (ø)

... and 14 files with indirect coverage changes

🚀 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.

@dante01yoon
dante01yoon force-pushed the jaewon/fe-2227-phase3-integration branch from 4c7a54c to 79217c1 Compare September 15, 2026 01:30
@dante01yoon
dante01yoon force-pushed the jaewon/fe-2215-phase-4-new-view-package-for-billing-composables-and branch from 12c696a to 242ec25 Compare September 15, 2026 01:31
dante01yoon added a commit that referenced this pull request Sep 15, 2026
…FE-2214) (#17689)

## Why

FE-2214's done-when says all three current top-up hosts can integrate
the top-up command. #17657 covers ComfyUI_frontend's route (`POST
/api/billing/topup`, an operation to poll). Workshop (`apps/website`)
and Platform ship on the other route, `POST
/api/billing/topup/checkout`: a provider-hosted Checkout session with no
`billing_op_id`, credits landing through a webhook. That route could not
be decoded with generated schemas until the ingest-types regen #17396
merged; it now carries `CreateTopupCheckoutRequest` /
`CreateTopupCheckoutResponse`, so this is the 3A-2 follow-up recorded on
FE-2214.

Stacked on #17657 (FE-2214 top-up command); merge after it.

## How

`createTopupCommand` gains a second method on the same surface,
`createHostedTopupCheckout({ amountCents, returnUrl, signal? })`:

- input is validated by the generated `zCreateTopupCheckoutRequest`;
`INVALID_AMOUNT` / `INVALID_RETURN_URL` are returned before anything is
sent
- the same capability gate as the in-app command (`ACCESS_DENIED`
carrying the server's denial), then the pre-purchase balance is read
- one idempotency key per attempt, in the body and on the request; a 404
maps to `NOT_AVAILABLE` so a host keeps its legacy path while
`topup_checkout_enabled` is off
- `checkout_url` must be https (`validateActionUrl`, the same rule every
lifecycle continuation obeys), otherwise `MALFORMED_RESPONSE`;
`session_id` passes through when present
- nothing is adopted on the lifecycle and no operation id is invented
(FE-2214 invariant): the result is `{ url, sessionId?, baselineMicros?
}`. The host executes its `OpenUrlMode` on `url` (Workshop pre-opens a
tab, Platform redirects) and on return arms the existing
`createBalanceWatch` with `baselineMicros`, which is how the test proves
completion

`readTopupEligibility` (from the fallow split on #17657) now returns the
two failures it can actually produce, which is what lets the hosted
result union exclude `NO_PAYMENT_METHOD`.

## AS-IS / TO-BE

AS-IS: `TopupCommand` exposes `createTopupCheckout` only; Workshop keeps
its own `createTopUpCheckout` fetch with a hand-written `zTopUpCheckout`
schema, and Platform its own.
TO-BE: `TopupCommand` exposes `createHostedTopupCheckout` over the
generated contract; a host adapter is a thin wrapper (validate → gate →
POST → open → balance watch). No UI in this PR, so no screenshots; the
consumer cutover for Workshop is a separate slice.

## Testing

Eight new tests under `createHostedTopupCheckout` in `topup.test.ts`:
success shape, request body and idempotency key, and no lifecycle
operation; `can_top_up` false without a POST; amount and return-URL
rejection without a request; 404 → `NOT_AVAILABLE`; missing or non-https
URL → `MALFORMED_RESPONSE`; optional session id and baseline omitted
when unknown; baseline handed to a balance watch that reconciles on
return; no server or provider text on the failure path. Billing core
suite 187 passing; oxlint, eslint, oxfmt, `vue-tsc` clean.

## Stack (2026-09-15)

Merge top-down. After a parent is squash-merged, rebase each child with
`git rebase --onto origin/main <parent tip>` and force-push; GitHub
retargets the base. Solid edges are code dependencies, dashed edges are
sequencing.

```mermaid
flowchart TD
  P12["Phase 1 + 2 merged<br/>#17436 · #17442 · ingest-types regen #17396"] --> C["FE-2227 Phase 3 core<br/>#17655 · base main"]
  C --> P0["PR 0 coded error bodies + 3DS driver<br/>#17656"]
  P0 --> A["FE-2214 top-up command<br/>#17657"]
  A --> A2["FE-2214 3A-2 hosted top-up checkout<br/>this PR"]
  P0 --> B1["FE-2223 B1 subscription commands<br/>#17658"]
  B1 --> B2["FE-2223 B2 eight-state projection<br/>#17659"]
  A --> I["Integration, do not merge<br/>#17660"]
  B2 --> I
  I --> V1["FE-2215 @comfyorg/account-ui composables<br/>#17662"]
  V1 --> V2["FE-2215 CheckoutSteps<br/>#17663"]
  I --> SES["core: narrowed BillingSession type<br/>#17664"]
  SES --> AD1["FE-2216 slice 1 top-up behind a flag<br/>#17665"]
  A2 -.-> WS["Workshop adapter over createHostedTopupCheckout<br/>later slice"]
  AD1 -.-> AD2["FE-2216 slice 2 subscription<br/>needs previewSubscribe (FE-2331)"]
  AD1 --> E["FE-2217 Phase 6 evidence"]
  BW["billing-web #17370 → #17574"] --> H["FE-2218 Phase 7 separate origin"]
  AD1 --> H
  H --> H8["FE-2331 Phase 8 hosted surfaces"]
```

Design: [Billing SDK implementation plan
(V2)](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8).
Linear: FE-2214.
dante01yoon added a commit that referenced this pull request Sep 15, 2026
…river (FE-2227) (#17656)

## Why

Stacked on #17655 (FE-2227); merge after it. The two Phase 3 command PRs
— top-up ([FE-2214](https://linear.app/comfyorg/issue/FE-2214)) and
subscription ([FE-2223](https://linear.app/comfyorg/issue/FE-2223)) —
both need to act on the server's coded error (`NO_PAYMENT_METHOD`,
`ALREADY_CANCELED`, …) and both need to drive an embedded 3DS challenge
through the lifecycle. FE-2223 may not depend on FE-2214, so the shared
pieces land here, on the core, and each command PR stacks on this one.

## How

- `BillingFailure.serverCode` (additive, optional):
`readValidatedBillingResponse` decodes a non-2xx body with the generated
`zErrorResponse` and carries only its `code`. The `message` is read by
the schema and dropped in `billingErrorBody.ts`, so server text still
cannot travel into the SDK. The codes are `z.string()` in the generated
contract, so each command owns a closed allowlist of the codes it acts
on.
- `driveEmbeddedChallenge(lifecycle, operationId, port)`:
`reportChallengeStarted` → `port.handleNextAction(clientSecret)` →
`reportChallengeSettled`. The port is Stripe's `handleNextAction` shape;
no provider SDK is imported in core, the host injects the object. The
unmoved-intent denylist (`requires_payment_method | requires_action |
canceled` → failed) is ported from
`billingOperationStore.runPaymentIntentAction` on this repo's `main`
(`src/platform/workspace/stores/billingOperationStore.ts:51-55`, `:555`;
landed in `a39b1ce9fa3`, 2026-09-03 — it is not in `cf-main`), and fails
toward the server: an unknown status reports completed and the next poll
corrects it.

## AS-IS / TO-BE

AS-IS: a command sees only `REQUEST_FAILED` + `httpStatus` for a 4xx and
cannot tell "no payment method" from "declined"; each command PR would
re-implement the 3DS drive over `reportChallenge*`.
TO-BE: `result.serverCode === 'NO_PAYMENT_METHOD'` is one comparison;
the challenge drive is one call. No UI surface, so no screenshots.

## Testing

`packages/account` 473/473. Named tests: coded error carried without its
message; non-contract error body yields no code; moved intent →
completed; error / unmoved intent / throw → failed; nothing driven
without a required embedded challenge.

## Stack (2026-09-14)

Merge top-down. After a parent is squash-merged, rebase each child with
`git rebase --onto origin/main <parent tip>` and force-push; GitHub
retargets the base. Solid edges are code dependencies, dashed edges are
sequencing.

```mermaid
flowchart TD
  P12["Phase 1 + 2 merged<br/>#17436 · #17442"] --> C["FE-2227 Phase 3 core<br/>#17655 · base main"]
  C --> P0["PR 0 coded error bodies + 3DS driver<br/>#17656"]
  P0 --> A["FE-2214 top-up command<br/>#17657"]
  P0 --> B1["FE-2223 B1 subscription commands<br/>#17658"]
  B1 --> B2["FE-2223 B2 eight-state projection<br/>#17659"]
  A --> I["Integration, do not merge<br/>#17660"]
  B2 --> I
  I --> V1["FE-2215 @comfyorg/account-ui composables<br/>#17662"]
  V1 --> V2["FE-2215 CheckoutSteps<br/>#17663"]
  I --> SES["core: narrowed BillingSession type<br/>#17664"]
  SES --> AD1["FE-2216 slice 1 top-up behind a flag<br/>#17665"]
  AD1 -.-> AD2["FE-2216 slice 2 subscription<br/>needs previewSubscribe + plan-change decision"]
  AD1 --> E["FE-2217 Phase 6 evidence"]
  S["FE-2211 salvage tag d059104<br/>before 2026-09-30"] -.-> E
  BW["billing-web #17370 → #17574"] --> H["FE-2218 Phase 7 separate origin"]
  AD1 --> H
  V2 -.-> H
  AD1 -.-> SPLIT["account-core / account-ui rename PR"]
  SPLIT -.-> H
```
dante01yoon added a commit that referenced this pull request Sep 15, 2026
…FE-2214) (#17689)

## Why

FE-2214's done-when says all three current top-up hosts can integrate
the top-up command. #17657 covers ComfyUI_frontend's route (`POST
/api/billing/topup`, an operation to poll). Workshop (`apps/website`)
and Platform ship on the other route, `POST
/api/billing/topup/checkout`: a provider-hosted Checkout session with no
`billing_op_id`, credits landing through a webhook. That route could not
be decoded with generated schemas until the ingest-types regen #17396
merged; it now carries `CreateTopupCheckoutRequest` /
`CreateTopupCheckoutResponse`, so this is the 3A-2 follow-up recorded on
FE-2214.

Stacked on #17657 (FE-2214 top-up command); merge after it.

## How

`createTopupCommand` gains a second method on the same surface,
`createHostedTopupCheckout({ amountCents, returnUrl, signal? })`:

- input is validated by the generated `zCreateTopupCheckoutRequest`;
`INVALID_AMOUNT` / `INVALID_RETURN_URL` are returned before anything is
sent
- the same capability gate as the in-app command (`ACCESS_DENIED`
carrying the server's denial), then the pre-purchase balance is read
- one idempotency key per attempt, in the body and on the request; a 404
maps to `NOT_AVAILABLE` so a host keeps its legacy path while
`topup_checkout_enabled` is off
- `checkout_url` must be https (`validateActionUrl`, the same rule every
lifecycle continuation obeys), otherwise `MALFORMED_RESPONSE`;
`session_id` passes through when present
- nothing is adopted on the lifecycle and no operation id is invented
(FE-2214 invariant): the result is `{ url, sessionId?, baselineMicros?
}`. The host executes its `OpenUrlMode` on `url` (Workshop pre-opens a
tab, Platform redirects) and on return arms the existing
`createBalanceWatch` with `baselineMicros`, which is how the test proves
completion

`readTopupEligibility` (from the fallow split on #17657) now returns the
two failures it can actually produce, which is what lets the hosted
result union exclude `NO_PAYMENT_METHOD`.

## AS-IS / TO-BE

AS-IS: `TopupCommand` exposes `createTopupCheckout` only; Workshop keeps
its own `createTopUpCheckout` fetch with a hand-written `zTopUpCheckout`
schema, and Platform its own.
TO-BE: `TopupCommand` exposes `createHostedTopupCheckout` over the
generated contract; a host adapter is a thin wrapper (validate → gate →
POST → open → balance watch). No UI in this PR, so no screenshots; the
consumer cutover for Workshop is a separate slice.

## Testing

Eight new tests under `createHostedTopupCheckout` in `topup.test.ts`:
success shape, request body and idempotency key, and no lifecycle
operation; `can_top_up` false without a POST; amount and return-URL
rejection without a request; 404 → `NOT_AVAILABLE`; missing or non-https
URL → `MALFORMED_RESPONSE`; optional session id and baseline omitted
when unknown; baseline handed to a balance watch that reconciles on
return; no server or provider text on the failure path. Billing core
suite 187 passing; oxlint, eslint, oxfmt, `vue-tsc` clean.

## Stack (2026-09-15)

Merge top-down. After a parent is squash-merged, rebase each child with
`git rebase --onto origin/main <parent tip>` and force-push; GitHub
retargets the base. Solid edges are code dependencies, dashed edges are
sequencing.

```mermaid
flowchart TD
  P12["Phase 1 + 2 merged<br/>#17436 · #17442 · ingest-types regen #17396"] --> C["FE-2227 Phase 3 core<br/>#17655 · base main"]
  C --> P0["PR 0 coded error bodies + 3DS driver<br/>#17656"]
  P0 --> A["FE-2214 top-up command<br/>#17657"]
  A --> A2["FE-2214 3A-2 hosted top-up checkout<br/>this PR"]
  P0 --> B1["FE-2223 B1 subscription commands<br/>#17658"]
  B1 --> B2["FE-2223 B2 eight-state projection<br/>#17659"]
  A --> I["Integration, do not merge<br/>#17660"]
  B2 --> I
  I --> V1["FE-2215 @comfyorg/account-ui composables<br/>#17662"]
  V1 --> V2["FE-2215 CheckoutSteps<br/>#17663"]
  I --> SES["core: narrowed BillingSession type<br/>#17664"]
  SES --> AD1["FE-2216 slice 1 top-up behind a flag<br/>#17665"]
  A2 -.-> WS["Workshop adapter over createHostedTopupCheckout<br/>later slice"]
  AD1 -.-> AD2["FE-2216 slice 2 subscription<br/>needs previewSubscribe (FE-2331)"]
  AD1 --> E["FE-2217 Phase 6 evidence"]
  BW["billing-web #17370 → #17574"] --> H["FE-2218 Phase 7 separate origin"]
  AD1 --> H
  H --> H8["FE-2331 Phase 8 hosted surfaces"]
```

Design: [Billing SDK implementation plan
(V2)](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8).
Linear: FE-2214.
@dante01yoon
dante01yoon force-pushed the jaewon/fe-2227-phase3-integration branch from d16fadc to 5ced366 Compare September 15, 2026 15:43
@dante01yoon
dante01yoon force-pushed the jaewon/fe-2215-phase-4-new-view-package-for-billing-composables-and branch from 242ec25 to de6515e Compare September 15, 2026 15:43
dante01yoon added a commit that referenced this pull request Sep 15, 2026
)

## Why

Stacked on B1
(`jaewon/fe-2223-phase-3b-subscription-commands-and-eight-state-payment`,
#17658) → PR 0 (`jaewon/fe-2227-core-error-codes-and-challenge-driver`,
#17656) → #17655 (FE-2227); independent of FE-2214; merge after all
parents.

Phase 3B, part 2 of 2: the eight public payment states as a pure
projection of one lifecycle operation, plus the copy keys behind them.
Split out of B1 to keep each PR under the source budget.

- Linear: https://linear.app/comfyorg/issue/FE-2223

## How

New `packages/account/src/core/billing/paymentProjection.ts` and
`paymentCopy.ts` (+ tests), export lines appended to `index.ts`. No
other core file is touched.

`projectPaymentStep(operation | undefined, hostStep: 'select' |
'preview' | 'canceled')` → `{ step, reasonKey?, recoveryAction?,
operationId?, noChargeConfirmed }` over the eight states `select |
preview | verifying | canceled | declined | processing_error |
payment_received_hold | success`.

- No operation → the host's step. Pending: parked on the customer
(`challenge` or `actionUrl`) → `verifying`; a retryable decline
(`declineReason`, or this tab's failed challenge →
`authentication_failed`) → `declined`; otherwise `preview`. `succeeded`
→ `success`; `failed` → `declined`, except `processing_error` /
`generic` → `processing_error`; `timed_out` → `processing_error`
(`generic`); `superseded` → `select`.
- Reason keys are the generated `decline_reason` enum plus
`checkout_expired` and `generic`; copy keys are `billing.reason.<key>`.
No raw text can become a key.
- `paymentCopy.ts` ports the PoC `copy.ts` semantics:
`DEFAULT_PAYMENT_COPY`, `createPaymentCopy(overrides)` where the safety
line `billing.safety.nothing_was_charged` is not host-overridable, and
`paymentCopyKeys(projection)` which names the safety key only for
`canceled` with `noChargeConfirmed`.
- `noChargeConfirmed` is always `false`: the generated contract has no
field that lets a terminal backend result guarantee no current or later
charge (one short comment in code says so). Relates to the BE cancel
endpoint work (BE-10064).

Tests: every projection row (24 via `it.for`, including the host-cancel
precedence rows and a sweep asserting `noChargeConfirmed` is never true
and `payment_received_hold` is never produced) and the copy gate (3,
including the PoC TP-12 port).

## Review focus

Two decisions the plan left open, made here:

1. Lifecycle `reconciliation_needed` projects to `processing_error`
(`generic`) with `operationId` surfaced, not to `payment_received_hold`.
The contract cannot tell "paid, entitlement pending" from "needs a
human"; the id is what support acts on. `payment_received_hold` stays in
the public union and copy table but has no producing row until the
backend distinguishes the two.
2. `canceled` is reached only through the host: `hostStep` accepts
`'canceled'` for a cancel the host observed (closed page, dismissed
challenge). A server verdict (`succeeded`, `failed`,
`reconciliation_needed`) outranks it — a customer who backs out after
the charge went through still sees the result — while pending,
`timed_out`, and `superseded` yield to it.

Ticket vs generated contract:
- `checkout_expired` has no producing row:
`BillingOpStatusResponse.status` has no `expired` value. The key and its
copy are kept for the host and for the backend adding one.
- `noChargeConfirmed` has no source field, so it is a `boolean` that is
always `false` (a literal `false` type makes the copy gate dead by type
and fails `no-unnecessary-condition`).

## AS-IS / TO-BE

No UI surface, no screenshots.

AS-IS: the PoC reducer derived these states from an invented operation
status set (`expired`, `canceled`, `payment_received_hold`) and matched
raw `error_message` text for reasons.

TO-BE: a pure projection over the real `BillingOperationState`; hosts
render `step`/`reasonKey`/`operationId` and localize by copy key.

## Stack (2026-09-14)

Merge top-down. After a parent is squash-merged, rebase each child with
`git rebase --onto origin/main <parent tip>` and force-push; GitHub
retargets the base. Solid edges are code dependencies, dashed edges are
sequencing.

```mermaid
flowchart TD
  P12["Phase 1 + 2 merged<br/>#17436 · #17442"] --> C["FE-2227 Phase 3 core<br/>#17655 · base main"]
  C --> P0["PR 0 coded error bodies + 3DS driver<br/>#17656"]
  P0 --> A["FE-2214 top-up command<br/>#17657"]
  P0 --> B1["FE-2223 B1 subscription commands<br/>#17658"]
  B1 --> B2["FE-2223 B2 eight-state projection<br/>#17659"]
  A --> I["Integration, do not merge<br/>#17660"]
  B2 --> I
  I --> V1["FE-2215 @comfyorg/account-ui composables<br/>#17662"]
  V1 --> V2["FE-2215 CheckoutSteps<br/>#17663"]
  I --> SES["core: narrowed BillingSession type<br/>#17664"]
  SES --> AD1["FE-2216 slice 1 top-up behind a flag<br/>#17665"]
  AD1 -.-> AD2["FE-2216 slice 2 subscription<br/>needs previewSubscribe + plan-change decision"]
  AD1 --> E["FE-2217 Phase 6 evidence"]
  S["FE-2211 salvage tag d059104<br/>before 2026-09-30"] -.-> E
  BW["billing-web #17370 → #17574"] --> H["FE-2218 Phase 7 separate origin"]
  AD1 --> H
  V2 -.-> H
  AD1 -.-> SPLIT["account-core / account-ui rename PR"]
  SPLIT -.-> H
```
dante01yoon added a commit that referenced this pull request Sep 15, 2026
…(FE-2223) (#17658)

## Why

```mermaid
flowchart TD
  P12["Phase 1 + 2 merged<br/>#17436 · #17442"] --> C["FE-2227 Phase 3 core<br/>#17655 · base main"]
  C --> P0["PR 0 coded error bodies + 3DS driver<br/>#17656"]
  P0 --> A["FE-2214 top-up command<br/>#17657"]
  P0 --> B1["FE-2223 B1 subscription commands<br/>#17658"]
  B1 --> B2["FE-2223 B2 eight-state projection<br/>#17659"]
  A --> I["Integration, do not merge<br/>#17660"]
  B2 --> I
  I --> V1["FE-2215 @comfyorg/account-ui composables<br/>#17662"]
  V1 --> V2["FE-2215 CheckoutSteps<br/>#17663"]
  I --> SES["core: narrowed BillingSession type<br/>#17664"]
  SES --> AD1["FE-2216 slice 1 top-up behind a flag<br/>#17665"]
  AD1 -.-> AD2["FE-2216 slice 2 subscription<br/>needs previewSubscribe + plan-change decision"]
  AD1 --> E["FE-2217 Phase 6 evidence"]
  S["FE-2211 salvage tag d059104<br/>before 2026-09-30"] -.-> E
  BW["billing-web #17370 → #17574"] --> H["FE-2218 Phase 7 separate origin"]
  AD1 --> H
  V2 -.-> H
  AD1 -.-> SPLIT["account-core / account-ui rename PR"]
  SPLIT -.-> H
```


Stacked on PR 0 (`jaewon/fe-2227-core-error-codes-and-challenge-driver`,
#17656) → #17655 (FE-2227); independent of FE-2214; merge after both
parents.

Phase 3B, part 1 of 2: the subscription commands ported onto the
SDK-owned billing operation lifecycle. Part 2 (the eight-state payment
projection and copy) is stacked on this PR so each stays under the
source budget.

- Linear: https://linear.app/comfyorg/issue/FE-2223

## How

New `packages/account/src/core/billing/subscriptionCommands.ts` (+
test), export lines appended to `index.ts`. No other core file is
touched.

`createBillingCommands({ transport, lifecycle, statusReader,
capabilities, credits, idempotencyKey? })` returns `subscribe`,
`resubscribe`, `cancelSubscription`, `openPaymentPortal`.

- Every command encodes against the generated contract
(`zSubscribeRequest/Response`, `zResubscribeResponse`,
`zCancelSubscriptionResponse2` = the generated union of
`zCancelSubscriptionResponse | zCancelSubscriptionAcceptedResponse`,
`zPaymentPortalResponse`), reads through `readValidatedBillingResponse`,
and issues through `lifecycle.begin` — single-flight, the status gate,
backend-pending adoption, polling, routing, pointer, recovery, and
telemetry all stay in core. The command then awaits
`lifecycle.settled(id)` and returns the terminal state.
- Eligibility comes from the Phase 2 status snapshot's server fields
only (`is_active`, `subscription_tier`, `subscription_status`): FREE →
subscribe issues; PRO active → subscribe is a no-op success with no
request; PRO canceled → subscribe routes to the resubscribe endpoint.
- Saved payment method: `saved_payment_method_id` XOR
`confirmation_token`, empty strings dropped, both present →
`CONFLICTING_PAYMENT_METHOD` before any request (before the status read
too); a request the generated schema refuses (e.g. an id without the
`pm_` prefix) → `INVALID_REQUEST`, also before any request.
- Response mapping: `subscribed` and resubscribe `active` still adopt
the id so the first poll settles it and invalidation/telemetry are
uniform; `needs_payment_method` hands `payment_method_url` to the
lifecycle as the hosted `actionUrl` (missing →
`MISSING_PAYMENT_METHOD_URL`); `pending_payment` / `pending` / both
cancel shapes → observed to a terminal state. 3DS is driven by the host
through the existing `driveEmbeddedChallenge` while the command awaits
settlement (tested end to end through the real lifecycle).
- Server codes (via `BillingFailure.serverCode`):
`REACTIVATION_CONFIRMATION_REQUIRED` → coded result for the host to
re-preview and resend with `confirm_reactivation`; `ALREADY_CANCELED` /
`NOT_SCHEDULED_FOR_CANCELLATION` from a 4xx → already-in-requested-state
success after a status re-read (a 5xx echoing the code stays a failure,
as in `useWorkspaceBilling.isAlreadyInRequestedState`);
`NO_ACTIVE_SUBSCRIPTION` → coded error. Command-level codes live in
`SubscriptionCommandCode`; `BillingErrorCode` is untouched.
- Every succeeded outcome (settled operation or already-in-state)
invalidates the capabilities read and re-reads credits and status (so
`cancel_at` is available after a cancel). A failed credits read never
turns a success into a failure.
- `idempotency_key` goes in every subscribe/resubscribe/cancel body and
as `idempotencyKey` on the `BillingRequest` (the transport's 401 replay
gate), one key per attempt. The portal request carries neither (the
contract has no key; a portal session is not a mutation).
- `openPaymentPortal` returns `{ url }` after `validateActionUrl` (https
only); the SDK never opens it and does not refresh anything on it.
- Raw server / provider text (`message`, `error_message`) never reaches
a result; asserted in the decline, 5xx, coded-error, and resubscribe
(`message` field) tests.

Tests (32, one per ticket row): the {FREE, PRO active, PRO canceled} ×
{subscribe, resubscribe, cancel, portal} matrix including
subscribe→resubscribe routing; saved payment method (4); 3DS through
`driveEmbeddedChallenge`, hosted page, missing page; declines and
reactivation; both cancel response shapes and the 5xx echo; transport
failure, malformed 2xx, 5xx, failed eligibility read; reconciliation;
and reload/resume, poll timeout, and workspace supersession through the
real lifecycle with fake timers.

## Review focus

- Subscribe reads status once for eligibility and `lifecycle.begin`
reads it again for its own pending gate: two `GET /billing/status` per
subscribe. Avoiding it would need a core change (letting `begin` accept
a status), which this PR deliberately does not make.
- Per the eligibility doc, a PRO-active subscribe is a no-op regardless
of `plan_slug`; a plan change on an active subscription (the app's
`checkoutType: 'change'`) is therefore not reachable through this
command yet. Flagged, not silently decided.
- A `needs_payment_method` without a URL is refused without adopting the
id; the backend still reports it as pending, so the next
`begin`/`recover` adopts it rather than reissuing.

Ticket vs generated contract:
- The ticket's resubscribe "`active` → sync success without an id" is
unreachable: `zResubscribeResponse.billing_op_id` is required, so the id
is adopted uniformly.
- `zPaymentPortalRequest` has no `idempotency_key`; the portal POST is
sent without one.

## AS-IS / TO-BE

No UI surface, no screenshots.

AS-IS: subscription commands live in the cloud app (`workspaceApi`,
`useSubscriptionCheckout`, `useWorkspaceBilling`) with their own
polling, pending-checkout storage, and error-string handling.

TO-BE: `@comfyorg/account/billing` exports `createBillingCommands`;
hosts issue commands and render the lifecycle state, never own the
machine, and never see server text.

## Stack (2026-09-14)

Merge top-down. After a parent is squash-merged, rebase each child with
`git rebase --onto origin/main <parent tip>` and force-push; GitHub
retargets the base. Solid edges are code dependencies, dashed edges are
sequencing.

```mermaid
flowchart TD
  P12["Phase 1 + 2 merged<br/>#17436 · #17442"] --> C["FE-2227 Phase 3 core<br/>#17655 · base main"]
  C --> P0["PR 0 coded error bodies + 3DS driver<br/>#17656"]
  P0 --> A["FE-2214 top-up command<br/>#17657"]
  P0 --> B1["FE-2223 B1 subscription commands<br/>#17658"]
  B1 --> B2["FE-2223 B2 eight-state projection<br/>#17659"]
  A --> I["Integration, do not merge<br/>#17660"]
  B2 --> I
  I --> V1["FE-2215 @comfyorg/account-ui composables<br/>#17662"]
  V1 --> V2["FE-2215 CheckoutSteps<br/>#17663"]
  I --> SES["core: narrowed BillingSession type<br/>#17664"]
  SES --> AD1["FE-2216 slice 1 top-up behind a flag<br/>#17665"]
  AD1 -.-> AD2["FE-2216 slice 2 subscription<br/>needs previewSubscribe + plan-change decision"]
  AD1 --> E["FE-2217 Phase 6 evidence"]
  S["FE-2211 salvage tag d059104<br/>before 2026-09-30"] -.-> E
  BW["billing-web #17370 → #17574"] --> H["FE-2218 Phase 7 separate origin"]
  AD1 --> H
  V2 -.-> H
  AD1 -.-> SPLIT["account-core / account-ui rename PR"]
  SPLIT -.-> H
```
dante01yoon added a commit that referenced this pull request Sep 15, 2026
…FE-2214) (#17689)

FE-2214's done-when says all three current top-up hosts can integrate
the top-up command. #17657 covers ComfyUI_frontend's route (`POST
/api/billing/topup`, an operation to poll). Workshop (`apps/website`)
and Platform ship on the other route, `POST
/api/billing/topup/checkout`: a provider-hosted Checkout session with no
`billing_op_id`, credits landing through a webhook. That route could not
be decoded with generated schemas until the ingest-types regen #17396
merged; it now carries `CreateTopupCheckoutRequest` /
`CreateTopupCheckoutResponse`, so this is the 3A-2 follow-up recorded on
FE-2214.

Stacked on #17657 (FE-2214 top-up command); merge after it.

`createTopupCommand` gains a second method on the same surface,
`createHostedTopupCheckout({ amountCents, returnUrl, signal? })`:

- input is validated by the generated `zCreateTopupCheckoutRequest`;
`INVALID_AMOUNT` / `INVALID_RETURN_URL` are returned before anything is
sent
- the same capability gate as the in-app command (`ACCESS_DENIED`
carrying the server's denial), then the pre-purchase balance is read
- one idempotency key per attempt, in the body and on the request; a 404
maps to `NOT_AVAILABLE` so a host keeps its legacy path while
`topup_checkout_enabled` is off
- `checkout_url` must be https (`validateActionUrl`, the same rule every
lifecycle continuation obeys), otherwise `MALFORMED_RESPONSE`;
`session_id` passes through when present
- nothing is adopted on the lifecycle and no operation id is invented
(FE-2214 invariant): the result is `{ url, sessionId?, baselineMicros?
}`. The host executes its `OpenUrlMode` on `url` (Workshop pre-opens a
tab, Platform redirects) and on return arms the existing
`createBalanceWatch` with `baselineMicros`, which is how the test proves
completion

`readTopupEligibility` (from the fallow split on #17657) now returns the
two failures it can actually produce, which is what lets the hosted
result union exclude `NO_PAYMENT_METHOD`.

AS-IS: `TopupCommand` exposes `createTopupCheckout` only; Workshop keeps
its own `createTopUpCheckout` fetch with a hand-written `zTopUpCheckout`
schema, and Platform its own.
TO-BE: `TopupCommand` exposes `createHostedTopupCheckout` over the
generated contract; a host adapter is a thin wrapper (validate → gate →
POST → open → balance watch). No UI in this PR, so no screenshots; the
consumer cutover for Workshop is a separate slice.

Eight new tests under `createHostedTopupCheckout` in `topup.test.ts`:
success shape, request body and idempotency key, and no lifecycle
operation; `can_top_up` false without a POST; amount and return-URL
rejection without a request; 404 → `NOT_AVAILABLE`; missing or non-https
URL → `MALFORMED_RESPONSE`; optional session id and baseline omitted
when unknown; baseline handed to a balance watch that reconciles on
return; no server or provider text on the failure path. Billing core
suite 187 passing; oxlint, eslint, oxfmt, `vue-tsc` clean.

Merge top-down. After a parent is squash-merged, rebase each child with
`git rebase --onto origin/main <parent tip>` and force-push; GitHub
retargets the base. Solid edges are code dependencies, dashed edges are
sequencing.

```mermaid
flowchart TD
  P12["Phase 1 + 2 merged<br/>#17436 · #17442 · ingest-types regen #17396"] --> C["FE-2227 Phase 3 core<br/>#17655 · base main"]
  C --> P0["PR 0 coded error bodies + 3DS driver<br/>#17656"]
  P0 --> A["FE-2214 top-up command<br/>#17657"]
  A --> A2["FE-2214 3A-2 hosted top-up checkout<br/>this PR"]
  P0 --> B1["FE-2223 B1 subscription commands<br/>#17658"]
  B1 --> B2["FE-2223 B2 eight-state projection<br/>#17659"]
  A --> I["Integration, do not merge<br/>#17660"]
  B2 --> I
  I --> V1["FE-2215 @comfyorg/account-ui composables<br/>#17662"]
  V1 --> V2["FE-2215 CheckoutSteps<br/>#17663"]
  I --> SES["core: narrowed BillingSession type<br/>#17664"]
  SES --> AD1["FE-2216 slice 1 top-up behind a flag<br/>#17665"]
  A2 -.-> WS["Workshop adapter over createHostedTopupCheckout<br/>later slice"]
  AD1 -.-> AD2["FE-2216 slice 2 subscription<br/>needs previewSubscribe (FE-2331)"]
  AD1 --> E["FE-2217 Phase 6 evidence"]
  BW["billing-web #17370 → #17574"] --> H["FE-2218 Phase 7 separate origin"]
  AD1 --> H
  H --> H8["FE-2331 Phase 8 hosted surfaces"]
```

Design: [Billing SDK implementation plan
(V2)](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8).
Linear: FE-2214.
@dante01yoon
dante01yoon force-pushed the jaewon/fe-2215-phase-4-new-view-package-for-billing-composables-and branch from de6515e to f9a1c37 Compare September 15, 2026 16:31
@dante01yoon
dante01yoon changed the base branch from jaewon/fe-2227-phase3-integration to jaewon/fe-2214-phase-3a-top-up-command-mapping-on-the-shared-billing September 15, 2026 16:32
Base automatically changed from jaewon/fe-2214-phase-3a-top-up-command-mapping-on-the-shared-billing to jaewon/fe-2227-phase-3-core-sdk-owned-billing-operation-lifecycle-routing September 15, 2026 16:58
dante01yoon added a commit that referenced this pull request Sep 15, 2026
…4) (#17657)

## Why

Stacked on PR 0 (`jaewon/fe-2227-core-error-codes-and-challenge-driver`,
#17656) → #17655 (FE-2227); merge after both.

Phase 3A of the billing SDK: the top-up command mapped onto the shared
operation lifecycle, covering both routes cloud exposes today. Only
request/response mapping lives here — the status-read gate,
single-flight, polling, routing, the pointer, failure meaning, and
telemetry all come from the lifecycle in #17655/#17656 and are not
duplicated.

- Linear: https://linear.app/comfyorg/issue/FE-2214

## How

`packages/account/src/core/billing/topup.ts` — `createTopupCommand({
transport, lifecycle, capabilities, credits, idempotencyKey? })`
returning two commands on one surface:

**`createTopupCheckout({ amountCents, signal? })`** — the in-app route
ComfyUI_frontend uses (`POST /billing/topup`, an operation to observe):

1. `capabilities.read()` → `can_top_up === false` ⇒ `{ status: 'error',
code: 'ACCESS_DENIED', denial? }` without a POST. The server flag is the
only gate; nothing is derived.
2. Amount validated with `zCreateTopupRequest`; the plain input object
is what travels (the schema coerces to bigint, which the transport
cannot serialize).
3. One fresh key per POST attempt, in the body (`idempotency_key`) and
as `idempotencyKey` on the `BillingRequest`. Supplying that key is what
makes the POST replayable at the transport's 401 gate (`replayable =
method === 'GET' || idempotencyKey !== undefined`): the single 401
replay is safe *because* the same key travels in both places for the
backend to deduplicate on. Backend dedup is load-bearing on this route,
not incidental. A fresh key is minted per attempt, so two user-initiated
top-ups never collide.
4. POST through `lifecycle.begin('topup', issue)`; the response is
decoded with `zCreateTopupResponse` and its `billing_op_id` adopted
regardless of `status`, so the first poll settles synchronous results
and carries the coded decline.
5. Command-level `TopupResult` union: `ok` (terminal `succeeded` state
embedded + `creditsReconciled`), `declined` (terminal `failed` state
embedded: `declineReason`, `recoveryAction`, `retryable`), `unsettled`
(`timed_out` / `reconciliation_needed` embedded), plus `error` codes —
the core `BillingErrorCode`s untouched, and `NOT_AVAILABLE` (404 on the
POST), `NO_PAYMENT_METHOD` (`serverCode`, with `recoveryAction:
'replace_payment_method'`), `INVALID_AMOUNT` (below the generated
minimum; nothing sent). A `superseded` operation passes through as
`SUPERSEDED`.
6. On `succeeded`: `capabilities.invalidate()` and a credits re-read;
`creditsReconciled` compares it with the read taken before the POST.

**`createHostedTopupCheckout({ amountCents, returnUrl, signal? })`** —
the hosted route Workshop (`apps/website`) and Platform ship on (`POST
/billing/topup/checkout`, a provider-hosted Checkout session with no
operation; credits land through a webhook). Decodable since the
ingest-types regen #17396 merged:

1. Input validated by the generated `zCreateTopupCheckoutRequest`;
`INVALID_AMOUNT` / `INVALID_RETURN_URL` before anything is sent.
2. The same capability gate, then the pre-purchase balance is read.
3. One idempotency key per attempt, in the body and on the request; 404
→ `NOT_AVAILABLE` so a host keeps its legacy path while
`topup_checkout_enabled` is off.
4. `checkout_url` must be https (`validateActionUrl`, the rule every
lifecycle continuation obeys), otherwise `MALFORMED_RESPONSE`;
`session_id` passes through when present.
5. Nothing is adopted on the lifecycle and no operation id is invented:
the result is `{ url, sessionId?, baselineMicros? }`. The host executes
its `OpenUrlMode` on `url` (Workshop pre-opens a tab, Platform
redirects) and on return arms `createBalanceWatch` with
`baselineMicros`.

`packages/account/src/core/billing/balanceWatch.ts` —
`createBalanceWatch({ credits, baselineMicros? })`, the framework-free
port of `src/composables/billing/topupBalanceRefresh.ts` (gaps `[0, 2,
5, 10, 20]s`, 15-minute lifetime, 5 scheduled runs, a single read per
wake past the cap). No document listeners: the host calls `wake()` from
its own focus/visibility signals. This is the completion path for the
hosted command and the explicit fallback when no `billing_op_id` can be
observed on the in-app one; the SDK never invents one.

Raw server / Stripe text never reaches a result (asserted in the tests).

Contract findings (generated contract wins; for FE-2211's TDD-correction
list):

- The ticket's `returnUrl` and "no `billing_op_id`" rows describe the
hosted route, not `zCreateTopupRequest` (which has only `amount_cents`,
`checkout_attempt_id`, `idempotency_key`). They are served by
`createHostedTopupCheckout`.
- `zCreateTopupResponse.billing_op_id` is required, so the in-app
command's balance-watch fallback is tested against a
`MALFORMED_RESPONSE` on the POST, not an invented id.
- The plan's `credits.read({ forceRefresh })` does not exist:
`CreditsReader.read` always requests, so it is called plainly.
- `amount_cents` is `z.coerce.bigint()` on both request schemas;
validated with `safeParse`, sent as the number.
- `ErrorResponse.code` is `z.string()`, not an enum, so
`NO_PAYMENT_METHOD` is an SDK-owned allowlist entry.

Tests (`topup.test.ts`, `balanceWatch.test.ts`), one per ticket row for
the in-app command: `can_top_up` false, saved payment method, needs 3DS
(driven through PR 0's `driveEmbeddedChallenge`), no payment method,
declined, unexpected error, payment received with credits pending, 404 →
`NOT_AVAILABLE` (and a 404 while polling left to the lifecycle), fresh
idempotency key per attempt, in the body and on the request,
generated-schema rejection, invalidation on success, scope supersession
passthrough, no-`billing_op_id` balance-watch fallback. For the hosted
command: success shape with request body, idempotency key, and no
lifecycle operation; `can_top_up` false without a POST; amount and
return-URL rejection without a request; 404 → `NOT_AVAILABLE`; missing
or non-https URL → `MALFORMED_RESPONSE`; optional session id and
baseline omitted when unknown; baseline handed to a balance watch that
reconciles on return; no server text on the failure path. Reload/resume,
routing, timeout, and duplicate-poll coverage stays in the core suite.

## AS-IS / TO-BE

No UI surface, no screenshots.

- AS-IS: the SDK exposes the lifecycle but no command issues a top-up on
it; the cloud app's `workspaceApi.createTopup` + `topupBalanceRefresh`,
Workshop's `createTopUpCheckout` fetch with a hand-written schema, and
Platform's own call remain the only paths.
- TO-BE: `@comfyorg/account/billing` exports `createTopupCommand`
(in-app and hosted top-up over the generated contract) and
`createBalanceWatch`; each host adapter is a thin wrapper that reads a
coded, text-free result. Consumer cutovers are separate slices
(ComfyUI_frontend: #17665; Workshop and Platform: later).

## Stack (2026-09-15)

Merge top-down. After a parent is squash-merged, rebase each child with
`git rebase --onto origin/main <parent tip>` and force-push; GitHub
retargets the base. Solid edges are code dependencies, dashed edges are
sequencing. The hosted command (formerly #17689) is squashed into this
PR.

```mermaid
flowchart TD
  P12["Phase 1 + 2 merged<br/>#17436 · #17442 · ingest-types regen #17396"] --> C["FE-2227 Phase 3 core<br/>#17655 · base main"]
  C --> P0["PR 0 coded error bodies + 3DS driver<br/>#17656"]
  P0 --> A["FE-2214 top-up commands, in-app + hosted<br/>#17657"]
  P0 --> B1["FE-2223 B1 subscription commands<br/>#17658"]
  B1 --> B2["FE-2223 B2 eight-state projection<br/>#17659"]
  A --> I["Integration, do not merge<br/>#17660"]
  B2 --> I
  I --> V1["FE-2215 @comfyorg/account-ui composables<br/>#17662"]
  V1 --> V2["FE-2215 CheckoutSteps<br/>#17663"]
  I --> SES["core: narrowed BillingSession type<br/>#17664"]
  SES --> AD1["FE-2216 slice 1 top-up behind a flag<br/>#17665"]
  A -.-> WS["Workshop adapter over createHostedTopupCheckout<br/>consumer slice"]
  AD1 -.-> AD2["FE-2216 slice 2 subscription<br/>needs previewSubscribe (FE-2331)"]
  AD1 --> E["FE-2217 Phase 6 evidence"]
  BW["billing-web #17370 → #17574"] --> H["FE-2218 Phase 7 separate origin"]
  AD1 --> H
  V2 -.-> H
  H --> H8["FE-2331 Phase 8 hosted surfaces"]
```
@dante01yoon
dante01yoon force-pushed the jaewon/fe-2215-phase-4-new-view-package-for-billing-composables-and branch from f9a1c37 to d08dca9 Compare September 15, 2026 16:59

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


source_url: #17662
type: github_pr_review
date_accessed: 2026-09-15
relevance: 5
note: Review posted on PR 17662 (account-ui billing view package, FE-2215) — the host disposal obligation.

Reviewed at the head of the FE-2215 branch. One finding, and it is a consequence of the ownership boundary this PR draws rather than a defect in what it draws.

Worth noting first: the package is named @comfyorg/account-ui, which is exactly the name ADR-007 gave the view half back when it was a plan. The sequencing we recorded — subpath export now, package at Phase 4 — landed as written, and the naming note in the description reasons it out independently. Good outcome for the ADR.

The host now owns disposal, and nothing tells it so

The boundary is right. billingClient.ts states it plainly:

The core objects a host builds once — the lifecycle, the readers, the commands — handed to every composable here either explicitly or through the injection key, so one component tree shares one client.

So the composables never own a reader and must not dispose one; a shared client cannot be torn down by whichever component unmounts first. That is correct, and it is why I stopped looking for onScopeDispose in the composables.

But dispose appears nowhere in this PR — not in a docstring, not in a README, not as a helper. The entry comment covers construction and rendering:

A host builds the core once, provides it, and renders what these expose; routing, windows, dialogs, the payment provider's SDK, and styling all stay with the host.

Construction, yes. Teardown, not mentioned.

That matters because dispose() on these readers is load-bearing rather than hygienic, and specifically so since #17442. The subscription is the only thing that drops a cached snapshot on a scope change, so disposing is what stops a reader serving the previous account's balance and capabilities — it is the fix for the finding we opened this wave with, now behind a lifetime.disposed flag that also stops an in-flight read republishing.

This PR moves the obligation to satisfy that invariant across an ownership boundary, and the documentation does not cross with it. A host that calls provideBillingClient(client) at sign-in and never disposes on sign-out or account switch reproduces the original exposure exactly, one layer up — and it will look correct, because every composable is behaving.

The first consumer is #17665 (FE-2216 slice 1), so this is about to be tested for real.

Two things would close it, and I would do both:

  1. Say it where the client is defined. The BillingClient docstring is the right place — something to the effect that the host owns the lifetime, and must dispose the readers and the lifecycle when the session scope ends, because a retained reader keeps serving the scope it was built for.
  2. Give the host one call. A disposeBillingClient(client) helper next to provideBillingClient means the obligation is discoverable from the same import and cannot be half-satisfied by disposing three of four objects. Right now a host has to know that capabilities, credits and lifecycle each need it and that topup/commands do not.

Verified

  • No serverCode anywhere in the view package. This is the first view layer built on #17656's contract, so it is the first place the "never render it" rule could have been broken, and it is not — the composables surface coded reasonKey / recoveryAction and nothing else.
  • Containment survives the view. The fixtures deliberately seed Stripe text (error_message: 'Your card was declined by Stripe.') and the assertion takes only { step: 'declined', reasonKey: 'card_declined', recoveryAction: 'replace_payment_method' }. Testing the boundary with the real hazard present is the right shape.
  • Balance stays in micros with formatting left to the host and its locale, which keeps the currency decision where the locale is — consistent with what the core does and with the rounding lesson from #17574.
  • vue and @vueuse/core as peers, entry ./billing only, package private — the surface stays narrow.

CI was still settling when I looked; I am reading rather than running, since my worktree cannot resolve zod through these workspace links. Happy to approve once the disposal obligation is stated somewhere a host will find it.

@dante01yoon

Copy link
Copy Markdown
Collaborator Author

Both done in 370ddb3.

Said where the client is defined. The BillingClient docstring now carries the obligation: the host owns the lifetime, composables never dispose what they are handed because a shared client cannot be torn down by whichever component unmounts first, and a retained reader goes on serving the scope it was built for — the previous account's balance and capabilities. The package entry comment gained the missing verb too: a host "builds the core once, provides it, renders what these expose, and disposes it when the session scope ends".

One call. disposeBillingClient(client) sits next to provideBillingClient and is exported from ./billing. It disposes lifecycle, capabilities and credits; its docstring states that topup and commands hold no scope subscription rather than leaving a host to infer which three of the five matter.

New packages/account-ui/src/billing/billingClient.test.ts, two cases, both verified red against a gutted helper before I kept it:

  • stops the readers serving the scope they were built for — after disposal both getSnapshot() return undefined and both read() resolve SUPERSEDED.
  • supersedes the lifecycle so no further operation is issued on the old scope — begin() resolves SUPERSEDED without invoking the issue function and without a POST reaching the transport.

On the first consumer: #17665 does not go through this package. It composes the core directly in createBillingSdk.ts and defines its own four-object dispose() over lifecycle/status/credits/capabilities. Nothing calls it — but that store builds one SDK for the app's lifetime and relies on the readers' own session subscriptions to drop a snapshot on a scope change, so it is not the exposure you described. Flagging it rather than fixing it, since it is another PR in the stack.

#17663 picks this up on its next rebase.

@dante01yoon dante01yoon removed their assignment Sep 15, 2026
Base automatically changed from jaewon/fe-2227-phase-3-core-sdk-owned-billing-operation-lifecycle-routing to main September 15, 2026 17:58
dante01yoon added a commit that referenced this pull request Sep 16, 2026
…own-origin session and v1 surfaces (#17799)

Linear FE-2331.

Stacked on #17798 (readers); carries #17797 (previewSubscribe, now on
main) until #17798 lands. #17807 (billing-web own-origin session +
sign-in) and #17809 (billing-web /v1 surfaces) were squash-merged into
this branch, so this PR is the whole Phase 8 view layer: account-ui
composables, the billing-web session/sign-in, and the subscription /
payment-method surfaces.

The plans catalog, the saved cards and the subscription quote are the
three
reads the hosted billing surfaces are built on, and the core now exposes
all
three. Nothing in the view layer could reach them: `BillingClient`
carried only
the balance, capability and status readers, so a host wanting a price
had to
call the core directly and invent its own loading, failure and
cancellation
handling per screen.

- `BillingClient` gains `plans` and `paymentMethods`;
`disposeBillingClient`
disposes both, so a sign-out or workspace switch cannot leave a catalog
or a
  card list serving the previous scope.
- `usePlans` and `usePaymentMethods` follow `useCredits`: seeded from
the
reader's snapshot, `immediate` by default, and a failed refresh keeps
the last
  good value beside the failure rather than blanking the screen.
`usePaymentMethods` also exposes `defaultMethod` and
`invalidateAndRefresh`,
for a host coming back from the payment portal where a card was added or
  removed.
- `usePreviewSubscribe` is on-demand and single-flight: each `quote`
aborts the
one before it through an `AbortController`, and only the latest settles
into
`preview`/`failure`, so a slow price for a plan the user has moved off
never
  lands on screen.
- The app composition root builds both readers and adds them to
`dispose()`,
keeping the two scope-holder lists in step. Commands stay unwired here.

No UI change. These are headless composables; nothing renders them yet.

`usePlans`, `usePaymentMethods` and `usePreviewSubscribe` tests run
against the
real core over the shared billing harness. Both the abort guard and the
payment-methods invalidation were verified to fail when removed. A table
in
`createBillingSdk.test.ts` asserts every reader stops serving the
disposed
scope.

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (#17662, #17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | open (#17783) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | local, opens after #17783 and #17794 |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | open
(#17798) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | **this PR** |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| **this PR** (was #17807) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | **this PR** (was #17809) |
| 7 | npm publish (`ingest-types`, `account-core`, `billing-contract`),
Platform install, billing-web live top-up | FE-2218 | todo |
| 6 | Contract tests + live E2E per flow × consumer | FE-2217 | todo |
| 5 slice 2 | Subscription flows through the SDK | FE-2216 | todo
(plan-change decision) |
| follow-up | One `needsCustomerAttention` predicate (from the #17665
review) | FE-2216 | merged (#17792) |
| follow-up | Opaque `BillingServerCode` (from the #17656 review) |
FE-2227 | open (#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the #17799
review) | FE-2215 | open (#17824) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6["Phase 6 evidence"]
  S2["Phase 5 slice 2 subscription"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  P5 --> P6
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style P8 stroke:#0366d6,stroke-width:4px
  style BWS stroke:#0366d6,stroke-width:4px
  style BWV stroke:#0366d6,stroke-width:4px
```
dante01yoon added a commit that referenced this pull request Sep 16, 2026
…the SDK rail behind billing_sdk_subscription_enabled (#17853)

Stacked on #17783 (base branch
`jaewon/fe-2210-hosted-destination-port`); merge that first.

## Why

Phase 5 slice 1 (#17665) moved top-up onto the Billing SDK behind
`billing_sdk_topup_enabled`. The subscription actions the host already
owns — cancel, resubscribe, and opening the payment portal — still call
the workspace API directly and rely on the legacy poller for settlement
and telemetry. This slice moves those three onto the SDK's commands
behind their own server flag, `billing_sdk_subscription_enabled`
(already on `/api/features` via Comfy-Org/cloud#9248, PostHog at 0%), so
the eight-state lifecycle, idempotency, recovery and telemetry come from
one implementation. Subscribe and plan change are slice 2b, stacked on
this PR.

## How

- **Rail switch.** `billingSdkSubscriptionRailEnabled` =
`billing_sdk_subscription_enabled` AND `unified_cloud_auth`, exactly
like the top-up rail. `useSubscriptionRail()` reads it once,
synchronously, at the start of an action, so a flag flip mid-flow cannot
issue on one rail and observe on the other.
- **Three actions, one adapter.**
`useWorkspaceBilling.cancelSubscription / resubscribe /
manageSubscription` try the rail first; the store runs
`sdk.commands.cancelSubscription()`, `resubscribe()`,
`openPaymentPortal({ returnUrl })` and projects the result onto what the
adapter already does with the legacy calls: settle, or throw a
`WorkspaceApiError` (message is the host's, since the SDK never carries
server text; `serverCode` lands in `.code`). A command that settles in
any phase but `succeeded` is a failure, matching the poller. The refresh
after success mirrors the poller's: cancel → status + balance +
capabilities; resubscribe → `reconcileSubscriptionSuccess` +
capabilities.
- **Fallback.** A 404 (backend gate closed while the client flag is on)
projects to `unavailable`: the adapter runs its legacy body for that
action, and the store latches the route as unavailable for the tab so
later actions go straight to legacy without another failed round trip.
Every other failure — including `SUPERSEDED` — is thrown, never retried
on legacy, so a late or superseded result cannot double-issue.
- **Telemetry.** Lifecycle events are now reported for non-topup
operations (top-up keeps its resumed-only filter because its dialog
reports). `toBillingTelemetryEvent` already emits the poller's payload
shape, so dashboards cannot tell the rails apart.
- **No client-derived server state.** Eligibility and already-held
answers come from the SDK and the server, as for top-up. `subscribe`,
`previewSubscribe`, `useSubscriptionCheckout` and `useLegacyBilling` are
untouched.

## AS-IS / TO-BE

| State | AS-IS (flag off) | TO-BE (flag on) |
| --- | --- | --- |
| Cancel dialog at rest | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-cancel-dialog.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-cancel-dialog.png">
|
| Cancel in flight | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-cancel-in-flight.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-cancel-in-flight.png">
|
| Cancel settled (success toast) | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-cancel-settled.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-cancel-settled.png">
|
| Cancel failed (error toast) | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-cancel-failed.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-cancel-failed.png">
|
| User popover after cancel (cancelled state) | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-panel-after-cancel.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-panel-after-cancel.png">
|
| Cancel request recorded | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-network.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-network.png">
|
| Settings billing panel | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-billing-panel.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-billing-panel.png">
|
| Resubscribe (Resume Pro) | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-resubscribe.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-resubscribe.png">
|
| Resubscribe request recorded | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-resubscribe-network.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-resubscribe-network.png">
|
| Payment-portal request recorded | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-portal-network.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-portal-network.png">
|

- AS-IS (flag off): cancel / resubscribe / portal POST the workspace API
directly; settlement and telemetry come from the legacy poller.
- TO-BE (flag on): the same dialogs and toasts, the POSTs go through the
SDK transport (`Idempotency-Key` on the request), settlement through the
operation lifecycle; a 404 falls back to the legacy call.

## Testing

| Gate | Result |
| --- | --- |
| `vitest run src/platform/workspace/billing src/composables/billing
src/platform/workspace/composables src/platform/workspace/stores
src/composables/useFeatureFlags` | 41 files, 1138 tests (12 new
projection tests, 13 new adapter rail tests, +5 store tests) |
| `pnpm typecheck`, `pnpm typecheck:browser`, `lint`, `format:check`,
`knip` | exit 0 |
| `fallow audit --changed-since
origin/jaewon/fe-2210-hosted-destination-port` | no issues in 11 changed
files, complexity 0, duplication 0 |
| Playwright
`browser_tests/tests/dialogs/cancelSubscriptionSdkRail.spec.ts` (cloud
project) | **3 passed** against a served cloud dev build —
`PLAYWRIGHT_TEST_URL=http://localhost:5173 pnpm exec playwright test
--project=cloud
browser_tests/tests/dialogs/cancelSubscriptionSdkRail.spec.ts
--reporter=list`. Flag off → legacy request, flow unchanged; flag on →
SDK request (`Idempotency-Key`), same dialog outcome; flag on + 404 →
legacy fallback. |

## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (#17662, #17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | #17783 (review; parent of this PR) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | #17851 (review) |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | #17798
(queued) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | #17798 (queued) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| #17798 (queued) |
| 7 | billing-web unit tests in CI (`ci-billing-web-unit.yaml`) |
FE-2218 | merged (#17827); #17844 (queued) |
| 7 | ingest CORS + top-up return hosts for billing.comfy.org and its
previews (Comfy-Org/cloud) | FE-2218 | merged (Comfy-Org/cloud#9512) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | #17798 (queued) |
| 7 | npm publish (`ingest-types`, `account-core`, `billing-contract`),
Platform install, billing-web live top-up | FE-2218 | todo |
| 6 | Contract tests per generated schema (package layer) | FE-2217 |
#17829 (review) |
| 6 | Live E2E per flow × consumer + evidence table | FE-2217 | todo
(needs staging flags) |
| 5 slice 2a | Cancel, resubscribe and payment portal through the SDK
behind `billing_sdk_subscription_enabled` | FE-2216 | **this PR** |
| 5 slice 2b | Subscribe / plan change through the SDK
(`previewSubscribe` quote, then subscribe; the SDK stops
short-circuiting an active plan) | FE-2216 | next, stacked on this PR |
| follow-up | One `needsCustomerAttention` predicate (from the #17665
review) | FE-2216 | merged (#17792) |
| follow-up | Opaque `BillingServerCode` (from the #17656 review) |
FE-2227 | merged (#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the #17799
review) | FE-2215 | merged (#17824) |
| follow-up | credits / status / capabilities readers fence a late
failure as `SUPERSEDED` (from the #17798 review) | FE-2331 | merged
(#17828) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  CORS["cloud PR 9512 ingest CORS + return hosts"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6C["Phase 6 contract tests"]
  P6["Phase 6 live evidence"]
  S2A["Phase 5 slice 2a cancel / resubscribe / portal rail"]
  S2B["Phase 5 slice 2b subscribe + plan change"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  FU13["reader late-failure fence"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2B
  HD --> S2A
  S2A --> S2B
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  CORS --> P7
  P5 --> P6
  P3 --> P6C
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  P3 --> FU13
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style FU11 fill:#d4edda,stroke:#155724
  style FU12 fill:#d4edda,stroke:#155724
  style FU13 fill:#d4edda,stroke:#155724
  style CORS fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style S2A stroke:#0366d6,stroke-width:4px
```
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 16, 2026
…int one (Comfy-Org#17794)

Linear FE-2227. Follow-up parked from the Comfy-Org#17656 review.

## Why

`BillingFailure.serverCode` is an unbounded server string in a contract
whose
whole point is that server text never reaches a user. Its doc said
"never
render it", but the type said plain `string`, so a command could invent
a code
and compare against it as if the server had sent one.

This closes provenance, not containment. After it, only
`readBillingErrorCode`
can mint a `BillingServerCode`, so a code that reaches a comparison is
one the
server actually sent. The value is still `string` underneath, so
interpolating
it into copy, widening it with `??`, concatenating it or passing it to
`t()`
all still compile — the rendering half of the Comfy-Org#17656 finding stays open,
and
the file comment says so. Full containment is costed in "Not done here"
below.

## How

- `BillingServerCode = string & { readonly [brand]: true }` with a
module-private `unique symbol`, so the brand cannot be forged outside
the
  module that declares it.
- `readBillingErrorCode` is the single producer and the only place the
brand
is minted, at the decode boundary. The brand erases at runtime, so there
is
  no cost.
- Two contract-level helpers bound what a holder can do:
`matchesServerCode`
compares against a code a command names, and `unwrapServerCode` is the
one
widening back to `string`, so every widening is visible at its call
site.
- The four equality comparisons (`topup.ts` `commandFailure`,
`subscriptionCommands.ts` `alreadyInRequestedState`, `mapServerCode`,
and
  the reactivation check) now go through `matchesServerCode`. The named
  constants and their closed sets stay where they were.
- The one host handoff, `topupFailureError` in `topupOperationView.ts`,
calls
`unwrapServerCode` to put the code where `WorkspaceApiError.code`
already
  lives. It is the only widening in the tree.

## AS-IS / TO-BE

No behaviour change; the change is type-level only. AS-IS, any caller
could
write `const code: BillingFailure['serverCode'] = 'NO_PAYMENT_METHOD'`
and
compare against a code no server ever sent. TO-BE that line is a compile
error,
and the only values in the field came through the decode boundary.
Rendering
paths are unchanged in both directions. Every existing test passes with
the
same assertions.

## Not done here

Making the brand genuinely opaque — dropping the `string &` so nothing
reads it
without `unwrapServerCode` — is the containment half, and it is cheapest
now:
`topupOperationView.ts:98` is the only consumer today and it already
calls
`unwrapServerCode`. Measured cost of the switch, from compiling it:
three
errors, all inside the declaring module — `matchesServerCode`'s `===`,
`unwrapServerCode`'s return, and the mint in `billingErrorBody.ts` —
each
needing an `as unknown as` that the current declaration does not. That
tradeoff
(containment bought with double casts in the owning module) is a
deliberate
call, not a default, and Comfy-Org#17798 / Comfy-Org#17799 add consumers this week.
Flagged for a
decision rather than taken here.

## Testing

- New `billingContracts.test.ts`: a table over `matchesServerCode` for a
  matching code, a different code, and a failure with no error body; a
  `@ts-expect-error` case proving a plain string is not assignable to
`serverCode`; and `unwrapServerCode` returning the string the server
sent.
- Fixtures mint codes through `readBillingErrorCode` on a real error
body
  rather than casting, so the test exercises the production decode.
- `pnpm typecheck`, `pnpm lint`, `pnpm format`, `pnpm knip`,
`fallow audit --changed-since origin/main`, and the account, account-ui,
and
  `src/platform/workspace/billing` suites all pass.
## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (Comfy-Org#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (Comfy-Org#17662, Comfy-Org#17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (Comfy-Org#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (Comfy-Org#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | open (Comfy-Org#17783) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | open (Comfy-Org#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | local, opens after Comfy-Org#17782 and Comfy-Org#17783 |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | in progress |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
open (Comfy-Org#17793) |
| 8 | `previewSubscribe`, plans, payment-methods readers + account-ui +
billing-web views | FE-2331 | todo |
| 7 | npm publish (`ingest-types`, `account-core`, `billing-contract`),
Platform install, billing-web live top-up | FE-2218 | todo |
| 6 | Contract tests + live E2E per flow × consumer | FE-2217 | todo |
| 5 slice 2 | Subscription flows through the SDK | FE-2216 | todo
(plan-change decision) |
| follow-up | One `needsCustomerAttention` predicate (from the Comfy-Org#17665
review) | FE-2216 | open (Comfy-Org#17792) |
| follow-up | Unforgeable `BillingServerCode` (from the Comfy-Org#17656 review) |
FE-2227 | **this PR** |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8["Phase 8 readers + billing-web views"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6["Phase 6 evidence"]
  S2["Phase 5 slice 2 subscription"]
  FU9["customer-attention predicate"]
  FU11["unforgeable BillingServerCode"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RB --> PUB
  PUB --> P7
  P4 --> P8
  P8 --> S2
  P5 --> P6
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style FU11 stroke:#0366d6,stroke-width:4px
```
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 16, 2026
…ders, hosted composables, own-origin session and v1 surfaces (Comfy-Org#17798)

Linear FE-2331 / FE-2218.

This PR is the whole Phase 8 view layer after the stack was
consolidated: Comfy-Org#17799 (account-ui `usePlans` / `usePaymentMethods` /
`usePreviewSubscribe` + app-root readers), Comfy-Org#17807 (billing-web
own-origin session, sign-in, SDK composition) and Comfy-Org#17809 (billing-web
`/v1` entry routing, subscription and payment-method surfaces) were
squash-merged into this branch; their bodies, decisions and screenshots
remain on those PRs. Rebased onto main after Comfy-Org#17782 (scopeSource),
Comfy-Org#17795 (billing-contract) and Comfy-Org#17797 (previewSubscribe) landed, so none
of that content is in this diff.

## Why

Phase 8's hosted billing surfaces render plan management and saved
payment
methods, and both reads have to go through the billing SDK so they
inherit the
scope tracking, deduplication, and coded failures the other readers
already
have. The generated schemas for both routes exist, so nothing has to be
hand-declared.

## How

- `plans.ts`: `createPlansReader` over `GET /billing/plans`, decoded
with
`zGetBillingPlansResponse`. No freshness window — the catalog carries no
  declared lifetime, so the host decides when to re-read.
- `paymentMethods.ts`: `createPaymentMethodsReader` over
  `GET /billing/payment-methods`, decoded with
`zListSavedPaymentMethodsResponse`, plus `invalidate()` so a host
returning
from the payment portal can drop the list it holds without a scope
change.
- Both follow the existing reader shape exactly:
`createBillingScopeTracker`
drops the snapshot and any in-flight read on a scope change, concurrent
reads
  for one scope share a single request, a 2xx that fails the schema is
`MALFORMED_RESPONSE`, and HTTP failures map through `codeForHttpStatus`.
- Exported from `@comfyorg/account/billing` alongside the credits,
status, and
  capabilities readers.

The four readers now share the same request/publish body, which `fallow
audit`
reports as a duplication warning. Factoring it out would touch
`credits.ts` and
`status.ts`, which two open PRs already modify, so it is left for a
follow-up.

## AS-IS / TO-BE

No UI change. The cloud app still calls `workspaceApi.getBillingPlans`
and
`workspaceApi.listSavedPaymentMethods`; the composables and host wiring
that
move it onto these readers land in separate PRs.

## Testing

`plans.test.ts` and `paymentMethods.test.ts` cover the decode and scope
of a
successful read, the caller timeout reaching the request, deduplication
of
concurrent reads, a scope change in flight reporting `SUPERSEDED` with
nothing
cached, a signed-out reader reporting `NOT_AUTHENTICATED` without a
request, the
HTTP status table (401 replayed and unreplayed, 403, 404, 500), a
malformed 2xx,
and `dispose`. Payment methods additionally cover the empty list and
`invalidate` dropping the snapshot so the next read refetches.

`pnpm typecheck`, `pnpm lint`, `pnpm format`, `pnpm knip`, and
`fallow audit --changed-since origin/main` pass.

Follow-up, not in this PR: the four readers now share a 32-line
scope/in-flight skeleton (`credits.ts`, `status.ts`, `plans.ts`,
`paymentMethods.ts`; fallow reports it as one clone family). Comfy-Org#17782 has
landed, but extracting it still touches files Comfy-Org#17794 is changing, so it
waits for that to land.

## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (Comfy-Org#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (Comfy-Org#17662, Comfy-Org#17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (Comfy-Org#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (Comfy-Org#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | open (Comfy-Org#17783) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (Comfy-Org#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | local, opens after Comfy-Org#17783 and Comfy-Org#17794 |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (Comfy-Org#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (Comfy-Org#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (Comfy-Org#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | **this PR**
|
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | **this PR** (was Comfy-Org#17799) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| **this PR** (was Comfy-Org#17807) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | **this PR** (was Comfy-Org#17809) |
| 7 | npm publish (`ingest-types`, `account-core`, `billing-contract`),
Platform install, billing-web live top-up | FE-2218 | todo |
| 6 | Contract tests + live E2E per flow × consumer | FE-2217 | todo |
| 5 slice 2 | Subscription flows through the SDK | FE-2216 | todo
(plan-change decision) |
| follow-up | One `needsCustomerAttention` predicate (from the Comfy-Org#17665
review) | FE-2216 | merged (Comfy-Org#17792) |
| follow-up | Opaque `BillingServerCode` (from the Comfy-Org#17656 review) |
FE-2227 | open (Comfy-Org#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the Comfy-Org#17799
review) | FE-2215 | open (Comfy-Org#17824) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6["Phase 6 evidence"]
  S2["Phase 5 slice 2 subscription"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  P5 --> P6
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style P8RD stroke:#0366d6,stroke-width:4px
  style P8 stroke:#0366d6,stroke-width:4px
  style BWS stroke:#0366d6,stroke-width:4px
  style BWV stroke:#0366d6,stroke-width:4px
```
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 16, 2026
… a status (Comfy-Org#17844)

Follow-up to Comfy-Org#17827, from @huang47's review.

## Why

Two of the three review points, both in files Comfy-Org#17827 touched.

**1. The workflow does not gate on itself**
([comment](Comfy-Org#17827 (comment))).
`app_billing_web` listed only `apps/billing-web/**`, so a PR that
changes nothing but `ci-billing-web-unit.yaml` leaves `billing-web-unit`
skipped and `billing-web-unit-gate` passing through its skip branch.
Comfy-Org#17827 merged exactly that way — run
[35103654481](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/35103654481)
never executed the job it added. Only the post-merge push run on `main`
([35121739924](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/35121739924))
did, because every filter output defaults to `'true'` off
`pull_request`.

**2. The flag has no status of its own**
([comment](Comfy-Org#17827 (comment))).
`codecov.yml` declared the `billing-web` flag but no
`project.billing-web` / `patch.billing-web` under `coverage.status`,
while the website flag has both. The upload arrived with nothing
attributing it, which is why Comfy-Org#17827 showed live `codecov/patch/website`
and `codecov/project/website` checks and no billing-web counterparts.

## How

- `app_billing_web` now lists
`.github/workflows/ci-billing-web-unit.yaml`, the way `app_website`
lists `ci-website-e2e.yaml` and its two scripts. Output description
updated to match.
- `project.billing-web` and `patch.billing-web` mirror the website
entries verbatim apart from the path and flag: scoped to
`apps/billing-web/src/**`, `informational: true`,
`flag_coverage_not_uploaded_behavior: pass`, so a skipped job does not
fail the status.

## Also in this PR (added after the first push)

**The flag rename** (`billing-web` → `billing-web-unit`, @huang47's
third point) landed as a second commit, 089a852. It changes `flags:`
in `ci-billing-web-unit.yaml`, the `flags:` list of both new status
entries and the `flags.` block in `codecov.yml` in one commit, so the
upload and the config never disagree. The status keys stay `billing-web`
(check names `codecov/project/billing-web`,
`codecov/patch/billing-web`), mirroring how the website keeps status key
`website` with flag `website-unit`. The first push could not include it
because that session's token lacked the `workflow` scope; this push has
it.

Deliberately unchanged: `app_website` still does **not** list
`ci-website-unit.yaml` (only the e2e workflow and its two scripts), so
the website *unit* workflow keeps the blind spot this PR fixes for
billing-web. @huang47 — worth the matching one-liner, or do you want the
asymmetry left alone?

## AS-IS / TO-BE

No UI change; CI configuration only.

- AS-IS: a `ci-billing-web-unit.yaml`-only PR skips the suite and
reports a green gate. The `billing-web` flag uploads with no dedicated
status.
- TO-BE: that PR runs the suite. The upload gets
`codecov/project/billing-web` and `codecov/patch/billing-web`.

## Testing

- `curl -X POST --data-binary @codecov.yml https://codecov.io/validate`
→ `Valid!`. Both new statuses resolve to flag `billing-web` and path
`(?s:apps/billing\-web/src/.*)\Z`.
- Cross-checked the three places the flag name appears — the workflow's
`flags:`, `flags.billing-web`, and both status entries — all read
`billing-web`, so the upload is attributed.
- Both changed files parse as YAML; `app_billing_web` resolves to
`['apps/billing-web/**', '.github/workflows/ci-billing-web-unit.yaml']`.
- Not demonstrated end-to-end: this PR touches neither
`apps/billing-web/**` nor the workflow, so `billing-web-unit` is
expected to **skip** here too. The self-test behaviour can only be
observed on a PR that edits the workflow file, which is the push this
token cannot make. The mechanism is the same glob matching that already
makes `app_website` react to `ci-website-e2e.yaml`.

## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (Comfy-Org#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (Comfy-Org#17662, Comfy-Org#17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (Comfy-Org#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (Comfy-Org#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | Comfy-Org#17783 (review) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (Comfy-Org#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | todo (after Comfy-Org#17783, Comfy-Org#17794) |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (Comfy-Org#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (Comfy-Org#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (Comfy-Org#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | Comfy-Org#17798
(review) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | Comfy-Org#17798 (review) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| Comfy-Org#17798 (review) |
| 7 | billing-web unit tests in CI (`ci-billing-web-unit.yaml`) |
FE-2218 | merged (Comfy-Org#17827); **this PR** (Comfy-Org#17844) self-tests the workflow
and adds the flag statuses |
| 7 | ingest CORS + top-up return hosts for billing.comfy.org and its
previews (Comfy-Org/cloud) | FE-2218 | Comfy-Org/cloud#9512 (approved
x2, CI rerun) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | Comfy-Org#17798 (review) |
| 7 | npm publish (`ingest-types`, `account-core`, `billing-contract`),
Platform install, billing-web live top-up | FE-2218 | todo |
| 6 | Contract tests per generated schema (package layer) | FE-2217 |
Comfy-Org#17829 (review) |
| 6 | Live E2E per flow × consumer + evidence table | FE-2217 | todo
(needs staging flags) |
| 5 slice 2 | Subscription flows through the SDK | FE-2216 | todo
(plan-change decision) |
| follow-up | One `needsCustomerAttention` predicate (from the Comfy-Org#17665
review) | FE-2216 | merged (Comfy-Org#17792) |
| follow-up | Opaque `BillingServerCode` (from the Comfy-Org#17656 review) |
FE-2227 | Comfy-Org#17794 (review) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the Comfy-Org#17799
review) | FE-2215 | merged (Comfy-Org#17824) |
| follow-up | credits / status / capabilities readers fence a late
failure as `SUPERSEDED` (from the Comfy-Org#17798 review) | FE-2331 | merged
(Comfy-Org#17828) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  CORS["cloud PR 9512 ingest CORS + return hosts"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  CI["billing-web unit CI: PR 17827 (merged) + PR 17844 follow-up"]
  P6C["Phase 6 contract tests"]
  P6["Phase 6 live evidence"]
  S2["Phase 5 slice 2 subscription"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  FU13["reader late-failure fence"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  CORS --> P7
  BWS --> CI
  CI --> P7
  P5 --> P6
  P3 --> P6C
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  P3 --> FU13
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style CI stroke:#0366d6,stroke-width:4px
```
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 16, 2026
… billing reads (Comfy-Org#17852)

Stacked on Comfy-Org#17798 (base branch
`jaewon/fe-2331-plans-payment-methods-readers`); merge that first.
Comfy-Org#17851 (the `account-core` rename) sits on the same parent: whichever of
the two lands second is re-based mechanically (the rename has a replay
script).

## Why

`fallow audit` on Comfy-Org#17798 reported a clone family across the five billing
readers: `credits.ts`, `status.ts`, `capabilities.ts`, `plans.ts` and
`paymentMethods.ts` each re-implemented the same fetch-and-fence shape —
capture the scope, share one request per scope, release a caller on its
own signal, report a late answer (success or failure) as `SUPERSEDED`,
and drop a published snapshot on a denial unless the request predates a
change the host fenced. Five copies of that logic is five places the
Comfy-Org#17828 late-failure fence had to be applied, and the next reader would
have been a sixth.

## How

One skeleton, `createScopedReader`, owns the request sharing, the caller
release, the publish fence and the denial drop. A reader supplies only
its route, decoder (`parse`) and projection into a snapshot, plus two
optional hooks that absorb the real variants: `cached` (capabilities'
freshness window) and `publish` (payment-methods' fenced list,
capabilities' publish-as-stale). `setSnapshot` and `fenceInFlight({
detach })` let each reader assemble its own `invalidate` — capabilities
fences without detaching, payment methods fences and detaches.

The public API of every reader is unchanged in shape and semantics:
`index.ts` is untouched and no consumer in `account-ui`, `billing-web`
or `src/platform/workspace/billing` changed. Per-reader production size:
credits 158→80, status 137→64, plans 163→78, paymentMethods 197→94,
capabilities 317→235 lines.

Tests: the fence family is proven once in `scopedReader.test.ts` with a
five-reader case table (sparse filters for the one reader that paces
itself), and each reader keeps only the tests of its own projection —
capabilities' freshness, denials, revision invalidation and
`resolved_for` checks; payment-methods' three invalidation cases.
Coverage went up: status gained the signed-out-in-flight case, plans and
payment methods gained dispose, all five gained sign-out-then-read.

## AS-IS / TO-BE

No user-facing change; core package internals only.

- AS-IS: five readers, each with its own copy of the scope fence; fallow
reports 2 clone groups / 46 lines across three of them plus 4 groups
spanning all four non-paced readers.
- TO-BE: one skeleton, five thin readers; `fallow audit --changed-since
<parent>` reports duplication 0 and no clone group above the 3-instance
threshold.

## Testing

| Gate | Result |
| --- | --- |
| `packages/account` vitest | 42 files, 659 tests (67 new shared cases
replace 82 per-reader copies) |
| `packages/account-ui` vitest | 9 files, 41 tests |
| `@comfyorg/billing-web` test:unit | 10 files, 90 tests |
| `pnpm typecheck`, `lint`, `format`, `knip` | exit 0 |
| `fallow audit --changed-since
origin/jaewon/fe-2331-plans-payment-methods-readers` | no issues in 13
changed files |

## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (Comfy-Org#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (Comfy-Org#17662, Comfy-Org#17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (Comfy-Org#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (Comfy-Org#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | Comfy-Org#17783 (review) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (Comfy-Org#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | Comfy-Org#17851 (review, sibling of this PR on Comfy-Org#17798) |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (Comfy-Org#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (Comfy-Org#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (Comfy-Org#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | Comfy-Org#17798
(review) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | Comfy-Org#17798 (review) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| Comfy-Org#17798 (review) |
| 7 | billing-web unit tests in CI (`ci-billing-web-unit.yaml`) |
FE-2218 | merged (Comfy-Org#17827); Comfy-Org#17844 follow-up (review) |
| 7 | ingest CORS + top-up return hosts for billing.comfy.org and its
previews (Comfy-Org/cloud) | FE-2218 | merged (Comfy-Org/cloud#9512) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | Comfy-Org#17798 (review) |
| 7 | npm publish (`ingest-types`, `account-core`, `billing-contract`),
Platform install, billing-web live top-up | FE-2218 | todo |
| 6 | Contract tests per generated schema (package layer) | FE-2217 |
Comfy-Org#17829 (review) |
| 6 | Live E2E per flow × consumer + evidence table | FE-2217 | todo
(needs staging flags) |
| 5 slice 2 | Subscription flows through the SDK | FE-2216 | todo
(plan-change decision) |
| follow-up | One `needsCustomerAttention` predicate (from the Comfy-Org#17665
review) | FE-2216 | merged (Comfy-Org#17792) |
| follow-up | Opaque `BillingServerCode` (from the Comfy-Org#17656 review) |
FE-2227 | merged (Comfy-Org#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the Comfy-Org#17799
review) | FE-2215 | merged (Comfy-Org#17824) |
| follow-up | credits / status / capabilities readers fence a late
failure as `SUPERSEDED` (from the Comfy-Org#17798 review) | FE-2331 | merged
(Comfy-Org#17828) |
| follow-up | one scoped-reader skeleton behind the five billing reads
(from the Comfy-Org#17798 fallow report) | FE-2331 | **this PR** |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  CORS["cloud PR 9512 ingest CORS + return hosts"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6C["Phase 6 contract tests"]
  P6["Phase 6 live evidence"]
  S2["Phase 5 slice 2 subscription"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  FU13["reader late-failure fence"]
  FU14["scoped reader skeleton"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  CORS --> P7
  P5 --> P6
  P3 --> P6C
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  P3 --> FU13
  P8RD --> FU14
  FU13 --> FU14
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style FU11 fill:#d4edda,stroke:#155724
  style FU12 fill:#d4edda,stroke:#155724
  style FU13 fill:#d4edda,stroke:#155724
  style CORS fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style FU14 stroke:#0366d6,stroke-width:4px
```
dante01yoon added a commit that referenced this pull request Sep 17, 2026
…the SDK rail behind billing_sdk_subscription_enabled (#17853)

Stacked on #17783 (base branch
`jaewon/fe-2210-hosted-destination-port`); merge that first.

Phase 5 slice 1 (#17665) moved top-up onto the Billing SDK behind
`billing_sdk_topup_enabled`. The subscription actions the host already
owns — cancel, resubscribe, and opening the payment portal — still call
the workspace API directly and rely on the legacy poller for settlement
and telemetry. This slice moves those three onto the SDK's commands
behind their own server flag, `billing_sdk_subscription_enabled`
(already on `/api/features` via Comfy-Org/cloud#9248, PostHog at 0%), so
the eight-state lifecycle, idempotency, recovery and telemetry come from
one implementation. Subscribe and plan change are slice 2b, stacked on
this PR.

- **Rail switch.** `billingSdkSubscriptionRailEnabled` =
`billing_sdk_subscription_enabled` AND `unified_cloud_auth`, exactly
like the top-up rail. `useSubscriptionRail()` reads it once,
synchronously, at the start of an action, so a flag flip mid-flow cannot
issue on one rail and observe on the other.
- **Three actions, one adapter.**
`useWorkspaceBilling.cancelSubscription / resubscribe /
manageSubscription` try the rail first; the store runs
`sdk.commands.cancelSubscription()`, `resubscribe()`,
`openPaymentPortal({ returnUrl })` and projects the result onto what the
adapter already does with the legacy calls: settle, or throw a
`WorkspaceApiError` (message is the host's, since the SDK never carries
server text; `serverCode` lands in `.code`). A command that settles in
any phase but `succeeded` is a failure, matching the poller. The refresh
after success mirrors the poller's: cancel → status + balance +
capabilities; resubscribe → `reconcileSubscriptionSuccess` +
capabilities.
- **Fallback.** A 404 (backend gate closed while the client flag is on)
projects to `unavailable`: the adapter runs its legacy body for that
action, and the store latches the route as unavailable for the tab so
later actions go straight to legacy without another failed round trip.
Every other failure — including `SUPERSEDED` — is thrown, never retried
on legacy, so a late or superseded result cannot double-issue.
- **Telemetry.** Lifecycle events are now reported for non-topup
operations (top-up keeps its resumed-only filter because its dialog
reports). `toBillingTelemetryEvent` already emits the poller's payload
shape, so dashboards cannot tell the rails apart.
- **No client-derived server state.** Eligibility and already-held
answers come from the SDK and the server, as for top-up. `subscribe`,
`previewSubscribe`, `useSubscriptionCheckout` and `useLegacyBilling` are
untouched.

| State | AS-IS (flag off) | TO-BE (flag on) |
| --- | --- | --- |
| Cancel dialog at rest | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-cancel-dialog.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-cancel-dialog.png">
|
| Cancel in flight | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-cancel-in-flight.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-cancel-in-flight.png">
|
| Cancel settled (success toast) | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-cancel-settled.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-cancel-settled.png">
|
| Cancel failed (error toast) | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-cancel-failed.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-cancel-failed.png">
|
| User popover after cancel (cancelled state) | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-panel-after-cancel.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-panel-after-cancel.png">
|
| Cancel request recorded | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-network.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-network.png">
|
| Settings billing panel | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-billing-panel.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-billing-panel.png">
|
| Resubscribe (Resume Pro) | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-resubscribe.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-resubscribe.png">
|
| Resubscribe request recorded | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-resubscribe-network.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-resubscribe-network.png">
|
| Payment-portal request recorded | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-portal-network.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-portal-network.png">
|

- AS-IS (flag off): cancel / resubscribe / portal POST the workspace API
directly; settlement and telemetry come from the legacy poller.
- TO-BE (flag on): the same dialogs and toasts, the POSTs go through the
SDK transport (`Idempotency-Key` on the request), settlement through the
operation lifecycle; a 404 falls back to the legacy call.

| Gate | Result |
| --- | --- |
| `vitest run src/platform/workspace/billing src/composables/billing
src/platform/workspace/composables src/platform/workspace/stores
src/composables/useFeatureFlags` | 41 files, 1138 tests (12 new
projection tests, 13 new adapter rail tests, +5 store tests) |
| `pnpm typecheck`, `pnpm typecheck:browser`, `lint`, `format:check`,
`knip` | exit 0 |
| `fallow audit --changed-since
origin/jaewon/fe-2210-hosted-destination-port` | no issues in 11 changed
files, complexity 0, duplication 0 |
| Playwright
`browser_tests/tests/dialogs/cancelSubscriptionSdkRail.spec.ts` (cloud
project) | **3 passed** against a served cloud dev build —
`PLAYWRIGHT_TEST_URL=http://localhost:5173 pnpm exec playwright test
--project=cloud
browser_tests/tests/dialogs/cancelSubscriptionSdkRail.spec.ts
--reporter=list`. Flag off → legacy request, flow unchanged; flag on →
SDK request (`Idempotency-Key`), same dialog outcome; flag on + 404 →
legacy fallback. |

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (#17662, #17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | #17783 (review; parent of this PR) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | #17851 (review) |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | #17798
(queued) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | #17798 (queued) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| #17798 (queued) |
| 7 | billing-web unit tests in CI (`ci-billing-web-unit.yaml`) |
FE-2218 | merged (#17827); #17844 (queued) |
| 7 | ingest CORS + top-up return hosts for billing.comfy.org and its
previews (Comfy-Org/cloud) | FE-2218 | merged (Comfy-Org/cloud#9512) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | #17798 (queued) |
| 7 | npm publish (`ingest-types`, `account-core`, `billing-contract`),
Platform install, billing-web live top-up | FE-2218 | todo |
| 6 | Contract tests per generated schema (package layer) | FE-2217 |
| 6 | Live E2E per flow × consumer + evidence table | FE-2217 | todo
(needs staging flags) |
| 5 slice 2a | Cancel, resubscribe and payment portal through the SDK
behind `billing_sdk_subscription_enabled` | FE-2216 | **this PR** |
| 5 slice 2b | Subscribe / plan change through the SDK
(`previewSubscribe` quote, then subscribe; the SDK stops
short-circuiting an active plan) | FE-2216 | next, stacked on this PR |
| follow-up | One `needsCustomerAttention` predicate (from the #17665
review) | FE-2216 | merged (#17792) |
| follow-up | Opaque `BillingServerCode` (from the #17656 review) |
FE-2227 | merged (#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the #17799
review) | FE-2215 | merged (#17824) |
| follow-up | credits / status / capabilities readers fence a late
failure as `SUPERSEDED` (from the #17798 review) | FE-2331 | merged
(#17828) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  CORS["cloud PR 9512 ingest CORS + return hosts"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6C["Phase 6 contract tests"]
  P6["Phase 6 live evidence"]
  S2A["Phase 5 slice 2a cancel / resubscribe / portal rail"]
  S2B["Phase 5 slice 2b subscribe + plan change"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  FU13["reader late-failure fence"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2B
  HD --> S2A
  S2A --> S2B
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  CORS --> P7
  P5 --> P6
  P3 --> P6C
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  P3 --> FU13
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style FU11 fill:#d4edda,stroke:#155724
  style FU12 fill:#d4edda,stroke:#155724
  style FU13 fill:#d4edda,stroke:#155724
  style CORS fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style S2A stroke:#0366d6,stroke-width:4px
```
dante01yoon added a commit that referenced this pull request Sep 17, 2026
…the SDK rail behind billing_sdk_subscription_enabled (#17853)

Stacked on #17783 (base branch
`jaewon/fe-2210-hosted-destination-port`); merge that first.

Phase 5 slice 1 (#17665) moved top-up onto the Billing SDK behind
`billing_sdk_topup_enabled`. The subscription actions the host already
owns — cancel, resubscribe, and opening the payment portal — still call
the workspace API directly and rely on the legacy poller for settlement
and telemetry. This slice moves those three onto the SDK's commands
behind their own server flag, `billing_sdk_subscription_enabled`
(already on `/api/features` via Comfy-Org/cloud#9248, PostHog at 0%), so
the eight-state lifecycle, idempotency, recovery and telemetry come from
one implementation. Subscribe and plan change are slice 2b, stacked on
this PR.

- **Rail switch.** `billingSdkSubscriptionRailEnabled` =
`billing_sdk_subscription_enabled` AND `unified_cloud_auth`, exactly
like the top-up rail. `useSubscriptionRail()` reads it once,
synchronously, at the start of an action, so a flag flip mid-flow cannot
issue on one rail and observe on the other.
- **Three actions, one adapter.**
`useWorkspaceBilling.cancelSubscription / resubscribe /
manageSubscription` try the rail first; the store runs
`sdk.commands.cancelSubscription()`, `resubscribe()`,
`openPaymentPortal({ returnUrl })` and projects the result onto what the
adapter already does with the legacy calls: settle, or throw a
`WorkspaceApiError` (message is the host's, since the SDK never carries
server text; `serverCode` lands in `.code`). A command that settles in
any phase but `succeeded` is a failure, matching the poller. The refresh
after success mirrors the poller's: cancel → status + balance +
capabilities; resubscribe → `reconcileSubscriptionSuccess` +
capabilities.
- **Fallback.** A 404 (backend gate closed while the client flag is on)
projects to `unavailable`: the adapter runs its legacy body for that
action, and the store latches the route as unavailable for the tab so
later actions go straight to legacy without another failed round trip.
Every other failure — including `SUPERSEDED` — is thrown, never retried
on legacy, so a late or superseded result cannot double-issue.
- **Telemetry.** Lifecycle events are now reported for non-topup
operations (top-up keeps its resumed-only filter because its dialog
reports). `toBillingTelemetryEvent` already emits the poller's payload
shape, so dashboards cannot tell the rails apart.
- **No client-derived server state.** Eligibility and already-held
answers come from the SDK and the server, as for top-up. `subscribe`,
`previewSubscribe`, `useSubscriptionCheckout` and `useLegacyBilling` are
untouched.

| State | AS-IS (flag off) | TO-BE (flag on) |
| --- | --- | --- |
| Cancel dialog at rest | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-cancel-dialog.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-cancel-dialog.png">
|
| Cancel in flight | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-cancel-in-flight.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-cancel-in-flight.png">
|
| Cancel settled (success toast) | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-cancel-settled.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-cancel-settled.png">
|
| Cancel failed (error toast) | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-cancel-failed.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-cancel-failed.png">
|
| User popover after cancel (cancelled state) | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-panel-after-cancel.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-panel-after-cancel.png">
|
| Cancel request recorded | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-network.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-network.png">
|
| Settings billing panel | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-billing-panel.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-billing-panel.png">
|
| Resubscribe (Resume Pro) | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-resubscribe.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-resubscribe.png">
|
| Resubscribe request recorded | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-resubscribe-network.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-resubscribe-network.png">
|
| Payment-portal request recorded | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/as-is-portal-network.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17853-screenshots/screenshots/to-be-portal-network.png">
|

- AS-IS (flag off): cancel / resubscribe / portal POST the workspace API
directly; settlement and telemetry come from the legacy poller.
- TO-BE (flag on): the same dialogs and toasts, the POSTs go through the
SDK transport (`Idempotency-Key` on the request), settlement through the
operation lifecycle; a 404 falls back to the legacy call.

| Gate | Result |
| --- | --- |
| `vitest run src/platform/workspace/billing src/composables/billing
src/platform/workspace/composables src/platform/workspace/stores
src/composables/useFeatureFlags` | 41 files, 1138 tests (12 new
projection tests, 13 new adapter rail tests, +5 store tests) |
| `pnpm typecheck`, `pnpm typecheck:browser`, `lint`, `format:check`,
`knip` | exit 0 |
| `fallow audit --changed-since
origin/jaewon/fe-2210-hosted-destination-port` | no issues in 11 changed
files, complexity 0, duplication 0 |
| Playwright
`browser_tests/tests/dialogs/cancelSubscriptionSdkRail.spec.ts` (cloud
project) | **3 passed** against a served cloud dev build —
`PLAYWRIGHT_TEST_URL=http://localhost:5173 pnpm exec playwright test
--project=cloud
browser_tests/tests/dialogs/cancelSubscriptionSdkRail.spec.ts
--reporter=list`. Flag off → legacy request, flow unchanged; flag on →
SDK request (`Idempotency-Key`), same dialog outcome; flag on + 404 →
legacy fallback. |

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (#17662, #17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | #17783 (review; parent of this PR) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | #17851 (review) |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | #17798
(queued) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | #17798 (queued) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| #17798 (queued) |
| 7 | billing-web unit tests in CI (`ci-billing-web-unit.yaml`) |
FE-2218 | merged (#17827); #17844 (queued) |
| 7 | ingest CORS + top-up return hosts for billing.comfy.org and its
previews (Comfy-Org/cloud) | FE-2218 | merged (Comfy-Org/cloud#9512) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | #17798 (queued) |
| 7 | npm publish (`ingest-types`, `account-core`, `billing-contract`),
Platform install, billing-web live top-up | FE-2218 | todo |
| 6 | Contract tests per generated schema (package layer) | FE-2217 |
| 6 | Live E2E per flow × consumer + evidence table | FE-2217 | todo
(needs staging flags) |
| 5 slice 2a | Cancel, resubscribe and payment portal through the SDK
behind `billing_sdk_subscription_enabled` | FE-2216 | **this PR** |
| 5 slice 2b | Subscribe / plan change through the SDK
(`previewSubscribe` quote, then subscribe; the SDK stops
short-circuiting an active plan) | FE-2216 | next, stacked on this PR |
| follow-up | One `needsCustomerAttention` predicate (from the #17665
review) | FE-2216 | merged (#17792) |
| follow-up | Opaque `BillingServerCode` (from the #17656 review) |
FE-2227 | merged (#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the #17799
review) | FE-2215 | merged (#17824) |
| follow-up | credits / status / capabilities readers fence a late
failure as `SUPERSEDED` (from the #17798 review) | FE-2331 | merged
(#17828) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  CORS["cloud PR 9512 ingest CORS + return hosts"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6C["Phase 6 contract tests"]
  P6["Phase 6 live evidence"]
  S2A["Phase 5 slice 2a cancel / resubscribe / portal rail"]
  S2B["Phase 5 slice 2b subscribe + plan change"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  FU13["reader late-failure fence"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2B
  HD --> S2A
  S2A --> S2B
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  CORS --> P7
  P5 --> P6
  P3 --> P6C
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  P3 --> FU13
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style FU11 fill:#d4edda,stroke:#155724
  style FU12 fill:#d4edda,stroke:#155724
  style FU13 fill:#d4edda,stroke:#155724
  style CORS fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style S2A stroke:#0366d6,stroke-width:4px
```
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 17, 2026
…unt-core (Comfy-Org#17851)

Stacked on Comfy-Org#17798 (base branch
`jaewon/fe-2331-plans-payment-methods-readers`); merge that first, then
this rebases to `main` with no content change.

## Why

Phase 7 (FE-2218) publishes the framework-free billing core to npm so
Platform can install it from a clean non-workspace checkout, and the
plan fixes the physical `account-core` / `account-ui` split as the
boundary that gets published, not the transitional `packages/account`.
The view package `@comfyorg/account-ui` already exists; the core still
carries the old name. This is the one mechanical rename PR the plan
schedules after Phase 5 slice 1 and before the first publish.

## How

Two commits so the review is trivial:

1. `git mv packages/account packages/account-core` — 95 files, 0
insertions, 0 deletions, every path a 100% rename.
2. The specifier and config edits — package name `@comfyorg/account` →
`@comfyorg/account-core`, every `workspace:*` dependency (root,
`apps/billing-web`, `apps/website`, `packages/account-ui`), every import
specifier under `src/`, `packages/`, `apps/`, `browser_tests/`, the root
`typecheck` / `lint` scripts (`typecheck:account` →
`typecheck:account-core`), `knip.config.ts`, `eslint.config.ts`, the
per-package loop and codecov file list in `ci-tests-unit.yaml`, the
lockfile importer keys, and the two ADRs that name the package in prose.
The delta over a 1:1 swap is oxfmt reflowing import lines the five extra
characters pushed past 80 columns.

Left alone on purpose: the `./vue` entry (the auth Vue pieces move to
`account-ui` in the next PR of this stack), the Firebase app name
`comfy-account` in ADR-0028, and the ADR filenames and headings
(renaming those would break the ADR index and inbound links). `git grep
"@comfyorg/account\b"` and `git grep "packages/account/"` return nothing
after this change.

The replay script lives under `temp/scripts/rename-account-core.sh`
(gitignored); if a sibling PR merges first, re-running it on a fresh
base reproduces this diff.

## AS-IS / TO-BE

No user-facing change; package boundary only.

- AS-IS: `packages/account` publishes as `@comfyorg/account` and is the
name Platform would have to install, while the view layer is already
`@comfyorg/account-ui`.
- TO-BE: `packages/account-core` publishes as `@comfyorg/account-core`;
`account-ui` and `billing-web` depend on it by the final name.

## Testing

| Gate | Result |
| --- | --- |
| `pnpm install --frozen-lockfile` | resolves with the new name |
| `packages/account-core` vitest | 41 files, 674 tests |
| `packages/account-ui` vitest | 9 files, 41 tests |
| `@comfyorg/billing-web` test:unit / build | 10 files, 90 tests / built
|
| `@comfyorg/website` typecheck | 0 errors |
| root `pnpm typecheck`, `lint`, `format`, `knip` | all exit 0 |
| `vitest run src/platform/workspace/billing` | 5 files, 50 tests |
| `pnpm typecheck:browser`, `typecheck:website` (pre-commit) | green |

## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (Comfy-Org#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (Comfy-Org#17662, Comfy-Org#17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (Comfy-Org#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (Comfy-Org#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | Comfy-Org#17783 (review) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (Comfy-Org#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | **this PR** |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (Comfy-Org#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (Comfy-Org#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (Comfy-Org#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | Comfy-Org#17798
(review) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | Comfy-Org#17798 (review) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| Comfy-Org#17798 (review) |
| 7 | billing-web unit tests in CI (`ci-billing-web-unit.yaml`) |
FE-2218 | merged (Comfy-Org#17827); Comfy-Org#17844 follow-up (review) |
| 7 | ingest CORS + top-up return hosts for billing.comfy.org and its
previews (Comfy-Org/cloud) | FE-2218 | merged (Comfy-Org/cloud#9512) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | Comfy-Org#17798 (review) |
| 7 | npm publish (`ingest-types`, `account-core`, `billing-contract`),
Platform install, billing-web live top-up | FE-2218 | todo |
| 6 | Contract tests per generated schema (package layer) | FE-2217 |
Comfy-Org#17829 (review) |
| 6 | Live E2E per flow × consumer + evidence table | FE-2217 | todo
(needs staging flags) |
| 5 slice 2 | Subscription flows through the SDK | FE-2216 | todo
(plan-change decision) |
| follow-up | One `needsCustomerAttention` predicate (from the Comfy-Org#17665
review) | FE-2216 | merged (Comfy-Org#17792) |
| follow-up | Opaque `BillingServerCode` (from the Comfy-Org#17656 review) |
FE-2227 | merged (Comfy-Org#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the Comfy-Org#17799
review) | FE-2215 | merged (Comfy-Org#17824) |
| follow-up | credits / status / capabilities readers fence a late
failure as `SUPERSEDED` (from the Comfy-Org#17798 review) | FE-2331 | merged
(Comfy-Org#17828) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  CORS["cloud PR 9512 ingest CORS + return hosts"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6C["Phase 6 contract tests"]
  P6["Phase 6 live evidence"]
  S2["Phase 5 slice 2 subscription"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  FU13["reader late-failure fence"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  CORS --> P7
  P5 --> P6
  P3 --> P6C
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  P3 --> FU13
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style FU11 fill:#d4edda,stroke:#155724
  style FU12 fill:#d4edda,stroke:#155724
  style FU13 fill:#d4edda,stroke:#155724
  style CORS fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style RN stroke:#0366d6,stroke-width:4px
```
pull Bot pushed a commit to Mu-L/ComfyUI_frontend that referenced this pull request Sep 17, 2026
…ling core (Comfy-Org#17854)

Stacked on Comfy-Org#17851 (base branch `jaewon/fe-2218-account-core-rename`),
which stacks on Comfy-Org#17798; merge those first.

## Why

The plan's first decision was that the Vue layer leaves the account
package: composables and unstyled components ship from
`@comfyorg/account-ui`, and the core keeps zero Vue coupling by
construction rather than by an import-guard test. The auth Vue pieces
(`PasswordRules`, `SocialAuthButtons`, `TurnstileWidget`, the region and
Turnstile gates, the lifecycle scope and generation guard) had shipped
in the core's `./vue` entry days before that decision and were
deliberately left for a later follow-up so the fresh auth stack was not
destabilised. With the rename in Comfy-Org#17851 fixing `account-core` as the
boundary that gets published (Phase 7), this is that follow-up: the
published core must not drag `vue`, `@vueuse/core` or a `.vue` entry to
Platform.

## How

- `packages/account-core/src/vue/**` → `packages/account-ui/src/auth/**`
with `git mv` (7 modules + their 7 tests; git records every file as a
rename). The framework-free helpers stay in the core and keep their
public subpaths (`/signInSchemas`, `/turnstileScript`,
`/boundedOperation`); the moved files reach them through those.
- `@comfyorg/account-ui` gains per-module `./auth/*` exports (mirroring
how consumers already import these individually and how the app-side
test mocks target one module each) plus the two workspace deps the moved
files need (`@comfyorg/shared-frontend-utils`,
`@comfyorg/tailwind-utils`; both fine in the view package, neither
allowed in the core).
- The core drops the `./vue/*` exports, `vue`, `@vueuse/core`,
`vue-tsc`, `@vitejs/plugin-vue`, `@testing-library/vue|user-event`,
`@comfyorg/tailwind-utils` and the `peerDependenciesMeta` block;
`typecheck` becomes `tsc --noEmit`; the vitest `account-vue` project
becomes `account-firebase` (happy-dom for `src/firebase/**` only).
- `vueBoundary.test.ts` now proves the boundary three ways: no `vue` /
`@vueuse` import anywhere under `src` (the old `vue/` carve-out is
gone), no Vue dependency in any manifest field, and no `.vue` file
behind any export.
- 17 import sites in 13 files repointed (`apps/billing-web`,
`apps/website`, `src/`); root and `apps/website` gain
`@comfyorg/account-ui: workspace:*`.

A pure `git mv` commit was not possible: the pre-commit hook lints and
type-checks the staged tree, and a rename without repoints leaves 17
unresolved imports. Commit 1 is therefore the rename plus the mechanical
repoints; commit 2 is the boundary guard.

## AS-IS / TO-BE

No user-facing change; package boundary only.

- AS-IS: `@comfyorg/account-core` exports `./vue/*` and depends on
`vue`; a Platform install of the core would pull Vue and `.vue` files.
- TO-BE: `@comfyorg/account-core` has no view entry and no Vue
dependency; the sign-in pieces ship from `@comfyorg/account-ui/auth/*`
next to `./billing`.

## Testing

| Gate | Result |
| --- | --- |
| `packages/account-core` vitest | 34 files, 638 tests |
| `packages/account-ui` vitest | 16 files, 79 tests (7 moved suites) |
| `@comfyorg/billing-web` test:unit / build | 10 files, 90 tests / built
|
| `@comfyorg/website` typecheck | 0 errors |
| root `pnpm typecheck`, `lint`, `format`, `knip` | exit 0 |
| `vitest run src/components/dialog/content/signin src/components/auth
src/platform/workspace/billing` | 11 files, 94 tests |
| `git grep "account-core/vue"` | no matches |

## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (Comfy-Org#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (Comfy-Org#17662, Comfy-Org#17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (Comfy-Org#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (Comfy-Org#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | Comfy-Org#17783 (review) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (Comfy-Org#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | Comfy-Org#17851 (review; parent of this PR) |
| 4 follow-up | auth Vue pieces leave the core for
`@comfyorg/account-ui` (`./auth/*`) | FE-2215 | **this PR** |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (Comfy-Org#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (Comfy-Org#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (Comfy-Org#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | Comfy-Org#17798
(queued) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | Comfy-Org#17798 (queued) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| Comfy-Org#17798 (queued) |
| 7 | billing-web unit tests in CI (`ci-billing-web-unit.yaml`) |
FE-2218 | merged (Comfy-Org#17827); Comfy-Org#17844 (queued) |
| 7 | ingest CORS + top-up return hosts for billing.comfy.org and its
previews (Comfy-Org/cloud) | FE-2218 | merged (Comfy-Org/cloud#9512) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | Comfy-Org#17798 (queued) |
| 7 | npm publish (`ingest-types`, `account-core`, `billing-contract`),
Platform install, billing-web live top-up | FE-2218 | todo |
| 6 | Contract tests per generated schema (package layer) | FE-2217 |
Comfy-Org#17829 (review) |
| 6 | Live E2E per flow × consumer + evidence table | FE-2217 | todo
(needs staging flags) |
| 5 slice 2 | Subscription flows through the SDK | FE-2216 | todo
(plan-change decision) |
| follow-up | One `needsCustomerAttention` predicate (from the Comfy-Org#17665
review) | FE-2216 | merged (Comfy-Org#17792) |
| follow-up | Opaque `BillingServerCode` (from the Comfy-Org#17656 review) |
FE-2227 | merged (Comfy-Org#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the Comfy-Org#17799
review) | FE-2215 | merged (Comfy-Org#17824) |
| follow-up | credits / status / capabilities readers fence a late
failure as `SUPERSEDED` (from the Comfy-Org#17798 review) | FE-2331 | merged
(Comfy-Org#17828) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["PR 17851 account-core rename"]
  VUE["auth Vue pieces to account-ui"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  CORS["cloud PR 9512 ingest CORS + return hosts"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6C["Phase 6 contract tests"]
  P6["Phase 6 live evidence"]
  S2["Phase 5 slice 2 subscription"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  FU13["reader late-failure fence"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RN --> VUE
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  CORS --> P7
  P5 --> P6
  P3 --> P6C
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  P3 --> FU13
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style FU11 fill:#d4edda,stroke:#155724
  style FU12 fill:#d4edda,stroke:#155724
  style FU13 fill:#d4edda,stroke:#155724
  style CORS fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style VUE stroke:#0366d6,stroke-width:4px
```
dante01yoon added a commit that referenced this pull request Sep 17, 2026
…act when the hosted destination says billing_web (#17860)

Stacked on #17856 (base branch `jaewon/fe-2216-plan-change`) → #17853 →
#17783; merge those first.

## Why

Rollout layer C (`hosted_billing_destination`, `stripe` | `billing_web`,
PostHog at 100% `stripe`) decides where a hosted billing action lands.
The plan says the host reads the flag, hands it to the SDK (#17783) and,
when it says `billing_web`, mints a `/v1/<intent>` entry with
`return_to` from `@comfyorg/billing-contract`, the one definition of
that route surface (#17795); when it says `stripe`, the backend's URL is
opened unchanged. Today the host only opens the bare billing-web origin
from the user popover (#17716) with no intent and no `return_to`, and
"Billing & invoices" in the settings panel always goes to the Stripe
portal. This is the last un-opened code item before the Phase 7 host
proof.

## How

- `src/platform/workspace/billing/hostedBillingRoutes.ts`:
`hostedBillingRoute(destination, intent)` returns `{ kind:
'billing_web', url }` built by `buildBillingEntryUrl({ billingOrigin,
intent, product: 'comfyui', returnTo: 'comfyui_workspace' })`, or `{
kind: 'provider' }` meaning "use the server's URL". The environment is
derived, not hardcoded: the cloud base URL's hostname through the
existing `resolveDeployEnv` map (`prod-v2 | stg-v2 | test-v2` →
`production | staging | test`), which also classifies a local dev
session by the backend it talks to. Fails closed to the provider on: no
configured origin, an unknown backend family, a return target with no
destination in that family, or an entry the contract refuses. A
path-prefixed `VITE_BILLING_WEB_URL` keeps its prefix under the minted
route.
- Consumers: the popover's "Plans and pricing" mints the `pricing`
intent (billing-web routes it to the subscription view; the in-app
dialog stays the `stripe` behaviour and the popup-blocked fallback);
`useWorkspaceBilling.manageSubscription()` mints `payment-methods`
**before** either rail is consulted, so on `billing_web` no portal URL
is requested on the SDK rail or the legacy one, and `openPortalWindow` +
`refreshOnPortalReturn` still run so the return re-reads status, balance
and capabilities.
- Also fixed on the way: the popover treated a falsy `window.open(…,
"noopener,noreferrer")` result as a blocked popup and showed the in-app
pricing dialog as a fallback. Per the HTML spec `noopener` always
returns `null`, so on `billing_web` the tab and the dialog opened
together — a latent defect inherited from #17370 on `main`, caught by
this PR's evidence run. The fallback is gone; the E2E `window.open` stub
now returns `null` for `noopener` like a browser does, and a popover
case covers both destinations.
- Left on the provider on purpose:
`useSubscriptionCheckout.recoverOutstandingPayment` and the
`payment_method_url` steps inside an operation are mid-checkout provider
steps, not hosted management; `invoices` and `result` are not served by
billing-web yet (`ComingSoonView`), so nothing mints them; the legacy
`/customers` rail's `accessBillingPortal` is being retired by the
personal-billing flip and is not touched.
- `@comfyorg/billing-contract` becomes a root `workspace:*` dependency.
The CI cloud build for E2E (`.github/actions/build-cloud-frontend`, used
only by `ci-tests-e2e.yaml` and
`pr-update-playwright-expectations.yaml`, never by a deploy) gets
`VITE_BILLING_WEB_URL=https://billing-web.example`, a reserved origin
the spec stubs, reachable only when the server flag says `billing_web`.
- No frontend-derived server state: the destination is the flag as-is;
the host chooses only the URL shape.

## AS-IS / TO-BE

| AS-IS — `hosted_billing_destination: stripe` | TO-BE —
`hosted_billing_destination: billing_web` |
| --- | --- |
| **1. User popover, "Plans and pricing" hovered**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/as-is-popover-plans.png"><br>Same
menu item, unchanged by the flag. | **1. User popover, "Plans and
pricing" hovered**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/to-be-popover-plans.png"><br>Same
menu item, unchanged by the flag. |
| **2. After clicking "Plans and pricing"**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/as-is-plans-result.png"><br>In-app
"Choose a Plan" dialog, no tab opened. | **2. After clicking "Plans and
pricing"**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/to-be-plans-result.png"><br>`billing-web.example/v1/pricing?product=comfyui&return_to=comfyui_workspace`
tab opens and nothing else: `window.open` returns `null` under
`noopener` as the spec requires, and no in-app dialog is left behind. |
| **3. Settings ▸ Workspace ▸ Plan & Credits, before clicking "Billing &
invoices"**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/as-is-settings-billing.png"><br>Identical
panel; the destination is only read on click. | **3. Settings ▸
Workspace ▸ Plan & Credits, before clicking "Billing &
invoices"**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/to-be-settings-billing.png"><br>Identical
panel; the destination is only read on click. |
| **4. After clicking "Billing & invoices"**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/as-is-manage-result.png"><br>`POST
/api/billing/payment-portal` recorded, and the URL it returned
(`https://billing.example/portal`) opened. | **4. After clicking
"Billing & invoices"**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/to-be-manage-result.png"><br>No
request to `/api/billing/payment-portal` on either rail;
`billing-web.example/v1/payment-methods?product=comfyui&return_to=comfyui_workspace`
minted and opened. |
| **5. Return trip — refocusing the app tab after the hosted tab
opened**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/as-is-return-refresh.png"><br>`/api/billing/status`,
`/balance` and `/capabilities` re-read. | **5. Return trip — refocusing
the app tab after the hosted tab opened**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/to-be-return-refresh.png"><br>Same
three reads; `openPortalWindow` + `refreshOnPortalReturn` still run on
the minted route. |

- AS-IS (`stripe`, today's default): popover → in-app pricing dialog;
settings → Stripe portal via `POST /billing/payment-portal`.
- TO-BE (`billing_web`): popover →
`<billing-web>/v1/pricing?product=comfyui&return_to=comfyui_workspace`;
settings → `<billing-web>/v1/payment-methods?…`, no portal request on
either rail; the app re-reads billing state on return.

## Testing

| Gate | Result |
| --- | --- |
| `vitest run src/platform/workspace src/composables/billing
src/composables/useFeatureFlags src/config` | 91 files, 1890 tests (19
new route cases: intent × destination × env × prefix × each fail-closed
branch; 3 new adapter cases; 3 popover cases re-pointed) |
| `packages/billing-contract` vitest | 3 files, 62 tests |
| `pnpm typecheck`, `typecheck:browser`, `lint`, `format`, `knip` | exit
0 |
| `fallow audit --changed-since origin/jaewon/fe-2216-plan-change` | no
issues in 10 changed files |
| `PLAYWRIGHT_TEST_URL=http://localhost:5431 pnpm exec playwright test
--project=cloud
browser_tests/tests/dialogs/hostedBillingDestination.spec.ts
--reporter=list`, against
`VITE_BILLING_WEB_URL=https://billing-web.example pnpm dev:cloud` | `4
passed (4.6s)` — settings on both destinations, plus the two new
avatar-menu cases: `opens the in-app pricing table from the avatar menu
while the destination is stripe` and `opens the billing-web pricing
entry alone from the avatar menu while the destination is billing_web` |

## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (#17662, #17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | #17783 (review) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | #17851 (review) |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | merged
(#17798) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | merged (#17798) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| merged (#17798) |
| 7 | billing-web unit tests in CI (`ci-billing-web-unit.yaml`) |
FE-2218 | merged (#17827, #17844) |
| 7 | ingest CORS + top-up return hosts for billing.comfy.org and its
previews (Comfy-Org/cloud) | FE-2218 | merged (Comfy-Org/cloud#9512) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | merged (#17798) |
| 7 | npm publish (`ingest-types`, `account-core`, `billing-contract`),
Platform install, billing-web live top-up | FE-2218 | todo |
| 6 | Contract tests per generated schema (package layer) | FE-2217 |
#17829 (review) |
| 6 | Live E2E per flow × consumer + evidence table | FE-2217 | todo
(needs staging flags) |
| 5 slice 2a | Cancel, resubscribe and payment portal through the SDK
behind `billing_sdk_subscription_enabled` | FE-2216 | #17853 (review) |
| 5 slice 2b | Subscribe and plan change through the SDK, priced by the
server | FE-2216 | #17856 (review; parent of this PR) |
| 7 / rollout C | Host mints billing-web `/v1/<intent>` entries with
`return_to` when `hosted_billing_destination` is `billing_web` | FE-2218
| **this PR** |
| follow-up | One `needsCustomerAttention` predicate (from the #17665
review) | FE-2216 | merged (#17792) |
| follow-up | Opaque `BillingServerCode` (from the #17656 review) |
FE-2227 | merged (#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the #17799
review) | FE-2215 | merged (#17824) |
| follow-up | credits / status / capabilities readers fence a late
failure as `SUPERSEDED` (from the #17798 review) | FE-2331 | merged
(#17828) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  CORS["cloud PR 9512 ingest CORS + return hosts"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6C["Phase 6 contract tests"]
  P6["Phase 6 live evidence"]
  S2A["PR 17853 slice 2a cancel / resubscribe / portal rail"]
  S2B["PR 17856 slice 2b subscribe + plan change"]
  LC["Layer C: host mints billing-web entries"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  FU13["reader late-failure fence"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2B
  HD --> S2A
  S2A --> S2B
  S2B --> LC
  RB --> LC
  HD --> LC
  LC --> P7
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  CORS --> P7
  P5 --> P6
  P3 --> P6C
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  P3 --> FU13
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style BWV fill:#d4edda,stroke:#155724
  style BWS fill:#d4edda,stroke:#155724
  style P8 fill:#d4edda,stroke:#155724
  style P8RD fill:#d4edda,stroke:#155724
  style CORS fill:#d4edda,stroke:#155724
  style FU13 fill:#d4edda,stroke:#155724
  style FU12 fill:#d4edda,stroke:#155724
  style FU11 fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style LC stroke:#0366d6,stroke-width:4px
```
dante01yoon added a commit that referenced this pull request Sep 17, 2026
…act when the hosted destination says billing_web (#17860)

Stacked on #17856 (base branch `jaewon/fe-2216-plan-change`) → #17853 →

Rollout layer C (`hosted_billing_destination`, `stripe` | `billing_web`,
PostHog at 100% `stripe`) decides where a hosted billing action lands.
The plan says the host reads the flag, hands it to the SDK (#17783) and,
when it says `billing_web`, mints a `/v1/<intent>` entry with
`return_to` from `@comfyorg/billing-contract`, the one definition of
that route surface (#17795); when it says `stripe`, the backend's URL is
opened unchanged. Today the host only opens the bare billing-web origin
from the user popover (#17716) with no intent and no `return_to`, and
"Billing & invoices" in the settings panel always goes to the Stripe
portal. This is the last un-opened code item before the Phase 7 host
proof.

- `src/platform/workspace/billing/hostedBillingRoutes.ts`:
`hostedBillingRoute(destination, intent)` returns `{ kind:
'billing_web', url }` built by `buildBillingEntryUrl({ billingOrigin,
intent, product: 'comfyui', returnTo: 'comfyui_workspace' })`, or `{
kind: 'provider' }` meaning "use the server's URL". The environment is
derived, not hardcoded: the cloud base URL's hostname through the
existing `resolveDeployEnv` map (`prod-v2 | stg-v2 | test-v2` →
`production | staging | test`), which also classifies a local dev
session by the backend it talks to. Fails closed to the provider on: no
configured origin, an unknown backend family, a return target with no
destination in that family, or an entry the contract refuses. A
path-prefixed `VITE_BILLING_WEB_URL` keeps its prefix under the minted
route.
- Consumers: the popover's "Plans and pricing" mints the `pricing`
intent (billing-web routes it to the subscription view; the in-app
dialog stays the `stripe` behaviour and the popup-blocked fallback);
`useWorkspaceBilling.manageSubscription()` mints `payment-methods`
**before** either rail is consulted, so on `billing_web` no portal URL
is requested on the SDK rail or the legacy one, and `openPortalWindow` +
`refreshOnPortalReturn` still run so the return re-reads status, balance
and capabilities.
- Also fixed on the way: the popover treated a falsy `window.open(…,
"noopener,noreferrer")` result as a blocked popup and showed the in-app
pricing dialog as a fallback. Per the HTML spec `noopener` always
returns `null`, so on `billing_web` the tab and the dialog opened
together — a latent defect inherited from #17370 on `main`, caught by
this PR's evidence run. The fallback is gone; the E2E `window.open` stub
now returns `null` for `noopener` like a browser does, and a popover
case covers both destinations.
- Left on the provider on purpose:
`useSubscriptionCheckout.recoverOutstandingPayment` and the
`payment_method_url` steps inside an operation are mid-checkout provider
steps, not hosted management; `invoices` and `result` are not served by
billing-web yet (`ComingSoonView`), so nothing mints them; the legacy
`/customers` rail's `accessBillingPortal` is being retired by the
personal-billing flip and is not touched.
- `@comfyorg/billing-contract` becomes a root `workspace:*` dependency.
The CI cloud build for E2E (`.github/actions/build-cloud-frontend`, used
only by `ci-tests-e2e.yaml` and
`pr-update-playwright-expectations.yaml`, never by a deploy) gets
`VITE_BILLING_WEB_URL=https://billing-web.example`, a reserved origin
the spec stubs, reachable only when the server flag says `billing_web`.
- No frontend-derived server state: the destination is the flag as-is;
the host chooses only the URL shape.

| AS-IS — `hosted_billing_destination: stripe` | TO-BE —
`hosted_billing_destination: billing_web` |
| --- | --- |
| **1. User popover, "Plans and pricing" hovered**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/as-is-popover-plans.png"><br>Same
menu item, unchanged by the flag. | **1. User popover, "Plans and
pricing" hovered**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/to-be-popover-plans.png"><br>Same
menu item, unchanged by the flag. |
| **2. After clicking "Plans and pricing"**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/as-is-plans-result.png"><br>In-app
"Choose a Plan" dialog, no tab opened. | **2. After clicking "Plans and
pricing"**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/to-be-plans-result.png"><br>`billing-web.example/v1/pricing?product=comfyui&return_to=comfyui_workspace`
tab opens and nothing else: `window.open` returns `null` under
`noopener` as the spec requires, and no in-app dialog is left behind. |
| **3. Settings ▸ Workspace ▸ Plan & Credits, before clicking "Billing &
invoices"**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/as-is-settings-billing.png"><br>Identical
panel; the destination is only read on click. | **3. Settings ▸
Workspace ▸ Plan & Credits, before clicking "Billing &
invoices"**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/to-be-settings-billing.png"><br>Identical
panel; the destination is only read on click. |
| **4. After clicking "Billing & invoices"**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/as-is-manage-result.png"><br>`POST
/api/billing/payment-portal` recorded, and the URL it returned
(`https://billing.example/portal`) opened. | **4. After clicking
"Billing & invoices"**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/to-be-manage-result.png"><br>No
request to `/api/billing/payment-portal` on either rail;
`billing-web.example/v1/payment-methods?product=comfyui&return_to=comfyui_workspace`
minted and opened. |
| **5. Return trip — refocusing the app tab after the hosted tab
opened**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/as-is-return-refresh.png"><br>`/api/billing/status`,
`/balance` and `/capabilities` re-read. | **5. Return trip — refocusing
the app tab after the hosted tab opened**<br><img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17860-screenshots/screenshots/to-be-return-refresh.png"><br>Same
three reads; `openPortalWindow` + `refreshOnPortalReturn` still run on
the minted route. |

- AS-IS (`stripe`, today's default): popover → in-app pricing dialog;
settings → Stripe portal via `POST /billing/payment-portal`.
- TO-BE (`billing_web`): popover →
`<billing-web>/v1/pricing?product=comfyui&return_to=comfyui_workspace`;
settings → `<billing-web>/v1/payment-methods?…`, no portal request on
either rail; the app re-reads billing state on return.

| Gate | Result |
| --- | --- |
| `vitest run src/platform/workspace src/composables/billing
src/composables/useFeatureFlags src/config` | 91 files, 1890 tests (19
new route cases: intent × destination × env × prefix × each fail-closed
branch; 3 new adapter cases; 3 popover cases re-pointed) |
| `packages/billing-contract` vitest | 3 files, 62 tests |
| `pnpm typecheck`, `typecheck:browser`, `lint`, `format`, `knip` | exit
0 |
| `fallow audit --changed-since origin/jaewon/fe-2216-plan-change` | no
issues in 10 changed files |
| `PLAYWRIGHT_TEST_URL=http://localhost:5431 pnpm exec playwright test
--project=cloud
browser_tests/tests/dialogs/hostedBillingDestination.spec.ts
--reporter=list`, against
`VITE_BILLING_WEB_URL=https://billing-web.example pnpm dev:cloud` | `4
passed (4.6s)` — settings on both destinations, plus the two new
avatar-menu cases: `opens the in-app pricing table from the avatar menu
while the destination is stripe` and `opens the billing-web pricing
entry alone from the avatar menu while the destination is billing_web` |

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (#17662, #17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | #17783 (review) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | #17851 (review) |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | merged
(#17798) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | merged (#17798) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| merged (#17798) |
| 7 | billing-web unit tests in CI (`ci-billing-web-unit.yaml`) |
FE-2218 | merged (#17827, #17844) |
| 7 | ingest CORS + top-up return hosts for billing.comfy.org and its
previews (Comfy-Org/cloud) | FE-2218 | merged (Comfy-Org/cloud#9512) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | merged (#17798) |
| 7 | npm publish (`ingest-types`, `account-core`, `billing-contract`),
Platform install, billing-web live top-up | FE-2218 | todo |
| 6 | Contract tests per generated schema (package layer) | FE-2217 |
| 6 | Live E2E per flow × consumer + evidence table | FE-2217 | todo
(needs staging flags) |
| 5 slice 2a | Cancel, resubscribe and payment portal through the SDK
behind `billing_sdk_subscription_enabled` | FE-2216 | #17853 (review) |
| 5 slice 2b | Subscribe and plan change through the SDK, priced by the
server | FE-2216 | #17856 (review; parent of this PR) |
| 7 / rollout C | Host mints billing-web `/v1/<intent>` entries with
`return_to` when `hosted_billing_destination` is `billing_web` | FE-2218
| **this PR** |
| follow-up | One `needsCustomerAttention` predicate (from the #17665
review) | FE-2216 | merged (#17792) |
| follow-up | Opaque `BillingServerCode` (from the #17656 review) |
FE-2227 | merged (#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the #17799
review) | FE-2215 | merged (#17824) |
| follow-up | credits / status / capabilities readers fence a late
failure as `SUPERSEDED` (from the #17798 review) | FE-2331 | merged
(#17828) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  CORS["cloud PR 9512 ingest CORS + return hosts"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6C["Phase 6 contract tests"]
  P6["Phase 6 live evidence"]
  S2A["PR 17853 slice 2a cancel / resubscribe / portal rail"]
  S2B["PR 17856 slice 2b subscribe + plan change"]
  LC["Layer C: host mints billing-web entries"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  FU13["reader late-failure fence"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2B
  HD --> S2A
  S2A --> S2B
  S2B --> LC
  RB --> LC
  HD --> LC
  LC --> P7
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  CORS --> P7
  P5 --> P6
  P3 --> P6C
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  P3 --> FU13
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style BWV fill:#d4edda,stroke:#155724
  style BWS fill:#d4edda,stroke:#155724
  style P8 fill:#d4edda,stroke:#155724
  style P8RD fill:#d4edda,stroke:#155724
  style CORS fill:#d4edda,stroke:#155724
  style FU13 fill:#d4edda,stroke:#155724
  style FU12 fill:#d4edda,stroke:#155724
  style FU11 fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style LC stroke:#0366d6,stroke-width:4px
```
pull Bot pushed a commit to Mu-L/ComfyUI_frontend that referenced this pull request Sep 17, 2026
…contract and ingest-types (Comfy-Org#17882)

## Why

`@comfyorg/account-core`, `@comfyorg/billing-contract` and
`@comfyorg/ingest-types` are about to be installed by Platform from the
public registry, and today none of them can be packed: `exports` point
at `src/*.ts`, there is no `files` allowlist, no build, and the core
still reaches into a private workspace utility. The release workflows on
Comfy-Org#17881 assume `build` and `smoke:pack` exist; this PR is the part that
makes a tarball installable in plain Node.

Built on Comfy-Org#17854 (auth Vue surface → `account-ui`, now merged) so the
core builds from a Vue-free tree, and it reproduces Maanil's Comfy-Org#17838 /
Comfy-Org#17839 / Comfy-Org#17840 on the renamed tree as agreed in the review thread
there. Base is `main`.

## How

- **Private-utility cut** — the one remaining reach out of the core was
`turnstileScript.ts` →
`@comfyorg/shared-frontend-utils/loadExternalScript`. The loader is now
package-owned (`packages/account-core/src/loadExternalScript.ts`,
byte-identical) and `@comfyorg/shared-frontend-utils` leaves the core's
dependencies. `publishBoundary.test.ts` fails on any future `workspace:`
dependency that is not itself published (`@comfyorg/ingest-types` is the
only allowed one).
- **Manifests** — `files: ["dist"]`, `sideEffects: false`,
`repository`/`homepage`/`author`, MIT `LICENSE` per package,
`publishConfig.exports` mapping every dev `exports` entry to `dist/*.js`
+ `.d.ts`, `./package.json` export, `access: public`.
`@comfyorg/ingest-types` moves `zod` to a peer so a consumer never gets
two zod copies. `private: true` stays on all three (`ingest-types` had
no `private` at all; it now has the latch). Flipping `private` is a
one-line change per manifest in a later reviewed PR.
- **Build** — `tsconfig.build.json` per package (`declaration`,
`noEmitOnError`, `types: []`, tests and fixtures excluded), `build` =
`clean` + `tsc -p`, `prepack` runs it. Relative imports carry `.js` so
the emitted ESM resolves under `nodenext`; `openapi-ts.config.ts` sets
`importFileExtension: '.js'` so regeneration keeps it.
- **Smoke pack** — `scripts/smokePack.ts` (run as `pnpm --filter
@comfyorg/account-core smoke:pack`) packs all three, checks each tarball
(no source/test/fixture files, every export target present, no
unrewritten `catalog:`/`workspace:`), installs them into a throwaway npm
project, imports all 21 entries from plain Node ESM, and type-checks a
`nodenext` consumer. Dropping one `.js` extension makes the typed step
fail with `TS2835`, which the plain-Node step alone would not catch.
- **CI** — `ci-packages-pack.yaml` on `pull_request` for the three
package paths: matrix job per package (typecheck → build → `check:pack`)
plus one `smoke-consumer` job. The tarball rules live in one pure
module, `publishableTarball.ts`, with its own test file; the CLI and the
smoke test are two entry points onto it, so CI and the smoke test cannot
drift.

Deliberate divergences from Comfy-Org#17839: no `region` export and no deletion
in `shared-frontend-utils/networkUtil.ts` (the region gate moved to
`account-ui` with the Vue surface and three app suites still import it);
`createScriptLoader` stays in the shared package for its three
`src/platform` callers.

Open point: the root `LICENSE` is GPL-3.0 while all three manifests
already declare MIT (as `@comfyorg/design-system` publishes). Without a
per-package file pnpm would inject the GPL text into a tarball whose
manifest says MIT, so the MIT files fix the actual defect; whether the
SDK packages should be MIT at all is a call for the reviewer to confirm.

## AS-IS / TO-BE

No UI change; packages, scripts and CI only.

- AS-IS: `pnpm pack` on any of the three ships `src/*.ts` (or nothing)
with `exports` a consumer cannot resolve, and the core depends on a
private workspace package.
- TO-BE: `smoke:pack` proves the three tarballs install and import from
plain Node with types, and CI runs that proof on every change to the
packages.

## Testing

| Check | Result |
| --- | --- |
| `build` account-core / billing-contract / ingest-types | 92 / 18 / 6
dist files |
| `smoke:pack` | 3 packed, 21 entries imported under Node ESM,
`nodenext` tsc clean |
| vitest account-core / account-ui / billing-contract / billing-web |
675 / 79 / 62 / 90 pass |
| `pnpm typecheck`, `pnpm lint`, `pnpm format:check`, `pnpm knip` (with
`dist` on disk) | exit 0 |
| `yamllint` on the new workflow | clean |

## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (Comfy-Org#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (Comfy-Org#17662, Comfy-Org#17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (Comfy-Org#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (Comfy-Org#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | Comfy-Org#17783 (review, carries slice 2a) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (Comfy-Org#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | merged (Comfy-Org#17851) |
| 7 prep | Auth Vue surface → `account-ui`; core Vue-free by
construction | FE-2215 | merged (Comfy-Org#17854) |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (Comfy-Org#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (Comfy-Org#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (Comfy-Org#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | merged
(Comfy-Org#17798) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | merged (Comfy-Org#17798) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| merged (Comfy-Org#17798) |
| 7 | billing-web unit tests in CI (`ci-billing-web-unit.yaml`) |
FE-2218 | merged (Comfy-Org#17827, Comfy-Org#17844) |
| 7 | ingest CORS + top-up return hosts for billing.comfy.org and its
previews (Comfy-Org/cloud) | FE-2218 | merged (Comfy-Org/cloud#9512) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | merged (Comfy-Org#17798) |
| 7 | Package release workflows + versioning ADR (bump PR → publish on
merge, snapshots) | FE-2218 | Comfy-Org#17881 (review) |
| 7 | Publish readiness: dist build, files allowlist, pack smoke test,
private-utility cut | FE-2218 | **this PR** |
| 7 | First publish (`private` off), Platform install, billing-web live
top-up | FE-2218 | todo |
| 6 | Contract tests per generated schema (package layer) | FE-2217 |
Comfy-Org#17829 (review) |
| 6 | Live E2E per flow × consumer + evidence table | FE-2217 | todo
(needs staging flags) |
| 5 slice 2 | Subscription flows through the SDK | FE-2216 | Comfy-Org#17856 /
Comfy-Org#17860 (review) |
| follow-up | One `needsCustomerAttention` predicate (from the Comfy-Org#17665
review) | FE-2216 | merged (Comfy-Org#17792) |
| follow-up | Opaque `BillingServerCode` (from the Comfy-Org#17656 review) |
FE-2227 | merged (Comfy-Org#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the Comfy-Org#17799
review) | FE-2215 | merged (Comfy-Org#17824) |
| follow-up | credits / status / capabilities readers fence a late
failure as `SUPERSEDED` (from the Comfy-Org#17798 review) | FE-2331 | merged
(Comfy-Org#17828) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename (merged)"]
  AV["auth Vue surface to account-ui (merged)"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  CORS["cloud PR 9512 ingest CORS + return hosts"]
  RW["PR 17881 release workflows + ADR"]
  PR["publish readiness: dist, files, smoke pack"]
  PUB["first publish account-core / billing-contract / ingest-types"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6C["Phase 6 contract tests"]
  P6["Phase 6 live evidence"]
  S2["Phase 5 slice 2 subscription"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  FU13["reader late-failure fence"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> AV
  AV --> PR
  RW --> PUB
  PR --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  CORS --> P7
  P5 --> P6
  P3 --> P6C
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  P3 --> FU13
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style BWV fill:#d4edda,stroke:#155724
  style BWS fill:#d4edda,stroke:#155724
  style P8 fill:#d4edda,stroke:#155724
  style P8RD fill:#d4edda,stroke:#155724
  style CORS fill:#d4edda,stroke:#155724
  style FU13 fill:#d4edda,stroke:#155724
  style FU12 fill:#d4edda,stroke:#155724
  style FU11 fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style RN fill:#d4edda,stroke:#155724
  style AV fill:#d4edda,stroke:#155724
  style PR stroke:#0366d6,stroke-width:4px
```
pull Bot pushed a commit to Mu-L/ComfyUI_frontend that referenced this pull request Sep 17, 2026
…codes (Comfy-Org#17829)

Linear FE-2217.

## Why

The billing SDK core decodes generated zod schemas from
`@comfyorg/ingest-types/zod`, which a bot regenerates from the cloud
OpenAPI whenever the backend moves. Today a regen that renames a field,
drops it, or widens an enum the reducer switches on surfaces either as a
typecheck error somewhere deep in the core or, worse, as a runtime
`MALFORMED_RESPONSE` in front of a customer mid-payment. Nothing states,
in one readable place, which fields of which schema the SDK actually
depends on.

This adds a contract test per generated schema the core decodes. Each
pins the fields the core reads and the enum members it branches on, at
the type level and at parse time, so a regen that changes one of them
fails a named block whose name says what broke — the parse rows under
`vitest run`, the `expectTypeOf` exhaustiveness pins under the package
typecheck. A failure here means the backend contract moved: fix the SDK,
not the test.

These are pins, not behaviour: reader and command behaviour stays
covered by the existing `credits.test.ts`, `status.test.ts`,
`capabilities.test.ts`, `operationState.test.ts`,
`subscriptionCommands.test.ts`, and `topup.test.ts`.

## How

New folder `packages/account-core/src/core/billing/contracts/`, one file
per endpoint contract, picked up by the package's existing
`src/core/**/*.{test,spec}.ts` include. Each file holds a canonical
fixture typed as `z.input<typeof schema>` built by a small typed builder
(no casts), parses it with `safeParse`, pins the output type with
`expectTypeOf`, and runs one `it.for` row per enum value the SDK
branches on.

| Schema | Module that decodes it | Fields pinned |
| --- | --- | --- |
| `zBillingBalanceResponse` | `credits.ts` (read by `topup.ts`,
`balanceWatch.ts`) | `amount_micros` as a number; the four optional
breakdown micros |
| `zBillingStatusResponse` | `status.ts` (read by
`operationLifecycle.ts`, `subscriptionCommands.ts`, `presentation.ts`) |
`billing_rail` (3), `pending_billing_op_id`, `pending_billing_op_type`
(2), `action_url`, `payment_intent_client_secret`, `is_active`,
`subscription_tier` (7), `subscription_status` (3) |
| `zBillingCapabilitiesResponse`, `zBillingCapabilities`,
`zBillingCapabilityScope`, `zBillingCapabilityRolloutDefaults` |
`capabilities.ts` (which parses the three named pieces, not the response
schema) | the five response keys the reader recomposes into its own
schema, reading `expires_at` as a plain string and `revision` as a
number; all seven capability booleans; `resolved_for.user_id` /
`workspace_id`; `expires_at`; `revision` as an int64 bounded to the
JavaScript-safe range the reader reads it back as a number over;
`denied_reasons` absent from the contract, which is why
`capabilityDenials.ts` decodes it off the raw body |
| `zBillingOpStatusResponse` | `operationLifecycle.ts`,
`operationState.ts` | `id`; `status` (the 4 the reducer handles);
`authentication_state` (the 5 it reads or assigns); `decline_reason` (8,
incl. the `generic` fallback); `recovery_action` (4); `phase` (3);
`action_url`; `payment_intent_client_secret`; `retryable` optional |
| `zErrorResponse` | `billingErrorBody.ts` | `code` as an open string
the commands match against their own closed set; a body without
`message` yields no code |
| `zSubscribeRequest`, `zSubscribeResponse` | `subscriptionCommands.ts`
| `confirmation_token`, `saved_payment_method_id` (`pm_` prefix),
`idempotency_key`, `confirm_reactivation`; `billing_op_id`, `status`
(3), optional `payment_method_url` |
| `zResubscribeResponse` | `subscriptionCommands.ts` | `billing_op_id`
regardless of `status` (2) |
| `zCancelSubscriptionResponse2` | `subscriptionCommands.ts` |
`billing_op_id` on both members of the response union |
| `zPaymentPortalResponse` | `subscriptionCommands.ts` | `url` required,
and not https-checked by the schema, which is why the command re-checks
it |
| `zPreviewSubscribeRequest`, `zPreviewSubscribeResponse` |
`subscriptionCommands.ts` | `plan_slug` required and the three optional
request fields; `allowed`, `is_immediate`, `effective_at`,
`transition_type` (4), the int64 money fields and their JSON-number
coercion, `discounts`, `requires_reactivation_confirmation` |
| `zCreateTopupRequest`, `zCreateTopupResponse` | `topup.ts` |
`amount_cents` minimum and its int64 coercion of the JSON number the
command validates but does not send; `idempotency_key`; `billing_op_id`
regardless of `status` (3) |
| `zCreateTopupCheckoutRequest`, `zCreateTopupCheckoutResponse` |
`topup.ts` | the amount bounds and the `return_url` URL rule, pinned by
the issue **path** the command reads to tell the two apart;
`checkout_url` required, `session_id` optional |

`capabilityDenials.ts` is the one billing module that decodes without a
generated schema — deliberately, since a strict enum parse would lose
the whole capability set the first time the server names an unfamiliar
policy branch. Its absence from the generated contract is pinned in
`billingCapabilities.contract.test.ts`.

## AS-IS / TO-BE

No UI. A regenerated `zBillingOpStatusResponse` that adds a fifth
`status`:

- AS-IS: the new value falls through `terminalFromStatus` into the
pending branch; the operation polls until its budget runs out and
reports `timed_out`.
- TO-BE: `billingOpStatus.contract.test.ts` fails on the regen PR,
naming the reducer as what needs updating. Two gates, and which one
fires depends on the pin: the enum rows (`accepts the %s status`) fail
under `vitest run`, while the exhaustiveness pin at
`billingOpStatus.contract.test.ts:36` sits at module scope and fails as
a TS2344 under the package typecheck, not in the test run.

## Testing

- `cd packages/account-core && vitest run src/core/billing/contracts` —
12 files, 90 tests, all passing. The type pins are not among them: they
sit at module scope and fail `pnpm --filter @comfyorg/account-core
typecheck` instead, because nothing here runs `vitest --typecheck`.
- `cd packages/account-core && tsc --noEmit` — clean
- `pnpm typecheck` — passing; verified the type pins bite by injecting a
spurious enum member and watching `expectTypeOf` fail with TS2344
- `pnpm lint`, `pnpm format`, `pnpm knip` — passing
- `fallow audit --changed-since origin/main` — no issues in the 13
changed files
## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (Comfy-Org#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (Comfy-Org#17662, Comfy-Org#17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (Comfy-Org#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (Comfy-Org#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | open (Comfy-Org#17783, carries slice 2a) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (Comfy-Org#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | merged (Comfy-Org#17851) — this PR sits on it |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (Comfy-Org#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (Comfy-Org#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (Comfy-Org#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | merged
(Comfy-Org#17798) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | merged (Comfy-Org#17798) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| merged (Comfy-Org#17798) |
| 7 | billing-web unit tests in CI (`ci-billing-web-unit.yaml`) |
FE-2218 | merged (Comfy-Org#17827, Comfy-Org#17844) |
| 7 | ingest CORS + top-up return hosts for billing.comfy.org and its
previews (Comfy-Org/cloud) | FE-2218 | merged (Comfy-Org/cloud#9512) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | merged (Comfy-Org#17798) |
| 7 | Publish readiness: dist build, files allowlist, pack smoke test |
FE-2218 | merged (Comfy-Org#17882) |
| 7 | Package release workflows + versioning ADR | FE-2218 | open
(Comfy-Org#17881) |
| 7 | First publish (`private` off), Platform install, billing-web live
top-up | FE-2218 | todo |
| 6 | Contract tests per generated schema (package layer) | FE-2217 |
**this PR** |
| 6 | Live E2E per flow × consumer + evidence table | FE-2217 | todo
(needs staging flags) |
| 5 slice 2 | Subscription flows through the SDK | FE-2216 | open
(Comfy-Org#17856, Comfy-Org#17860) |
| follow-up | One `needsCustomerAttention` predicate (from the Comfy-Org#17665
review) | FE-2216 | merged (Comfy-Org#17792) |
| follow-up | Opaque `BillingServerCode` (from the Comfy-Org#17656 review) |
FE-2227 | merged (Comfy-Org#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the Comfy-Org#17799
review) | FE-2215 | merged (Comfy-Org#17824) |
| follow-up | credits / status / capabilities readers fence a late
failure as `SUPERSEDED` (from the Comfy-Org#17798 review) | FE-2331 | open
(Comfy-Org#17828) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  CORS["cloud PR 9512 ingest CORS + return hosts"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6C["Phase 6 contract tests"]
  P6["Phase 6 live evidence"]
  S2["Phase 5 slice 2 subscription"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  FU13["reader late-failure fence"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  CORS --> P7
  P5 --> P6
  P3 --> P6C
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  P3 --> FU13
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style P6C stroke:#0366d6,stroke-width:4px
```
pull Bot pushed a commit to Mu-L/ComfyUI_frontend that referenced this pull request Sep 17, 2026
…ng operation lifecycle (Comfy-Org#17783)

Linear FE-2210 / FE-2218.

## Why

The billing rollout turns three independent switches: (A) the host
adoption flag that
picks legacy billing or the SDK, (B) the SDK's presentation routing —
embedded challenge
or hosted page, decided by `selectBillingPresentation`, and (C) the
hosted destination —
which origin actually serves a hosted page: the provider page behind the
backend's
`action_url`, or the hosted billing app.

C is a host fact. Only the host can read the server flag
`hosted_billing_destination`, so
the SDK must take it as a port rather than infer it, exactly like
`embeddedCheckoutAvailable`.
And it has to reach operation state, not just the routing function: a
consumer holding a
hosted operation has to decide from the state alone whether to open
`actionUrl` or hand the
operation to the billing-web route. The tab pointer stores only the
operation id, so a
recovered operation has to re-read the port rather than replay a stored
answer.

The route builder that consumes the value lands in a later PR; this one
only makes the
value available.

## How

- `HostedBillingDestination = 'stripe' | 'billing_web'` now lives in the
SDK core
(`operationState.ts`, next to `BillingPresentation`) and is exported
from
`@comfyorg/account/billing`. `src/config/billingWeb.ts` re-exports the
core type and
keeps `normalizeHostedBillingDestination` as the host's flag-narrowing
boundary.
- New optional lifecycle port `hostedDestination?: () =>
HostedBillingDestination`.
Absent means `stripe`, so a host that never wires it keeps every hosted
operation on
  the provider page.
- `BillingOperationState` carries `hostedDestination` while
`presentation === 'hosted'`
and nothing otherwise. The port is read whenever the lifecycle routes an
operation
  hosted — on `begin`, on `recover` (server pending or pointer), and on
`switchPresentation(id, 'hosted')`; a switch back to embedded drops it.
- `reduceBillingOperation` stays pure: `presentation_switched` now
carries the
destination on its hosted variant instead of the reducer reading a port.
- Host: `createBillingSdk` requires `hostedDestination` — the
composition root is the one
place that knows the server flag, so it is not optional there, the same
as
  `embeddedCheckoutAvailable`; `billingSdkStore` passes
  `() => flags.hostedBillingDestination`.
- `projectPaymentStep` and the eight-state projection are untouched.

## AS-IS / TO-BE

No UI change. AS-IS a hosted operation's state says only that it is
hosted, so nothing
downstream can tell the provider page from the billing app. TO-BE the
same state also
says which origin serves it, re-read from the host port at every
adoption — including an
operation recovered after a reload — with `stripe` as the fail-toward
default.

## Testing

- `packages/account` Vitest: 38 files / 592 tests green. Three new
lifecycle cases
(absent port vs `billing_web` on begin, re-read on recovery from the
pointer,
adopt-on-switch and drop-on-rollback); the existing reducer switch test
extended with
  the destination assertions.
- Root Vitest over `src/platform/workspace/billing`, `src/config`,
`useFeatureFlags.test.ts`: 10 files / 153 tests green, including one new
  `createBillingSdk` case proving the option reaches the lifecycle.
- `packages/account-ui` Vitest: 6 files / 23 tests green, unchanged.
- `pnpm typecheck`, `pnpm lint`, `pnpm format`, `pnpm knip`, and
  `fallow audit --changed-since origin/main` all clean.

Independent of Comfy-Org#17782;
both touch the lifecycle options and the app composition root, so
whichever lands second gets a one-line rebase.

## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (Comfy-Org#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (Comfy-Org#17662, Comfy-Org#17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (Comfy-Org#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (Comfy-Org#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | **this PR** |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | open (Comfy-Org#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | local, opens after Comfy-Org#17782 and Comfy-Org#17783 |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | todo |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
todo |
| 8 | `previewSubscribe`, plans, payment-methods readers + account-ui +
billing-web views | FE-2331 | todo |
| 7 | npm publish (`ingest-types`, `account-core`, `billing-contract`),
Platform install, billing-web live top-up | FE-2218 | todo |
| 6 | Contract tests + live E2E per flow × consumer | FE-2217 | todo |
| 5 slice 2 | Subscription flows through the SDK | FE-2216 | todo
(plan-change decision) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8["Phase 8 readers + billing-web views"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6["Phase 6 evidence"]
  S2["Phase 5 slice 2 subscription"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RB --> PUB
  PUB --> P7
  P4 --> P8
  P8 --> S2
  P5 --> P6
  P5 --> WS
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style HD stroke:#0366d6,stroke-width:4px
```
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 17, 2026
…ced by the server (Comfy-Org#17856)

Stacked on Comfy-Org#17853 (base branch `jaewon/fe-2216-subscription-rail`),
which stacks on Comfy-Org#17783; merge those first.

## Why

Slice 2a (Comfy-Org#17853) put cancel, resubscribe and the payment portal on the
SDK rail. Subscribe — new subscriptions and plan changes — was left on
the legacy call because the SDK's `subscribe` refused an active
subscription on the client (`active → ALREADY_HELD`) and routed a
scheduled cancel to `resubscribe()`, which carries no plan. Both
contradict what the host already does: `useWorkspaceBilling.subscribe`
posts `/billing/subscribe` whatever the subscription state,
`useSubscriptionCheckout` quotes the change first with
`previewSubscribe`, and the server prices the change, reactivates or
refuses (`REACTIVATION_CONFIRMATION_REQUIRED` exists for exactly that).
Decision (2026-09-16): mirror the host; no product change.

## How

- **Core.** `subscribe()` issues `POST /billing/subscribe` for every
subscription state and never short-circuits; the client-side eligibility
switch, `eligibilityOf` and its type are gone (nothing else read them).
`resubscribe()` stays the explicit "resume" command.
`docs/billing-command-eligibility.md` (the path the module doc already
referenced) now records the route per command and that the status read
decides nothing for subscribe.
- **Core, quote decoding.** The generated zod for the preview coerces
every int64 to `bigint` while the generated TS type for the same fields
is `number`, so the SDK's quote was not assignable to the host's
`PreviewSubscribeResponse`. The cents fields are decoded as `z.number()`
via `.extend` on the generated schemas (the precedent `capabilities.ts`
sets for `revision`; money on this route is bounded to cents well inside
the safe range). The two types are now structurally identical and `pnpm
typecheck` proves the assignment with no hand-written projection.
- **Host.** On the rail (read once per action, as in 2a)
`useWorkspaceBilling.subscribe` maps `SubscribeOptions → SubscribeInput`
field for field (`confirmationToken` / `savedPaymentMethodId` empty →
dropped, as the workspace client does; nothing dropped otherwise) and
runs `sdk.commands.subscribe`; `previewSubscribe` runs
`sdk.commands.previewSubscribe`. Both share 2a's route latch (404 →
legacy once), and every other failure is thrown as a `WorkspaceApiError`
whose `.code` carries the server code verbatim, so
`useSubscriptionCheckout` and `useDowngradeToPersonal` keep branching on
`REACTIVATION_CONFIRMATION_REQUIRED`, `SUBSCRIPTION_PAYMENT_REQUIRED`,
`OUTSTANDING_PAYMENT_REQUIRED`, `TRANSITION_NOT_ALLOWED`,
`PRORATION_QUOTE_EXPIRED`, `SUBSCRIPTION_QUOTE_STALE` unchanged.
- **Customer steps.** The SDK settles the operation inside
`subscribe()`, so nothing else watches it: the store's lifecycle
subscriber now handles non-topup pending states — the existing in-page
challenge driver, and a once-per-operation `window.open(actionUrl)` with
the same popup-blocked toast the checkout shows. Without both, a 3DS
plan change or a `needs_payment_method` answer would time out with
nothing on screen.
- **Settled response.** A settled subscribe projects to the `{
billing_op_id, status: 'subscribed' }` body `handleSubscribeResponse`
already handles; `needs_payment_method` / `pending_payment` never reach
the host because the lifecycle drove them first.
- Not on the rail: `teamSubscriptionCheckoutUtil.ts` calls
`workspaceApi.subscribe` directly and stays legacy on both rails;
`savePendingSubscriptionCheckout` and checkout-journey `billing_op_id`
linking run after settlement rather than at issue, because the SDK does
not surface the issued operation (recovery across reloads is the
lifecycle's `recover()`).

## AS-IS / TO-BE

Same journey on both: `?pricing=creator&cycle=yearly` against an active
`standard-annual` subscription on the `stripe` rail, 1280×800, every
endpoint mocked.

| State | AS-IS — `billing_sdk_subscription_enabled: false` | TO-BE —
`billing_sdk_subscription_enabled: true` |
| --- | --- | --- |
| "Confirm your upgrade" with the quote | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17856-screenshots/screenshots/as-is-confirm-upgrade.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17856-screenshots/screenshots/to-be-confirm-upgrade.png">
|
| "You're all set" after confirming | <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17856-screenshots/screenshots/as-is-all-set.png">
| <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17856-screenshots/screenshots/to-be-all-set.png">
|
| Recorded `subscribe` request (quote above it carries no key on either
rail) | no `Idempotency-Key` <br> <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17856-screenshots/screenshots/as-is-subscribe-headers.png">
| `Idempotency-Key` present and echoed as `idempotency_key` <br> <img
width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17856-screenshots/screenshots/to-be-subscribe-headers.png">
|
| `POST /billing/subscribe` answers 404 | one POST, the click fails
("Request failed with status code 404") <br> <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17856-screenshots/screenshots/as-is-404-fallback.png">
| two POSTs from one click — first with the key → 404, second without →
200, "You're all set" <br> <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17856-screenshots/screenshots/to-be-404-fallback.png">
|
| Server answers `REACTIVATION_CONFIRMATION_REQUIRED` | re-quotes, shows
the reactivation panel and the coded toast <br> <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17856-screenshots/screenshots/as-is-reactivation-required.png">
| identical panel, toast and CTA on the rail <br> <img width="480"
src="https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/assets/pr-17856-screenshots/screenshots/to-be-reactivation-required.png">
|

- AS-IS (flag off): quote and subscribe go through the workspace API; a
3DS or payment-method step is driven by the checkout composable off the
raw response.
- TO-BE (flag on): the same screens and copy; quote and subscribe go
through the SDK transport (`Idempotency-Key` on the subscribe POST),
settlement through the operation lifecycle; a 404 falls back to the
legacy call.

## Testing

| Gate | Result |
| --- | --- |
| `packages/account` vitest | 39 files, 634 tests (new: active plan
change issues the request; canceled carries `plan_slug` +
`confirm_reactivation`; `REACTIVATION_CONFIRMATION_REQUIRED` surfaces
coded) |
| host vitest (billing sdk, composables/billing, workspace composables +
stores, feature flags) | 41 files, 1151 tests |
| `pnpm typecheck`, `typecheck:browser`, `lint`, `format`, `knip` | exit
0 |
| `fallow audit --changed-since origin/jaewon/fe-2216-subscription-rail`
| no issues in 10 changed files, complexity 0, duplication 0 |
| Playwright cloud: `planChangeSdkRail.spec.ts` (3) +
`cancelSubscriptionSdkRail.spec.ts` (3) | `6 passed (11.5s)` —
`PLAYWRIGHT_TEST_URL=http://localhost:5173 pnpm exec playwright test
--project=cloud browser_tests/tests/dialogs/planChangeSdkRail.spec.ts
browser_tests/tests/dialogs/cancelSubscriptionSdkRail.spec.ts
--reporter=list` against a `pnpm dev:cloud` vite server, all endpoints
mocked |

## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (Comfy-Org#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (Comfy-Org#17662, Comfy-Org#17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (Comfy-Org#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (Comfy-Org#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | Comfy-Org#17783 (review) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (Comfy-Org#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | Comfy-Org#17851 (review) |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (Comfy-Org#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (Comfy-Org#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (Comfy-Org#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | merged
(Comfy-Org#17798) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | merged (Comfy-Org#17798) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| merged (Comfy-Org#17798) |
| 7 | billing-web unit tests in CI (`ci-billing-web-unit.yaml`) |
FE-2218 | merged (Comfy-Org#17827, Comfy-Org#17844) |
| 7 | ingest CORS + top-up return hosts for billing.comfy.org and its
previews (Comfy-Org/cloud) | FE-2218 | merged (Comfy-Org/cloud#9512) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | merged (Comfy-Org#17798) |
| 7 | npm publish (`ingest-types`, `account-core`, `billing-contract`),
Platform install, billing-web live top-up | FE-2218 | todo |
| 6 | Contract tests per generated schema (package layer) | FE-2217 |
Comfy-Org#17829 (review) |
| 6 | Live E2E per flow × consumer + evidence table | FE-2217 | todo
(needs staging flags) |
| 5 slice 2a | Cancel, resubscribe and payment portal through the SDK
behind `billing_sdk_subscription_enabled` | FE-2216 | Comfy-Org#17853 (review;
parent of this PR) |
| 5 slice 2b | Subscribe and plan change through the SDK: quote, then
subscribe; the SDK never short-circuits on the client | FE-2216 | **this
PR** |
| follow-up | One `needsCustomerAttention` predicate (from the Comfy-Org#17665
review) | FE-2216 | merged (Comfy-Org#17792) |
| follow-up | Opaque `BillingServerCode` (from the Comfy-Org#17656 review) |
FE-2227 | merged (Comfy-Org#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the Comfy-Org#17799
review) | FE-2215 | merged (Comfy-Org#17824) |
| follow-up | credits / status / capabilities readers fence a late
failure as `SUPERSEDED` (from the Comfy-Org#17798 review) | FE-2331 | merged
(Comfy-Org#17828) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  CORS["cloud PR 9512 ingest CORS + return hosts"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6C["Phase 6 contract tests"]
  P6["Phase 6 live evidence"]
  S2A["PR 17853 slice 2a cancel / resubscribe / portal rail"]
  S2B["Phase 5 slice 2b subscribe + plan change"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  FU13["reader late-failure fence"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2B
  HD --> S2A
  S2A --> S2B
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  CORS --> P7
  P5 --> P6
  P3 --> P6C
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  P3 --> FU13
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style BWV fill:#d4edda,stroke:#155724
  style BWS fill:#d4edda,stroke:#155724
  style P8 fill:#d4edda,stroke:#155724
  style P8RD fill:#d4edda,stroke:#155724
  style CORS fill:#d4edda,stroke:#155724
  style FU13 fill:#d4edda,stroke:#155724
  style FU12 fill:#d4edda,stroke:#155724
  style FU11 fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style S2B stroke:#0366d6,stroke-width:4px
```
pull Bot pushed a commit to Mu-L/ComfyUI_frontend that referenced this pull request Sep 17, 2026
…nt UI package (Comfy-Org#17927)

Linear FE-2218.

## Why

`@comfyorg/account-ui` is the only workspace package that ships Vue —
`@comfyorg/design-system` ships CSS and icons,
`@comfyorg/tailwind-utils` ships
`cn()`, and neither exports a component. So "put this component
somewhere
shared" has exactly one destination, and what belongs there has never
been
written down: `git grep account-ui docs/` returns nothing.

The question stopped being theoretical. `apps/billing-web` renders
`/v1/checkout` as a static mock with `checkout-enabled` false. The
working
flow is
`src/platform/workspace/components/UnifiedStripePaymentSelector.vue`
— 383 lines that mount Stripe Elements, call `createConfirmationToken`,
and
hand the token to `subscribe` for the lifecycle to drive through 3DS —
and
`apps/billing-web` cannot import it, because its only Vite alias is `@`
onto
its own `src`. Hosted checkout is a choice between promoting that
component
and writing a second one.

## Root cause of the ambiguity

The boundary exists only as an export map plus one header comment, and
that
comment says the opposite of what we now want.
`packages/account-ui/src/billing/index.ts`:

> routing, windows, dialogs, the payment provider's SDK, and styling all
stay
> with the host.

Read literally, provider-bound payment UI is out of scope for the
package —
which would leave duplication as the only path. Meanwhile
ADR-AUTH-BILLING-0032
rule 4 forbids exactly that for the neighbouring case, naming embedded
checkout among the surfaces that "do not get a site-local implementation
…
they wait for the shared command layer." The command layer landed.
Nothing
said where the view half of it lives, so the two rules point in opposite
directions with no document resolving them.

## How

One ADR, no code change. `PACKAGES-ACCOUNT-UI-0034` records five points:

1. Payment presentation — card element, confirmation token,
authentication
   challenge — is in scope for `@comfyorg/account-ui`.
2. The header contract above changes with it, rather than being quietly
contradicted. Routing, windows, dialogs and styling stay with the host.
3. The provider SDK enters behind `./billing/stripe` with
`@stripe/stripe-js`
as an optional peer, so a consumer wanting only composables does not
take
it on. No host has stated a requirement either way; this is the
reversible
direction, since collapsing two entry points is cheaper than splitting
one
   consumers already import.
4. Promoted components take host couplings as inputs — `Button` by slot,
   telemetry by port — so the package stays unstyled.
5. Transport, commands and readers stay in `@comfyorg/account-core`.
Moving a
   surface does not make it shareable: `useNextInvoice.ts` assembles an
invoice amount from several server fields and its own docstring defers
to
an authoritative amount the backend does not expose, so it is not
promoted.

The identifier follows the grammar in `docs/adr/README.md`: `PACKAGES`
is the
owning subsystem, `ACCOUNT-UI` the narrower concern, two tags, broad to
narrow.

## Review focus

**Point 3 is the one I picked rather than derived.** Whether the Stripe
entry
point is separate or folded into `./billing` depends on whether the
Platform
install wants the payment UI, which nobody has told me. I took the split
because it is the reversible error. If Platform is known to want
checkout,
folding it into `./billing` is simpler and this should change before the
ADR
is accepted.

**Point 2 reverses something written down.** Anyone who read that header
and
kept provider code in a host was following the documented rule. Worth
confirming the reversal is what we want rather than a gap being papered
over.

**The cost named under Consequences is real and lands before the first
promotion.** `account-ui` has no `tsconfig.build.json` and no Vite
config; the
three SDK packages build with `tsc`, which cannot emit `.vue`. Making it
publishable needs library-mode bundling plus `vue-tsc` declarations —
new
tooling, not a copy of what Comfy-Org#17882 did.

## AS IS / TO BE

Documentation only; no runtime or UI change. `pnpm adr:check` passes
(naming,
identifier uniqueness, index row).

- **AS IS** — the boundary is an export map and a header comment that
excludes
the provider SDK; `apps/billing-web` has no path to a real checkout that
  does not duplicate the cloud app.
- **TO BE** — the boundary is a document, the header is scheduled to
change
  with it, and promotion is the sanctioned path.

## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)).
Hybrid model: top-up in-app, subscription management / invoices /
payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (Comfy-Org#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (Comfy-Org#17662, Comfy-Org#17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (Comfy-Org#17665) |
| 5 slice 2 | Subscribe / plan change on the SDK rail | FE-2216 | merged
(Comfy-Org#17856, Comfy-Org#17922) |
| rollout C | `hosted_billing_destination` + `hostedDestination` port |
FE-2218 | merged (Comfy-Org#17716, Comfy-Org#17783, Comfy-Org#17860) |
| 6 | Contract tests per generated schema | FE-2217 | merged (Comfy-Org#17829) |
| 7 | billing-web session, sign-in, `/v1` surfaces | FE-2218 | merged
(Comfy-Org#17798) |
| 7 | Publish readiness for account-core / billing-contract /
ingest-types | FE-2218 | merged (Comfy-Org#17882) |
| 7 | Package release workflows + versioning ADR | FE-2218 | open
(Comfy-Org#17881) |
| 7 | billing-web Vercel deployment config | FE-2218 | open (Comfy-Org#17788) |
| 7 | **What belongs in `@comfyorg/account-ui`** | FE-2218 | **this PR**
|
| 7 | `account-ui` publish readiness + Vue library build | FE-2218 |
todo (depends on this) |
| 7 | First publish (`private` off), Platform install | FE-2218 | todo |
| 8 ui | Promote the Stripe payment UI into `account-ui` | FE-2331 |
todo (depends on this) |
| 8 ui | billing-web `/v1/checkout` on the real flow, `/v1/result` |
FE-2331 | todo |
| 8 ui | billing-web subscription write actions | FE-2331 | todo |
| 8 ui | `/v1/invoices` opens the provider portal, matching the cloud
app | FE-2331 | todo |
| 9 | Cloud app readers move onto the SDK rail | FE-2331 | todo |
| 6 | Live E2E per flow x consumer + evidence table | FE-2217 | todo
(needs staging flags) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui composables (merged)"]
  P5["Phase 5 top-up + subscription rails (merged)"]
  BWV["billing-web /v1 surfaces (merged)"]
  PUBR["publish readiness: 3 SDK packages (merged)"]
  REL["release workflows + ADR-0033"]
  VER["billing-web Vercel config"]
  ADR["ADR-0034 what belongs in account-ui"]
  UIPK["account-ui publish readiness + Vue build"]
  PROMO["promote Stripe payment UI"]
  CHK["billing-web real checkout + /v1/result"]
  SUBW["billing-web subscription writes"]
  INV["/v1/invoices to provider portal"]
  RD["cloud app readers on the SDK rail"]
  PUB["first publish + Platform install"]
  E2E["live E2E evidence"]
  P3 --> P4
  P4 --> P5
  P4 --> BWV
  PUBR --> REL
  REL --> PUB
  ADR --> UIPK
  ADR --> PROMO
  UIPK --> PUB
  PROMO --> CHK
  BWV --> CHK
  BWV --> SUBW
  BWV --> INV
  VER --> E2E
  CHK --> E2E
  P5 --> RD
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style BWV fill:#d4edda,stroke:#155724
  style PUBR fill:#d4edda,stroke:#155724
  style ADR stroke:#0366d6,stroke-width:4px
```
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 17, 2026
…Rs, with the versioning ADR (Comfy-Org#17881)

## Why

`@comfyorg/account-core`, `@comfyorg/billing-contract` and
`@comfyorg/ingest-types` are about to be installed by Platform from the
public registry, and the plan had nothing on how their versions are cut.
The monorepo already releases one package (`@comfyorg/design-system`)
through a version-bump PR that publishes on merge; the decision
(2026-09-16) is to follow that pattern for the SDK packages, generalized
over a package input rather than copied, and to defer Changesets with
the revisit conditions written down.

## How

- `version-bump-package.yaml` — `workflow_dispatch` with `package`
(account-core / billing-contract / ingest-types), `version_type`,
`pre_release`; bumps on `main` and opens a `Release`-labelled PR titled
`<package> <version>` (same pinned `create-pull-request` action as the
design-system workflow).
- `publish-package.yaml` — reusable (`workflow_dispatch` +
`workflow_call`): name/version match, an explicit failure while
`"private": true`, `build` and `smoke:pack` via `--if-present` (works
before and after the publish-readiness PR lands), `npm view` skip on an
existing version, `pnpm publish --access public --tag … --provenance`
under `id-token: write`.
- `publish-package-on-merge.yaml` — on a merged `Release` PR touching
one of the three manifests, publishes every package whose `version`
changed against the first parent (matrix), posts the release-links
comment per package and the Slack notice.
- `.github/actions/comment-release-links` — three additive cases so each
package's summary has its own section.
- `packages/{account-core,billing-contract,ingest-types}/package.json` —
`"private": true` removed. Comfy-Org#17882 is merged and its smoke test proves
the three tarballs install from plain Node, so the latch comes off here,
in the same reviewed PR as the machinery that checks it. Nothing
publishes on this merge: the on-merge job needs a `Release` label and a
version change, and neither is present.
-
`docs/adr/RELEASES-PACKAGES-0033-sdk-packages-release-through-version-bump-prs.md`
(+ index): context, the decision and each workflow's rationale, the
versioning policy (`1.0.0-alpha.N` on `next` until the Phase 7 host
proof, then `1.0.0`; generated-contract additions minor, removals major,
decided on the regeneration PR), alternatives (Changesets,
release-please, semantic-release, per-package copies) and the explicit
"when to revisit Changesets" list.

Written against the post-rename names (`packages/account-core`); the
on-merge path filter matches once Comfy-Org#17851 lands. Design-system workflows
are untouched.

Not in this PR, on purpose: the `ingest-types` regeneration bump — the
generator lives in Comfy-Org/cloud; the one-step change needed there is
recorded in the ADR's follow-ups.

**Snapshot publishing is not in this PR.** A `pull_request` run executes
the workflow definition from the pull request's own merge ref, so a
publish step triggered that way is PR-authored code holding `NPM_TOKEN`,
and on `main` today no `pull_request` workflow reaches that secret. It
returns in its own PR, publishing from a `workflow_run` job that runs
the default branch's definition over an artifact the pull-request job
produces.

## AS-IS / TO-BE

No UI change; CI and docs only.

- AS-IS: only `@comfyorg/design-system` has a release path; the SDK
packages have no bump, no publish, no policy.
- TO-BE: one dispatch bumps any of the three, the merged `Release` PR
publishes with provenance, and the ADR records why Changesets waits and
what the snapshot follow-up has to satisfy.

## Testing

| Check | Result |
| --- | --- |
| `actionlint` on the four workflows | 0 findings |
| `zizmor --min-severity medium` | clean apart from the repo-exempt
`actions/checkout@v7` / `setup-node@v6` pins (`.pinact.yaml`);
workflow-level `permissions: contents: read` added after its finding |
| `yamllint` (as `ci-yaml-validation.yaml` runs it) | clean |
| `pnpm adr:check`, `pnpm lint`, `pnpm format:check`, `pnpm knip` | exit
0 |

After the second review round (860ef8a, 8f7972f, 41793c7):
`publish-package.yaml` rejects a prerelease on `latest` and reports
whether it published or skipped, and `version-bump-package.yaml` holds
`account-core` and `billing-contract` on the `1.0.0-alpha.N` line, since
`patch`, `minor` and `major` all turn `1.0.0-alpha.0` into `1.0.0`. The
hardening that round added to the snapshot workflow left with it in
25b09c3.

After the first review round (23b854e, 5985af7): the manual
publish no longer takes a caller-supplied `ref` (it publishes the ref it
was dispatched on), and the ADR scopes the prerelease-first gate to the
hand-written packages, putting `ingest-types` outside it.

The Slack notice posts to `#proj-billing` (`C0BNGQG2LCW`), not the
design-system channel. Open points for review: `--provenance` is new
relative to the design-system publish and is confirmed on the first real
run; Follow-ups, not in this PR: a protected `environment` with required
reviewers and an environment-scoped `NPM_TOKEN` on the publish job (repo
configuration), and the same `ref` removal on
`publish-design-system.yaml`.

## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (Comfy-Org#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (Comfy-Org#17662, Comfy-Org#17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (Comfy-Org#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (Comfy-Org#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | Comfy-Org#17783 (review, carries slice 2a) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (Comfy-Org#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | Comfy-Org#17851 (queued) |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (Comfy-Org#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (Comfy-Org#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (Comfy-Org#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | merged
(Comfy-Org#17798) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | merged (Comfy-Org#17798) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| merged (Comfy-Org#17798) |
| 7 | billing-web unit tests in CI (`ci-billing-web-unit.yaml`) |
FE-2218 | merged (Comfy-Org#17827, Comfy-Org#17844) |
| 7 | ingest CORS + top-up return hosts for billing.comfy.org and its
previews (Comfy-Org/cloud) | FE-2218 | merged (Comfy-Org/cloud#9512) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | merged (Comfy-Org#17798) |
| 7 | Package release workflows + versioning ADR (bump dispatch →
publish on merge) | FE-2218 | **this PR** |
| 7 | Pre-merge snapshots from a default-branch `workflow_run` job |
FE-2218 | todo (split out of this PR) |
| 7 | Publish readiness: dist build, files allowlist, pack smoke test,
private-utility cut | FE-2218 | merged (Comfy-Org#17882) |
| 7 | `private` off on the three manifests | FE-2218 | **this PR** |
| 7 | First publish (bump PRs: ingest-types, then billing-contract,
account-core), Platform install, billing-web live top-up | FE-2218 |
todo |
| 6 | Contract tests per generated schema (package layer) | FE-2217 |
Comfy-Org#17829 (review) |
| 6 | Live E2E per flow × consumer + evidence table | FE-2217 | todo
(needs staging flags) |
| 5 slice 2 | Subscription flows through the SDK | FE-2216 | Comfy-Org#17856 /
Comfy-Org#17860 (review) |
| follow-up | One `needsCustomerAttention` predicate (from the Comfy-Org#17665
review) | FE-2216 | merged (Comfy-Org#17792) |
| follow-up | Opaque `BillingServerCode` (from the Comfy-Org#17656 review) |
FE-2227 | merged (Comfy-Org#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the Comfy-Org#17799
review) | FE-2215 | merged (Comfy-Org#17824) |
| follow-up | credits / status / capabilities readers fence a late
failure as `SUPERSEDED` (from the Comfy-Org#17798 review) | FE-2331 | merged
(Comfy-Org#17828) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  CORS["cloud PR 9512 ingest CORS + return hosts"]
  RW["release workflows + ADR"]
  PUB["npm publish account-core / billing-contract"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6C["Phase 6 contract tests"]
  P6["Phase 6 live evidence"]
  S2["Phase 5 slice 2 subscription"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  FU13["reader late-failure fence"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> PUB
  RW --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  CORS --> P7
  P5 --> P6
  P3 --> P6C
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  P3 --> FU13
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style BWV fill:#d4edda,stroke:#155724
  style BWS fill:#d4edda,stroke:#155724
  style P8 fill:#d4edda,stroke:#155724
  style P8RD fill:#d4edda,stroke:#155724
  style CORS fill:#d4edda,stroke:#155724
  style FU13 fill:#d4edda,stroke:#155724
  style FU12 fill:#d4edda,stroke:#155724
  style FU11 fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style RW stroke:#0366d6,stroke-width:4px
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:xhigh PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants