Skip to content

FE-3019 feat(billing-web): summary ledger model for the full-page checkout - #19266

Merged
dante01yoon merged 5 commits into
jaewon/fe-3022-checkout-payment-authenticationfrom
jaewon/fe-3019-summary-ledger-model
Sep 29, 2026
Merged

dante01yoon merged 5 commits into
jaewon/fe-3022-checkout-payment-authenticationfrom
jaewon/fe-3019-summary-ledger-model

Conversation

@dante01yoon

@dante01yoon dante01yoon commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Why

FE-3019 (Milestone 3, checkout guidebook 2, design source DES-1210 and DES-1088). The full-page checkout's left column shows only an eyebrow, the plan's list price and the total. The guidebook's summary is a ledger with one component, 8 slots and 4 families. This PR adds the data half: a typed SummaryLedger model and a pure builder from the preview quote. The next PR renders it.

Root cause

n/a, feature.

How

  • SummaryLedger (apps/billing-web/src/checkout/summaryLedger.ts) holds the family (charge_now, prorated_change, scheduled, top_up), the eyebrow, the headline (amount, currency, optional rate), the credits line (count and qualifier), items (at least one money row), adjustments (the promo slot, empty until FE-3020), an optional subtotal, the total, and trailing lines.
  • Money rows and trailing lines are different types. A row has an amount; a trailing line is a plain string. A future event such as "Renews at..." cannot reach the dollar column, and it can only render under the total.
  • buildSummaryLedger(quote, { workspace, tierName, t, locale }) picks the family and fills the slots:
    • Not immediate: scheduled. The headline is the future rate (renewal_amount_cents ?? cost_next_period_cents plus "/ mo" or "/ yr"). Credits read "refill ... after {effective_at}". The trailing line is "You'll keep {plan} until {effective_at}".
    • An immediate upgrade the server priced at a proration_at instant, unless it is TEAM to TEAM: prorated_change. The family is read from the quote, never derived from plan durations. Credits read "N credits added today (expire {renewal_at month and day})" from credits_today_cents. The trailing lines are "Existing credits are kept" and the renewal.
    • Everything else: charge_now. A new subscription shows "N credits per month/year" from credits_next_period_cents. A cadence switch shows bare "N credits" only when credits_today_cents equals the allowance, and otherwise "added today". Monthly to yearly adds "This month's credits stay valid until {current_plan.period_end}". A $0-due new subscription adds the BE-13104 line explaining why the card is collected.
  • The eyebrow is "{verb} {plan} · {workspace}". The workspace comes from the session. Verbs are Subscribe to, Upgrade to, Switch to, and Change to (team commit changes).
  • formatHeadlineMoney drops .00 and keeps real cents: $700, $32.50, $0.
  • Credits arrive as credit-cents. They are converted with the app-wide centsToCredits, which adds @comfyorg/shared-frontend-utils to billing-web.
  • i18n keys live under checkout.fullPage.summary.

Tradeoffs

  • The builder returns translated strings, not message descriptors, so the component stays a pure renderer and the tests read like the Figma copy.
  • The prorated signal is transition_type === 'upgrade' plus proration_at, not proration_at alone. On main, billing-api stamps proration_at on every Stripe transition preview, including the monthly-to-yearly reset_now variant (served as duration_change, charged in full) and scheduled ones. Only its immediate variant, served as upgrade, is prorated. The legacy rail omits proration_at and also types monthly-to-yearly prepay as upgrade, so an upgrade without it reads as charge_now, never "Prorated".
  • The "(expire {date})" wording follows the DES-1088 grammar rule. The Figma frames still say "expires".
  • The credits expiry reads month and day ("expire July 28"), as in Figma; it always falls inside the current period. Every other date carries the year ("July 28, 2026"). Figma drops it on some near dates, and deciding which needs "today" inside a pure function.
  • top_up exists only in the model. billing-web's checkout is subscription-only today, so no builder produces it and no route reaches it.

Blast Radius

Nothing renders this yet. The next PR wires it into the billing_web_checkout_ui = full_page view. No package code changes; billing-web gains a workspace dependency on @comfyorg/shared-frontend-utils (creditsUtil only).

Verification

  • pnpm --filter @comfyorg/billing-web typecheck: clean.
  • pnpm --filter @comfyorg/billing-web test:unit: 28 files, 370 tests pass.
    • summaryLedger.test.ts compares whole ledgers in an it.for table: new sub monthly, new sub yearly, $0-due, tier upgrade with proration_at (prorated), tier upgrade without it (charge now), monthly to yearly with proration_at (charge now), tier upgrade onto yearly, downgrade scheduled, yearly to monthly scheduled, team commit change with proration_at (neutral). The downgrade row also carries proration_at and stays scheduled. It also covers the eyebrow without a workspace and the headline cents table.
    • Mutation checks, each turned a row red: dropping the proration_at, transition_type or team commit condition from the prorated family, dropping the is_immediate check, and removing the $0-due trailing line.
  • pnpm --filter @comfyorg/billing-web lint, oxfmt and type-aware oxlint on changed files, pnpm knip, and the pre-push fallow:audit: clean.

BE gaps / design questions

  • BE gap: the quote carries only the net cost_today_cents for a proration. Figma's "Pro Plan - Prorated $50.00" and "Creator - Prorated -$17.50" rows need both amounts from the server. Until then the prorated family has one net row, no second money row and no Subtotal.
  • BE gap: no explicit expiry for the prorated credits delta. It renders from renewal_at, the period end the delta expires at per the verified math.
  • BE gap: no list or compare price for yearly plans, so "$35 $28 /mo x 12" renders as "Billed yearly".
  • BE gap: credits come as credit-cents; a server credits count would retire the 211/USD conversion.
  • BE gap: no top-up quote or top-up expiry field on billing-web.
  • Team commit change proration is unverified (asked Wei 2026-09-25). A TEAM to TEAM change renders neutral: "Change to Team Plan", the allowance, no "Prorated" and no credits delta.
  • Design: DES-1088 says Subtotal appears "when 2+ money rows precede a promo or total", but Figma 294:8378 shows two rows before Total with no Subtotal. This follows Figma: Subtotal only above an adjustment. Which wins?

AS IS / TO BE

No UI in this PR. The next PR carries the screenshots.

Where this sits in the plan

One linear stack on main: each PR is based on the one above it in the table. The former FE-3019/FE-3020 sibling stack now sits on top of FE-3022.

This PR now builds on #19285 (the FE-3022 tip) instead of #19264, so the ledger lands after reconciliation, the ending screens and payment authentication.

Step PR Scope
FE-3067 #19248 (merged) flag and variant switch
FE-3018 PR 0 #19252 page state union and pure transition
FE-3018 PR 1 #19253 shell, eyebrow, capture skeleton
FE-3018 PR 2a #19263 saved-method tabs, rail failure taxonomy
FE-3018 PR 2b #19264 inline Pay outcomes, backstop, reactivation
FE-3018 PR 3a #19268 mount reconciliation, placeholders
FE-3018 PR 3b #19271 bfcache and cross-tab re-reconciliation
FE-3021 PR 1 #19279 success, already completed, in progress, received, unconfirmed
FE-3021 PR 2 #19280 refusal, plan not available, couldn't load
FE-3022 #19285 two-phase submit area, 3DS re-open, redirect methods, verification failed
FE-3019 PR 1 this PR summary ledger model and builder
FE-3019 PR 2 #19267 left-column ledger rendering
FE-3020 1/3 #19276 discount rows, fold rule, Subtotal
FE-3020 2/3 #19277 promo entry state, Pay binding, URL promo
FE-3020 3/3 #19278 promo entry UI, chips, expired card
graph LR
  M["main (19248 merged)"] --> N19252["19252 page state"] --> N19253["19253 shell"] --> N19263["19263 rails"] --> N19264["19264 outcomes"] --> N19268["19268 mount reconciliation"] --> N19271["19271 bfcache and cross-tab"] --> N19279["19279 money endings"] --> N19280["19280 refusal screens"] --> N19285["19285 payment authentication"] --> N19266["19266 ledger model"] --> N19267["19267 ledger UI"] --> N19276["19276 discount rows"] --> N19277["19277 promo entry state"] --> N19278["19278 promo entry UI"]
  style N19266 stroke-width:3px
Loading

@dante01yoon dante01yoon added the needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch label Sep 28, 2026
@dante01yoon
dante01yoon requested a review from a team as a code owner September 28, 2026 18:41
@dante01yoon dante01yoon added core/1.55 Backport PRs for core 1.55 cloud/1.55 Backport PRs for cloud 1.55 labels Sep 28, 2026
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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

⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: eb6e2f54-92d5-402b-bd23-fd86b57a2292

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/29/2026, 05:44:00 AM UTC

Links

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🎭 Playwright: ✅ 2159 passed, 0 failed

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

🌾 Fallow: ✅ Passed

Fallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened.

No new findings in the changed files.

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since b1028a71d1fb9f94f112b9a14417b9355684c5ec

Full docs: ADR-DEVEX-LINT-0015

🧩 Custom Nodes Ecosystem Matrix: ✅ Passed

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

Stage Result What a failure here means
pin-status success Informational. It never fails the build; it warns when the corpus snapshot is over 30 days old.
corpus success Infrastructure: the pack mirror could not be fetched, validated or cached. Not your diff.
shards success Harness integrity, not pack breakage. A shard only checks that every built spec wrote its row; vitest's own exit code is deliberately ignored because pack code leaks unhandled rejections.
verdicts success The population verdict per renderer. This is the stage that judges packs. Exit 1 is FAIL; exit 2 is withheld — rows were missing, so nothing was measured, which is not the same as your change breaking packs.
detection-proofs success The instrument self-test: the matrix must FAIL on a deliberately poisoned corpus. A failure here means the gate cannot be trusted this run, in either direction.

On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff.

Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped.

Reproduce locally
# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
  npx vitest run --config vitest.matrix.config.mts

Full docs: scripts/registry-census/README.md

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 62.2 MB heap
canvas-mouse-sweep: · 59.5 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.4 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 76.2 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 92.5 MB heap
dom-widget-order-dense-n200-w200-i120: · 28.7 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 535ms TBT · 81.1 MB heap
dom-widget-order-sparse-n1000-w20-i120: · 41.6 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 189ms TBT · 86.9 MB heap
extension-clean-combined-draw: · 33.4 avg FPS · 20.0 P5 FPS ❌ (target: ≥52) · 268ms TBT · 72.1 MB heap
extension-rgthree-prototype-draw: · 31.2 avg FPS · 20.0 P5 FPS ❌ (target: ≥52) · 314ms TBT · 83.8 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 78.9 MB heap
large-graph-pan: · 59.8 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.7 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.4 MB heap
legacy-node-drag: · 59.7 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 83.8 MB heap
minimap-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 79.8 MB heap
subgraph-dom-widget-clipping: · 59.2 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 72.8 MB heap
subgraph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 63.2 MB heap
subgraph-mouse-sweep: · 59.7 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 68.0 MB heap
subgraph-transition-enter: · 47.1 avg FPS · 30.0 P5 FPS ❌ (target: ≥52) · 141ms TBT · 97.8 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 77.8 MB heap
vue-large-graph-idle: · 40.2 avg FPS · 24.0 P5 FPS ❌ (target: ≥52) · 0ms TBT · 172.3 MB heap
vue-large-graph-pan: · 28.1 avg FPS · 15.0 P5 FPS ❌ (target: ≥52) · 37ms TBT · 164.1 MB heap
vue-node-resize-workload: · 33.3 avg FPS · 17.1 P5 FPS ❌ (target: ≥52) · 163ms TBT · 213.9 MB heap
vue-zoom-out-idle: · 34.7 avg FPS · 20.0 P5 FPS ❌ (target: ≥52) · 8ms TBT · 168.7 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 64.5 MB heap
agent-composer-empty-conversation-typing: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 84.1 MB heap
agent-composer-long-conversation-typing: · 54.9 avg FPS · 30.0 P5 FPS ❌ (target: ≥52) · 0ms TBT · 110.3 MB heap

ℹ️ No baseline found — significance unavailable.

Absolute values
Metric Value
canvas-idle: avg frame time 17ms
canvas-idle: p95 frame time 17ms
canvas-idle: layout duration 0ms
canvas-idle: style recalc duration 4ms
canvas-idle: layout count 0
canvas-idle: style recalc count 11
canvas-idle: task duration 487ms
canvas-idle: script duration 11ms
canvas-idle: TBT 0ms
canvas-idle: heap used 62.2 MB
canvas-idle: DOM nodes -228
canvas-idle: event listeners -142
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 21ms
canvas-mouse-sweep: layout count 12
canvas-mouse-sweep: style recalc count 77
canvas-mouse-sweep: task duration 839ms
canvas-mouse-sweep: script duration 154ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 67.4 MB
canvas-mouse-sweep: DOM nodes -228
canvas-mouse-sweep: event listeners -153
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 10ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 31
canvas-zoom-sweep: task duration 352ms
canvas-zoom-sweep: script duration 12ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 76.2 MB
canvas-zoom-sweep: DOM nodes 53
canvas-zoom-sweep: event listeners 15
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 4ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 13
dom-widget-clipping: task duration 466ms
dom-widget-clipping: script duration 163ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 92.5 MB
dom-widget-clipping: DOM nodes 0
dom-widget-clipping: event listeners 0
dom-widget-order-dense-n200-w200-i120: avg frame time 35ms
dom-widget-order-dense-n200-w200-i120: p95 frame time 17ms
dom-widget-order-dense-n200-w200-i120: layout duration 0ms
dom-widget-order-dense-n200-w200-i120: style recalc duration 0ms
dom-widget-order-dense-n200-w200-i120: layout count 0
dom-widget-order-dense-n200-w200-i120: style recalc count 0
dom-widget-order-dense-n200-w200-i120: task duration 819ms
dom-widget-order-dense-n200-w200-i120: script duration 61ms
dom-widget-order-dense-n200-w200-i120: TBT 535ms
dom-widget-order-dense-n200-w200-i120: heap used 81.1 MB
dom-widget-order-dense-n200-w200-i120: DOM nodes 0
dom-widget-order-dense-n200-w200-i120: event listeners 0
dom-widget-order-sparse-n1000-w20-i120: avg frame time 24ms
dom-widget-order-sparse-n1000-w20-i120: p95 frame time 17ms
dom-widget-order-sparse-n1000-w20-i120: layout duration 0ms
dom-widget-order-sparse-n1000-w20-i120: style recalc duration 0ms
dom-widget-order-sparse-n1000-w20-i120: layout count 0
dom-widget-order-sparse-n1000-w20-i120: style recalc count 0
dom-widget-order-sparse-n1000-w20-i120: task duration 420ms
dom-widget-order-sparse-n1000-w20-i120: script duration 139ms
dom-widget-order-sparse-n1000-w20-i120: TBT 189ms
dom-widget-order-sparse-n1000-w20-i120: heap used 86.9 MB
dom-widget-order-sparse-n1000-w20-i120: DOM nodes 0
dom-widget-order-sparse-n1000-w20-i120: event listeners 0
extension-clean-combined-draw: avg frame time 30ms
extension-clean-combined-draw: p95 frame time 50ms
extension-clean-combined-draw: layout duration 0ms
extension-clean-combined-draw: style recalc duration 0ms
extension-clean-combined-draw: layout count 0
extension-clean-combined-draw: style recalc count 0
extension-clean-combined-draw: task duration 8134ms
extension-clean-combined-draw: script duration 6393ms
extension-clean-combined-draw: TBT 268ms
extension-clean-combined-draw: heap used 72.1 MB
extension-clean-combined-draw: DOM nodes 0
extension-clean-combined-draw: event listeners 0
extension-rgthree-prototype-draw: avg frame time 32ms
extension-rgthree-prototype-draw: p95 frame time 50ms
extension-rgthree-prototype-draw: layout duration 0ms
extension-rgthree-prototype-draw: style recalc duration 0ms
extension-rgthree-prototype-draw: layout count 0
extension-rgthree-prototype-draw: style recalc count 0
extension-rgthree-prototype-draw: task duration 7944ms
extension-rgthree-prototype-draw: script duration 6350ms
extension-rgthree-prototype-draw: TBT 314ms
extension-rgthree-prototype-draw: heap used 83.8 MB
extension-rgthree-prototype-draw: DOM nodes 0
extension-rgthree-prototype-draw: event listeners 0
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 4ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 10
large-graph-idle: task duration 525ms
large-graph-idle: script duration 34ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 78.9 MB
large-graph-idle: DOM nodes -228
large-graph-idle: event listeners -164
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 10ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 69
large-graph-pan: task duration 1698ms
large-graph-pan: script duration 825ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 73.7 MB
large-graph-pan: DOM nodes -228
large-graph-pan: event listeners -153
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 14ms
large-graph-zoom: style recalc duration 11ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 63
large-graph-zoom: task duration 1705ms
large-graph-zoom: script duration 769ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 70.4 MB
large-graph-zoom: DOM nodes -114
large-graph-zoom: event listeners 0
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 6ms
legacy-node-drag: layout count 0
legacy-node-drag: style recalc count 44
legacy-node-drag: task duration 1927ms
legacy-node-drag: script duration 950ms
legacy-node-drag: TBT 0ms
legacy-node-drag: heap used 83.8 MB
legacy-node-drag: DOM nodes 0
legacy-node-drag: event listeners 180
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 3ms
minimap-idle: layout count 0
minimap-idle: style recalc count 7
minimap-idle: task duration 568ms
minimap-idle: script duration 32ms
minimap-idle: TBT 0ms
minimap-idle: heap used 79.8 MB
minimap-idle: DOM nodes -228
minimap-idle: event listeners -153
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 6ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 47
subgraph-dom-widget-clipping: task duration 428ms
subgraph-dom-widget-clipping: script duration 144ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 72.8 MB
subgraph-dom-widget-clipping: DOM nodes -107
subgraph-dom-widget-clipping: event listeners -88
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 5ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 10
subgraph-idle: task duration 471ms
subgraph-idle: script duration 9ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 63.2 MB
subgraph-idle: DOM nodes -244
subgraph-idle: event listeners -188
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 18ms
subgraph-mouse-sweep: layout count 16
subgraph-mouse-sweep: style recalc count 77
subgraph-mouse-sweep: task duration 827ms
subgraph-mouse-sweep: script duration 101ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 68.0 MB
subgraph-mouse-sweep: DOM nodes -244
subgraph-mouse-sweep: event listeners -199
subgraph-transition-enter: avg frame time 21ms
subgraph-transition-enter: p95 frame time 33ms
subgraph-transition-enter: layout duration 11ms
subgraph-transition-enter: style recalc duration 25ms
subgraph-transition-enter: layout count 5
subgraph-transition-enter: style recalc count 17
subgraph-transition-enter: task duration 718ms
subgraph-transition-enter: script duration 26ms
subgraph-transition-enter: TBT 141ms
subgraph-transition-enter: heap used 97.8 MB
subgraph-transition-enter: DOM nodes 13667
subgraph-transition-enter: event listeners 2383
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 33ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 251
viewport-pan-sweep: task duration 5798ms
viewport-pan-sweep: script duration 2691ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 77.8 MB
viewport-pan-sweep: DOM nodes -228
viewport-pan-sweep: event listeners -142
vue-large-graph-idle: avg frame time 25ms
vue-large-graph-idle: p95 frame time 42ms
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 13000ms
vue-large-graph-idle: script duration 231ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 172.3 MB
vue-large-graph-idle: DOM nodes -3046
vue-large-graph-idle: event listeners -14915
vue-large-graph-pan: avg frame time 36ms
vue-large-graph-pan: p95 frame time 67ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 16ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 129
vue-large-graph-pan: task duration 18221ms
vue-large-graph-pan: script duration 864ms
vue-large-graph-pan: TBT 37ms
vue-large-graph-pan: heap used 164.1 MB
vue-large-graph-pan: DOM nodes -3046
vue-large-graph-pan: event listeners -14915
vue-node-resize-workload: avg frame time 30ms
vue-node-resize-workload: p95 frame time 58ms
vue-node-resize-workload: layout duration 25ms
vue-node-resize-workload: style recalc duration 76ms
vue-node-resize-workload: layout count 20
vue-node-resize-workload: style recalc count 20
vue-node-resize-workload: task duration 4816ms
vue-node-resize-workload: script duration 95ms
vue-node-resize-workload: TBT 163ms
vue-node-resize-workload: heap used 213.9 MB
vue-node-resize-workload: DOM nodes 0
vue-node-resize-workload: event listeners 0
vue-zoom-out-idle: avg frame time 29ms
vue-zoom-out-idle: p95 frame time 50ms
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 7626ms
vue-zoom-out-idle: script duration 176ms
vue-zoom-out-idle: TBT 8ms
vue-zoom-out-idle: heap used 168.7 MB
vue-zoom-out-idle: DOM nodes -1523
vue-zoom-out-idle: event listeners -7458
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 20ms
workflow-execution: layout count 4
workflow-execution: style recalc count 19
workflow-execution: task duration 173ms
workflow-execution: script duration 14ms
workflow-execution: TBT 0ms
workflow-execution: heap used 64.5 MB
workflow-execution: DOM nodes -34
workflow-execution: event listeners -13
agent-composer-empty-conversation-typing: avg frame time 17ms
agent-composer-empty-conversation-typing: p95 frame time 17ms
agent-composer-empty-conversation-typing: layout duration 20ms
agent-composer-empty-conversation-typing: style recalc duration 100ms
agent-composer-empty-conversation-typing: layout count 76
agent-composer-empty-conversation-typing: style recalc count 78
agent-composer-empty-conversation-typing: task duration 762ms
agent-composer-empty-conversation-typing: script duration 295ms
agent-composer-empty-conversation-typing: TBT 0ms
agent-composer-empty-conversation-typing: heap used 84.1 MB
agent-composer-empty-conversation-typing: DOM nodes 76
agent-composer-empty-conversation-typing: event listeners 876
agent-composer-long-conversation-typing: avg frame time 18ms
agent-composer-long-conversation-typing: p95 frame time 33ms
agent-composer-long-conversation-typing: layout duration 25ms
agent-composer-long-conversation-typing: style recalc duration 255ms
agent-composer-long-conversation-typing: layout count 76
agent-composer-long-conversation-typing: style recalc count 78
agent-composer-long-conversation-typing: task duration 1397ms
agent-composer-long-conversation-typing: script duration 448ms
agent-composer-long-conversation-typing: TBT 0ms
agent-composer-long-conversation-typing: heap used 110.3 MB
agent-composer-long-conversation-typing: DOM nodes 76
agent-composer-long-conversation-typing: event listeners 876
Raw data
{
  "timestamp": "2026-09-29T05:51:16.736Z",
  "gitSha": "5988760492a9bb514d0b9c13e496118199397467",
  "branch": "jaewon/fe-3019-summary-ledger-model",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2049.4600000000105,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 4.423,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 473.604,
      "heapDeltaBytes": -17146232,
      "heapUsedBytes": 61664772,
      "domNodes": -228,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 10.645999999999999,
      "eventListeners": -142,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.665853658536584,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-idle",
      "durationMs": 2056.9679999999835,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 4.573,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 500.467,
      "heapDeltaBytes": -29621952,
      "heapUsedBytes": 68690460,
      "domNodes": -228,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 11.192,
      "eventListeners": -142,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1805.2999999999884,
      "styleRecalcs": 76,
      "styleRecalcDurationMs": 24.580000000000005,
      "layouts": 12,
      "layoutDurationMs": 5.031,
      "taskDurationMs": 841.778,
      "heapDeltaBytes": -12576480,
      "heapUsedBytes": 66099976,
      "domNodes": -228,
      "jsHeapTotalBytes": 1310720,
      "scriptDurationMs": 154.39700000000002,
      "eventListeners": -142,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.8214953271028,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1841.464999999971,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 18.038,
      "layouts": 12,
      "layoutDurationMs": 4.584,
      "taskDurationMs": 836.6730000000001,
      "heapDeltaBytes": -3915040,
      "heapUsedBytes": 75160328,
      "domNodes": -228,
      "jsHeapTotalBytes": 524288,
      "scriptDurationMs": 153.303,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.819266055045865,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1727.008000000069,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 9.166,
      "layouts": 6,
      "layoutDurationMs": 1.102,
      "taskDurationMs": 354.0489999999999,
      "heapDeltaBytes": -18851864,
      "heapUsedBytes": 79889520,
      "domNodes": 53,
      "jsHeapTotalBytes": 7602176,
      "scriptDurationMs": 11.991000000000001,
      "eventListeners": 15,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66601941747573,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1725.0810000000456,
      "styleRecalcs": 29,
      "styleRecalcDurationMs": 10.852999999999998,
      "layouts": 6,
      "layoutDurationMs": 1.5199999999999998,
      "taskDurationMs": 350.38300000000004,
      "heapDeltaBytes": -18670104,
      "heapUsedBytes": 79906160,
      "domNodes": 53,
      "jsHeapTotalBytes": 7602176,
      "scriptDurationMs": 12.405,
      "eventListeners": 15,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.665384615384614,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 735.8590000000049,
      "styleRecalcs": 13,
      "styleRecalcDurationMs": 4.515999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 465.25000000000006,
      "heapDeltaBytes": 18356484,
      "heapUsedBytes": 97116080,
      "domNodes": 0,
      "jsHeapTotalBytes": 4194304,
      "scriptDurationMs": 160.529,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.665909090909096,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 727.706000000012,
      "styleRecalcs": 13,
      "styleRecalcDurationMs": 4.389,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 466.841,
      "heapDeltaBytes": -1694932,
      "heapUsedBytes": 96933656,
      "domNodes": 0,
      "jsHeapTotalBytes": 8126464,
      "scriptDurationMs": 165.95399999999998,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.667441860465132,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-order-dense-n200-w200-i120",
      "durationMs": 1142.4989999999866,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 819.111,
      "heapDeltaBytes": 6777504,
      "heapUsedBytes": 82727780,
      "domNodes": 0,
      "jsHeapTotalBytes": 3833856,
      "scriptDurationMs": 60.31000000000002,
      "eventListeners": 0,
      "totalBlockingTimeMs": 536,
      "frameDurationMs": 34.84545454545454,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "dom-widget-order-dense-n200-w200-i120",
      "durationMs": 1144.4270000000643,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 818.5120000000002,
      "heapDeltaBytes": 10112080,
      "heapUsedBytes": 87384928,
      "domNodes": 0,
      "jsHeapTotalBytes": 3309568,
      "scriptDurationMs": 61.132000000000005,
      "eventListeners": 0,
      "totalBlockingTimeMs": 534,
      "frameDurationMs": 34.84545454545454,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-order-sparse-n1000-w20-i120",
      "durationMs": 816.2550000000124,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 405.4190000000002,
      "heapDeltaBytes": 13718252,
      "heapUsedBytes": 92451964,
      "domNodes": 0,
      "jsHeapTotalBytes": 266240,
      "scriptDurationMs": 139.63799999999998,
      "eventListeners": 0,
      "totalBlockingTimeMs": 188,
      "frameDurationMs": 24.017647058823542,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "dom-widget-order-sparse-n1000-w20-i120",
      "durationMs": 809.6870000000536,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 434.9839999999996,
      "heapDeltaBytes": 15294144,
      "heapUsedBytes": 89757572,
      "domNodes": 0,
      "jsHeapTotalBytes": 266240,
      "scriptDurationMs": 138.47500000000002,
      "eventListeners": 0,
      "totalBlockingTimeMs": 190,
      "frameDurationMs": 24.020588235294085,
      "p95FrameDurationMs": 16.80000000000109
    },
    {
      "name": "extension-clean-combined-draw",
      "durationMs": 9150.00600000002,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 8197.285,
      "heapDeltaBytes": 134612,
      "heapUsedBytes": 81333488,
      "domNodes": 0,
      "jsHeapTotalBytes": -10223616,
      "scriptDurationMs": 6451.054,
      "eventListeners": 0,
      "totalBlockingTimeMs": 308,
      "frameDurationMs": 30.296688741721848,
      "p95FrameDurationMs": 50.099999999999454
    },
    {
      "name": "extension-clean-combined-draw",
      "durationMs": 8948.41800000006,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 8071.211,
      "heapDeltaBytes": -11564420,
      "heapUsedBytes": 69796736,
      "domNodes": 0,
      "jsHeapTotalBytes": -13893632,
      "scriptDurationMs": 6333.956,
      "eventListeners": 0,
      "totalBlockingTimeMs": 228,
      "frameDurationMs": 29.579470198675498,
      "p95FrameDurationMs": 50.099999999998545
    },
    {
      "name": "extension-rgthree-prototype-draw",
      "durationMs": 8198.759999999993,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7531.611,
      "heapDeltaBytes": 10949016,
      "heapUsedBytes": 91855932,
      "domNodes": 0,
      "jsHeapTotalBytes": -11796480,
      "scriptDurationMs": 6097.668,
      "eventListeners": 0,
      "totalBlockingTimeMs": 261,
      "frameDurationMs": 32.409881422924904,
      "p95FrameDurationMs": 50.100000000000364
    },
    {
      "name": "extension-rgthree-prototype-draw",
      "durationMs": 9260.410999999976,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 8356.672999999999,
      "heapDeltaBytes": 3515644,
      "heapUsedBytes": 83815308,
      "domNodes": 0,
      "jsHeapTotalBytes": -7077888,
      "scriptDurationMs": 6602.619,
      "eventListeners": 0,
      "totalBlockingTimeMs": 367,
      "frameDurationMs": 31.625597269624578,
      "p95FrameDurationMs": 50.099999999999454
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2060.1259999999684,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 3.6770000000000014,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 468.75199999999995,
      "heapDeltaBytes": -36052160,
      "heapUsedBytes": 83076448,
      "domNodes": -228,
      "jsHeapTotalBytes": -360448,
      "scriptDurationMs": 30.77600000000001,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2067.4619999999777,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 3.4499999999999984,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 580.406,
      "heapDeltaBytes": -36423044,
      "heapUsedBytes": 82397568,
      "domNodes": -228,
      "jsHeapTotalBytes": 950272,
      "scriptDurationMs": 36.891999999999996,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666129032258066,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2766.787000000022,
      "styleRecalcs": 69,
      "styleRecalcDurationMs": 9.985000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1667.5819999999999,
      "heapDeltaBytes": -29374516,
      "heapUsedBytes": 91176840,
      "domNodes": -228,
      "jsHeapTotalBytes": 651264,
      "scriptDurationMs": 813.7710000000001,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.767272727272722,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2876.96799999992,
      "styleRecalcs": 69,
      "styleRecalcDurationMs": 9.881,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1728.336,
      "heapDeltaBytes": 1214296,
      "heapUsedBytes": 63438476,
      "domNodes": -228,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 836.52,
      "eventListeners": -142,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.665697674418606,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3755.550000000028,
      "styleRecalcs": 63,
      "styleRecalcDurationMs": 10.972,
      "layouts": 60,
      "layoutDurationMs": 14.158999999999999,
      "taskDurationMs": 1715.455,
      "heapDeltaBytes": 8113780,
      "heapUsedBytes": 73670872,
      "domNodes": 0,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 781.446,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66622222222222,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3744.4730000000845,
      "styleRecalcs": 63,
      "styleRecalcDurationMs": 10.395999999999999,
      "layouts": 60,
      "layoutDurationMs": 13.92,
      "taskDurationMs": 1694.7700000000002,
      "heapDeltaBytes": 9909540,
      "heapUsedBytes": 74069572,
      "domNodes": -228,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 755.9739999999999,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66577777777778,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3125.136999999995,
      "styleRecalcs": 43,
      "styleRecalcDurationMs": 5.563999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1883.544,
      "heapDeltaBytes": 19607676,
      "heapUsedBytes": 84574956,
      "domNodes": 0,
      "jsHeapTotalBytes": 417792,
      "scriptDurationMs": 931.0369999999999,
      "eventListeners": 180,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.755913978494622,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3127.815999999939,
      "styleRecalcs": 44,
      "styleRecalcDurationMs": 6.044999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1969.804,
      "heapDeltaBytes": 24701636,
      "heapUsedBytes": 91120700,
      "domNodes": 0,
      "jsHeapTotalBytes": 417792,
      "scriptDurationMs": 969.759,
      "eventListeners": 180,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.75537634408602,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2031.6139999999905,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 1.9009999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 557.7990000000001,
      "heapDeltaBytes": -37554816,
      "heapUsedBytes": 83724484,
      "domNodes": -228,
      "jsHeapTotalBytes": 163840,
      "scriptDurationMs": 29.923000000000005,
      "eventListeners": -142,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66639344262295,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2045.1530000000275,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 3.3420000000000014,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 578.1709999999999,
      "heapDeltaBytes": -38069528,
      "heapUsedBytes": 83524544,
      "domNodes": -228,
      "jsHeapTotalBytes": -98304,
      "scriptDurationMs": 34.300999999999995,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66639344262295,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 680.2860000000237,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 6.312,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 453.503,
      "heapDeltaBytes": -21251816,
      "heapUsedBytes": 59053600,
      "domNodes": -214,
      "jsHeapTotalBytes": -262144,
      "scriptDurationMs": 145.928,
      "eventListeners": -182,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.092307692307703,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 646.5549999999212,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 6.544999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 403.479,
      "heapDeltaBytes": 13194940,
      "heapUsedBytes": 93701488,
      "domNodes": 0,
      "jsHeapTotalBytes": 4194304,
      "scriptDurationMs": 141.54500000000002,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.665789473684193,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2059.9490000000173,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 5.024999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 476.39000000000004,
      "heapDeltaBytes": -13656308,
      "heapUsedBytes": 67822116,
      "domNodes": -244,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 9.152999999999999,
      "eventListeners": -188,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66532258064516,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2040.126999999984,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 4.164999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 465.066,
      "heapDeltaBytes": -16517984,
      "heapUsedBytes": 64745012,
      "domNodes": -244,
      "jsHeapTotalBytes": -262144,
      "scriptDurationMs": 8.613,
      "eventListeners": -188,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66639344262295,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1750.9359999999674,
      "styleRecalcs": 74,
      "styleRecalcDurationMs": 17.601,
      "layouts": 16,
      "layoutDurationMs": 5.48,
      "taskDurationMs": 819.318,
      "heapDeltaBytes": -5229276,
      "heapUsedBytes": 75910540,
      "domNodes": -244,
      "jsHeapTotalBytes": -262144,
      "scriptDurationMs": 99.414,
      "eventListeners": -210,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.825961538461534,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1759.691000000089,
      "styleRecalcs": 80,
      "styleRecalcDurationMs": 19.346000000000004,
      "layouts": 16,
      "layoutDurationMs": 5.54,
      "taskDurationMs": 834.021,
      "heapDeltaBytes": -14574892,
      "heapUsedBytes": 66679412,
      "domNodes": -244,
      "jsHeapTotalBytes": 1310720,
      "scriptDurationMs": 103.25099999999999,
      "eventListeners": -188,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.664761904761907,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 933.524000000034,
      "styleRecalcs": 17,
      "styleRecalcDurationMs": 25.477,
      "layouts": 5,
      "layoutDurationMs": 10.865000000000004,
      "taskDurationMs": 717.9740000000002,
      "heapDeltaBytes": 21604352,
      "heapUsedBytes": 102500176,
      "domNodes": 13667,
      "jsHeapTotalBytes": 1310720,
      "scriptDurationMs": 26.279999999999998,
      "eventListeners": 2383,
      "totalBlockingTimeMs": 141,
      "frameDurationMs": 21.21136363636364,
      "p95FrameDurationMs": 33.30000000000018
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 9079.098999999986,
      "styleRecalcs": 250,
      "styleRecalcDurationMs": 33.04899999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 5783.852000000001,
      "heapDeltaBytes": -35417048,
      "heapUsedBytes": 83836584,
      "domNodes": -228,
      "jsHeapTotalBytes": 356352,
      "scriptDurationMs": 2701.137,
      "eventListeners": -142,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66599264705882,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 9062.330000000089,
      "styleRecalcs": 251,
      "styleRecalcDurationMs": 32.54899999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 5812.1179999999995,
      "heapDeltaBytes": -39829240,
      "heapUsedBytes": 79296036,
      "domNodes": -228,
      "jsHeapTotalBytes": 356352,
      "scriptDurationMs": 2680.302,
      "eventListeners": -142,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66593001841621,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 15500.629000000004,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 15158.000000000002,
      "heapDeltaBytes": -51898664,
      "heapUsedBytes": 174030972,
      "domNodes": -3045,
      "jsHeapTotalBytes": 6590464,
      "scriptDurationMs": 247.44699999999997,
      "eventListeners": -14915,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 29.189077212806023,
      "p95FrameDurationMs": 50.100000000000364
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 11257.258999999976,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 10842.432999999999,
      "heapDeltaBytes": -22701004,
      "heapUsedBytes": 187230528,
      "domNodes": -3046,
      "jsHeapTotalBytes": 7163904,
      "scriptDurationMs": 215.11399999999998,
      "eventListeners": -14915,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 20.52846715328467,
      "p95FrameDurationMs": 33.399999999999636
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 18392.776000000027,
      "styleRecalcs": 133,
      "styleRecalcDurationMs": 16.10299999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18229.366,
      "heapDeltaBytes": -58369584,
      "heapUsedBytes": 166118484,
      "domNodes": -3045,
      "jsHeapTotalBytes": 6078464,
      "scriptDurationMs": 868.4810000000001,
      "eventListeners": -14915,
      "totalBlockingTimeMs": 26,
      "frameDurationMs": 35.4514450867052,
      "p95FrameDurationMs": 66.70000000000073
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 18329.881,
      "styleRecalcs": 124,
      "styleRecalcDurationMs": 15.005999999999991,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18213.295000000002,
      "heapDeltaBytes": -32311456,
      "heapUsedBytes": 177983036,
      "domNodes": -3046,
      "jsHeapTotalBytes": 7294976,
      "scriptDurationMs": 858.718,
      "eventListeners": -14915,
      "totalBlockingTimeMs": 48,
      "frameDurationMs": 35.73606237816764,
      "p95FrameDurationMs": 66.70000000000073
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 5566.86400000001,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 76.90999999999998,
      "layouts": 20,
      "layoutDurationMs": 24.494000000000003,
      "taskDurationMs": 5529.919,
      "heapDeltaBytes": 14377876,
      "heapUsedBytes": 218437624,
      "domNodes": 0,
      "jsHeapTotalBytes": 1048576,
      "scriptDurationMs": 103.21199999999999,
      "eventListeners": 0,
      "totalBlockingTimeMs": 317,
      "frameDurationMs": 34.36049382716049,
      "p95FrameDurationMs": 66.70000000000073
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 4168.616000000043,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 75.30400000000002,
      "layouts": 20,
      "layoutDurationMs": 24.903999999999996,
      "taskDurationMs": 4102.493,
      "heapDeltaBytes": 7320688,
      "heapUsedBytes": 230151524,
      "domNodes": 0,
      "jsHeapTotalBytes": 1048576,
      "scriptDurationMs": 86.751,
      "eventListeners": 0,
      "totalBlockingTimeMs": 8,
      "frameDurationMs": 25.71851851851853,
      "p95FrameDurationMs": 50
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 7753.495000000044,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7604.990000000001,
      "heapDeltaBytes": 21627112,
      "heapUsedBytes": 186623660,
      "domNodes": -1,
      "jsHeapTotalBytes": -24117248,
      "scriptDurationMs": 140.517,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 28.59667896678967,
      "p95FrameDurationMs": 50.099999999998545
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 7720.070999999962,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7647.092000000001,
      "heapDeltaBytes": -68706432,
      "heapUsedBytes": 167222796,
      "domNodes": -3045,
      "jsHeapTotalBytes": 2084864,
      "scriptDurationMs": 211.934,
      "eventListeners": -14915,
      "totalBlockingTimeMs": 16,
      "frameDurationMs": 29.008646616541363,
      "p95FrameDurationMs": 50.099999999998545
    },
    {
      "name": "workflow-execution",
      "durationMs": 495.5479999999852,
      "styleRecalcs": 22,
      "styleRecalcDurationMs": 24.358999999999998,
      "layouts": 5,
      "layoutDurationMs": 2.061,
      "taskDurationMs": 167.398,
      "heapDeltaBytes": -14489092,
      "heapUsedBytes": 82555788,
      "domNodes": 131,
      "jsHeapTotalBytes": 3932160,
      "scriptDurationMs": 17.037999999999997,
      "eventListeners": 81,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "workflow-execution",
      "durationMs": 462.3020000000224,
      "styleRecalcs": 15,
      "styleRecalcDurationMs": 16.059,
      "layouts": 3,
      "layoutDurationMs": 0.8859999999999999,
      "taskDurationMs": 178.72600000000003,
      "heapDeltaBytes": -43720936,
      "heapUsedBytes": 52642068,
      "domNodes": -199,
      "jsHeapTotalBytes": 4456448,
      "scriptDurationMs": 10.377,
      "eventListeners": -107,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.664285714285693,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "agent-composer-empty-conversation-typing",
      "durationMs": 802.5939999999991,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 101.194,
      "layouts": 76,
      "layoutDurationMs": 20.889000000000003,
      "taskDurationMs": 771.556,
      "heapDeltaBytes": 16945580,
      "heapUsedBytes": 87941400,
      "domNodes": 76,
      "jsHeapTotalBytes": 524288,
      "scriptDurationMs": 298.529,
      "eventListeners": 876,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "agent-composer-empty-conversation-typing",
      "durationMs": 793.2189999999082,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 99.642,
      "layouts": 76,
      "layoutDurationMs": 20.043,
      "taskDurationMs": 752.159,
      "heapDeltaBytes": 17156500,
      "heapUsedBytes": 88442868,
      "domNodes": 76,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 292.262,
      "eventListeners": 876,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "agent-composer-long-conversation-typing",
      "durationMs": 1401.4569999999367,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 260.14300000000003,
      "layouts": 76,
      "layoutDurationMs": 25.953,
      "taskDurationMs": 1390.6490000000001,
      "heapDeltaBytes": 9027852,
      "heapUsedBytes": 115417716,
      "domNodes": 76,
      "jsHeapTotalBytes": 786432,
      "scriptDurationMs": 448.001,
      "eventListeners": 876,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.914999999999985,
      "p95FrameDurationMs": 33.30000000000109
    },
    {
      "name": "agent-composer-long-conversation-typing",
      "durationMs": 1419.381000000044,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 249.81,
      "layouts": 76,
      "layoutDurationMs": 24.892,
      "taskDurationMs": 1403.204,
      "heapDeltaBytes": 9057316,
      "heapUsedBytes": 115879660,
      "domNodes": 76,
      "jsHeapTotalBytes": 786432,
      "scriptDurationMs": 448.336,
      "eventListeners": 876,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 18.539999999999985,
      "p95FrameDurationMs": 33.399999999999636
    }
  ]
}

🔬 E2E Coverage

Metric Covered Total Pct
Lines 52945 80623 65.7% 🟡
Functions 0 0 — —
Branches 0 0 — —
Top 10 files by uncovered lines
File Coverage Missed
src/LGraphCanvas.ts 67.4% 1151
src/LGraphNode.ts 70.2% 388
src/extensions/core/cameraInfo/CameraInfoViewport.ts 2.5% 344
src/renderer/extensions/layerEditor/composables/useLayerEditorSession.ts 40.1% 332
src/platform/workspace/stores/billingOperationStore.ts 8.1% 330
src/LGraph.ts 78.9% 269
src/platform/workspace/stores/teamWorkspaceStore.ts 38.9% 256
src/core/billing/operationLifecycle.ts 1.2% 252
src/scripts/app.ts 73.1% 252
src/core/webSessionIdentity.ts 3.4% 224

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

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.72650% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ps/billing-web/src/composables/useCheckoutPromo.ts 82.14% 0 Missing and 5 partials ⚠️
...billing-web/src/composables/useFullPageCheckout.ts 91.30% 0 Missing and 2 partials ⚠️
apps/billing-web/src/checkout/summaryLedger.ts 98.68% 0 Missing and 1 partial ⚠️
...src/components/fullPage/summary/CheckoutLedger.vue 97.05% 0 Missing and 1 partial ⚠️
...src/components/fullPage/summary/PromoCodeField.vue 91.66% 0 Missing and 1 partial ⚠️
@@                                Coverage Diff                                 @@
##           jaewon/fe-3022-checkout-payment-authentication   #19266      +/-   ##
==================================================================================
+ Coverage                                           84.28%   84.30%   +0.01%     
==================================================================================
  Files                                                3251     3257       +6     
  Lines                                              157738   157945     +207     
  Branches                                            42869    42946      +77     
==================================================================================
+ Hits                                               132953   133154     +201     
+ Misses                                              23054    23053       -1     
- Partials                                             1731     1738       +7     
Flag Coverage Δ
billing-web-unit 91.63% <95.72%> (+0.59%) ⬆️
e2e 65.68% <ø> (+0.01%) ⬆️
unit 81.51% <ø> (ø)
website-unit 78.72% <ø> (ø)

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

Files with missing lines Coverage Δ
apps/billing-web/src/checkout/checkoutPage.ts 97.87% <100.00%> (+0.03%) ⬆️
apps/billing-web/src/checkout/promoEntry.ts 100.00% <100.00%> (ø)
apps/billing-web/src/checkout/subscribeRequest.ts 73.33% <100.00%> (+1.90%) ⬆️
.../src/components/fullPage/CheckoutSummaryColumn.vue 100.00% <100.00%> (ø)
...-web/src/components/fullPage/InlineOutcomeCard.vue 100.00% <100.00%> (ø)
...src/components/fullPage/summary/PromoCodeEntry.vue 100.00% <100.00%> (ø)
...pps/billing-web/src/views/FullPageCheckoutView.vue 93.47% <100.00%> (+4.79%) ⬆️
packages/billing-contract/src/entryFields.ts 100.00% <ø> (ø)
apps/billing-web/src/checkout/summaryLedger.ts 98.68% <98.68%> (ø)
...src/components/fullPage/summary/CheckoutLedger.vue 97.05% <97.05%> (ø)
... and 3 more

... and 5 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-3018-rails-and-outcomes branch from b713ab9 to 1a92aae Compare September 28, 2026 22:11
@dante01yoon
dante01yoon force-pushed the jaewon/fe-3019-summary-ledger-model branch from e6cfeec to 871f15f Compare September 28, 2026 22:12
@dante01yoon
dante01yoon changed the base branch from jaewon/fe-3018-rails-and-outcomes to jaewon/fe-3022-checkout-payment-authentication September 28, 2026 22:13
@dante01yoon
dante01yoon force-pushed the jaewon/fe-3019-summary-ledger-model branch from 871f15f to 7a507e0 Compare September 28, 2026 23:58
@dante01yoon
dante01yoon force-pushed the jaewon/fe-3022-checkout-payment-authentication branch 2 times, most recently from 4d4540f to 241ec0d Compare September 29, 2026 00:32
@christian-byrne christian-byrne removed their assignment Sep 29, 2026
… quote

A pure SummaryLedger model for the full-page checkout's left column: the
family (charge now, prorated change, scheduled, top-up), the eyebrow, the
headline, the credits line, the money rows, the total and the future-event
lines under it. buildSummaryLedger maps a SubscriptionPreview onto it using
only numbers the server reported; credits convert from credit-cents at the
app-wide rate.
The expiry always falls inside the current period, so the year is noise and
wrapped the credits line; the Figma frame reads (expire July 28).
…on signal

The family now comes from the quote alone: an immediate upgrade priced at a
proration_at instant is prorated. A reset-to-yearly duration_change also
carries proration_at but charges in full, so transition_type stays part of
the signal. The client-side cadence comparison no longer picks the family.
…quote's today fields

A same-cadence upgrade quoted without a proration instant showed the
full target-plan price and the recurring allowance beside a total and a
grant the server priced lower. The item now carries cost_today_cents
and the credits line reads credits_today_cents, dated by the server's
renewal when the grant is not the allowance.
@dante01yoon
dante01yoon force-pushed the jaewon/fe-3022-checkout-payment-authentication branch from e13bd7f to b1028a7 Compare September 29, 2026 03:50
@dante01yoon
dante01yoon force-pushed the jaewon/fe-3019-summary-ledger-model branch from 73b2616 to 4bb5dc6 Compare September 29, 2026 03:51
@christian-byrne christian-byrne removed their assignment Sep 29, 2026

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

The follow-up is sound at this exact head. The charge-now ledger now reads today's cost and grant from the authoritative quote, dates a partial grant from the server renewal, and keeps the recurring allowance visible as secondary context. The focused cases cover both same-cadence and Team commit changes. Exact-head CI is settled green and no review thread is unresolved.

dante01yoon added a commit that referenced this pull request Sep 29, 2026
… checkout (2/3: entry state and quote binding) (#19277)

## Why

FE-3020 part 2 of 3, stacked on
#19276. It adds the
pure pieces the promo entry needs before any UI: a place for a promo
code on the entry URL, one state machine for the entry, and a Subscribe
that echoes the code its quote was priced with. Without that echo,
billing's quote revalidation (`EqualFold(quote.PromotionCode,
req.PromotionCode)` in `subscription_quote.go`) answers
`SUBSCRIPTION_QUOTE_STALE` to every Pay on a promo quote.

## Root cause

n/a, feature.

## How

- `@comfyorg/billing-contract`: a new optional entry field
`promotionCode`, carried as the `promo` query param. It is one more row
in `OPTIONAL_ENTRY_FIELDS`, with the shared identifier charset and the
code `INVALID_PROMOTION_CODE`. The contract still carries no price. The
code only prefills a field that the customer applies (DES-1088:
"prefill, never apply").
- `checkout/promoEntry.ts` is a pure module.
- `PromoEntry` is `idle | editing(draft) | applying(draft) |
rejected(draft, reason) | applied(code) | removing(code)`.
- `reducePromoEntry` ignores any event that means nothing in the current
state, so a late answer for an abandoned apply changes nothing.
- `promoRejectionOf` reads `PROMOTION_CODE_INVALID` and
`PROMOTION_CODE_INAPPLICABLE` as `invalid`. Every other failure is
`unchecked`: the code was never judged.
- `promoEntryLive` is the quote-binding lock. Entry is live only in
capture, with no Pay in flight and no collided Pay being reconciled.
- `checkoutPage.ts`: two small additions, a `promo_expired { code }`
inline outcome and an optional `expiredPromo` on `requoted`. A lapsed
code outranks `price_updated`.
- `subscribeRequest.ts` sends `promotion_code` whenever the quote
carries one.

## Tradeoffs

- A malformed `promo` value refuses the whole entry URL, like every
other optional field. Real Stripe codes fit the charset. A per-field
"drop and continue" rule would break the table's one rule for all
fields.
- `applied` lives in the machine even though the quote also carries the
code. The chip renders from the quote. The machine uses it to hide the
entry at the cap and to re-quote with the code at Pay.

## Blast Radius

- The contract change is additive. Existing entry URLs parse unchanged.
- `promotion_code` on Subscribe is sent only when the quote has one.
Nothing on billing-web quotes a code until part 3, so both checkouts
send the same body as today.

## Verification

- `pnpm --filter @comfyorg/billing-contract test`: 75 pass. The
round-trip now includes `promo=LAUNCH20`, and `SAVE 20` is refused with
`INVALID_PROMOTION_CODE`.
- `pnpm --filter @comfyorg/billing-web test:unit`: 409 pass.
- `promoEntry.test.ts` has a 15-case transition table: apply ok, invalid
at Apply keeps the typed value, typing clears the error, an empty field
does not apply, the URL prefill opens unapplied and can be dismissed,
remove, a failed remove, expired at Pay, the cap blocks a second code, a
late answer, and a locked field while applying.
- It also covers rejection reads and the lock table: capture live;
locked with Pay in flight, while reconciling, and before the quote.
- `checkoutPage.test.ts`: a `requoted` event with `expiredPromo` leaves
the `promo_expired` card and Pay live.
- `subscribeRequest.test.ts`: a promo quote echoes `promotion_code`
beside `quote_id`.
- Mutation check: dropping the in-flight guard from `promoEntryLive`
fails its table case, and dropping the `promotion_code` echo fails the
request case.
- Typecheck, lint, `pnpm knip` and the pre-push fallow audit: clean.

## BE gaps / design questions

- BE gap: no distinct "expired" code at preview. An expired code arrives
as `PROMOTION_CODE_INVALID`, so "This code has expired." cannot be told
apart from "This code isn't valid." at Apply.
- BE gap: a code that lapses after Apply surfaces at Subscribe only as
`SUBSCRIPTION_QUOTE_STALE`. Part 3 infers the lapse by re-quoting with
the code and getting `PROMOTION_CODE_INVALID`. A typed
`PROMOTION_CODE_EXPIRED` on Subscribe would remove that inference.
- Contract question: should a bad `promo` value drop just the prefill
instead of refusing the entry?

## AS IS / TO BE

No visible change in this part. The UI lands in part 3.

## Where this sits in the plan

One linear stack on `main`: each PR is based on the one above it in the
table. The former FE-3019/FE-3020 sibling stack now sits on top of
FE-3022.

| Step | PR | Scope |
|---|---|---|
| FE-3067 | #19248
(merged) | flag and variant switch |
| FE-3018 PR 0 |
#19252 | page state
union and pure transition |
| FE-3018 PR 1 |
#19253 | shell,
eyebrow, capture skeleton |
| FE-3018 PR 2a |
#19263 | saved-method
tabs, rail failure taxonomy |
| FE-3018 PR 2b |
#19264 | inline Pay
outcomes, backstop, reactivation |
| FE-3018 PR 3a |
#19268 | mount
reconciliation, placeholders |
| FE-3018 PR 3b |
#19271 | bfcache and
cross-tab re-reconciliation |
| FE-3021 PR 1 |
#19279 | success,
already completed, in progress, received, unconfirmed |
| FE-3021 PR 2 |
#19280 | refusal, plan
not available, couldn't load |
| FE-3022 | #19285 |
two-phase submit area, 3DS re-open, redirect methods, verification
failed |
| FE-3019 PR 1 |
#19266 | summary
ledger model and builder |
| FE-3019 PR 2 |
#19267 | left-column
ledger rendering |
| FE-3020 1/3 | #19276
| discount rows, fold rule, Subtotal |
| **FE-3020 2/3** | **this PR** | **promo entry state, Pay binding, URL
promo** |
| FE-3020 3/3 | #19278
| promo entry UI, chips, expired card |

```mermaid
graph LR
  M["main (19248 merged)"] --> N19252["19252 page state"] --> N19253["19253 shell"] --> N19263["19263 rails"] --> N19264["19264 outcomes"] --> N19268["19268 mount reconciliation"] --> N19271["19271 bfcache and cross-tab"] --> N19279["19279 money endings"] --> N19280["19280 refusal screens"] --> N19285["19285 payment authentication"] --> N19266["19266 ledger model"] --> N19267["19267 ledger UI"] --> N19276["19276 discount rows"] --> N19277["19277 promo entry state"] --> N19278["19278 promo entry UI"]
  style N19277 stroke-width:3px
```
dante01yoon added a commit that referenced this pull request Sep 29, 2026
… checkout (1/3: discount rows) (#19276)

## Why

FE-3020 (Milestone 3, checkout guidebook 3, design source DES-1211,
DES-1020 and DES-1088). The full-page ledger drops the quote's
`discounts[]`, so a customer with an education discount or an applied
code sees a plan row and a total that do not add up. This is part 1 of
3: render the discounts the server already reports.

## Root cause

n/a, feature.

## How

- `buildSummaryLedger` now returns four discount slots next to each
family's rows:
  - `adjustments`: held discounts, rendered as rows before any Subtotal.
  - `promo`: the row for the customer's entered code.
- `subtotal`: the pre-discount base an entered code applied to. The
quote reports no such field, so no builder sets it; the row stays typed
but unrendered until the server reports one.
- `chips`: which code produced each discount, and whether it can be
removed. Part 3 renders these.
- `acceptsPromo`: only `charge_now` and `prorated_change` take a code.
The server refuses codes on scheduled changes
(`PROMOTION_CODE_INAPPLICABLE`), and `top_up` has no promo per DES-1088.
- Fold vs row is decided by `discount.kind`:
- `plan` means a catalog coupon the price is built from
(`annual_plan_discount_20`, `team_commitment_*`). It is already inside
the item amount and never becomes a row.
- `promotion` always becomes a row. The one whose `code` matches the
quote's `promotion_code` (case-insensitive) is the entered code; any
other is held.
- Row label is `name ?? "Promo code"`. The amount is
`−{amount_off_cents}`. The code string never appears in the label.
- Subtotal never renders today: the quote carries no pre-discount total,
and the amount due plus the entered code's `amount_off_cents` would be a
frontend guess at a server-owned number (every number on checkout is
server-reported). DES-1020's 50%-of-$6,048 framing needs a BE field
before Subtotal can show.
- `CheckoutLedger.vue` still renders a Subtotal row (muted, per Figma
351:14634) when `ledger.subtotal` is set, but no builder in this stack
ever sets it.

## Tradeoffs

- Figma draws discount amounts as `−$X` with no strikethrough. DES-1088
reserves strikethrough for discounts but the frames apply it only to the
yearly compare price. This PR follows the frames.
- "Mechanism coupon folds" uses the server's `kind: 'plan'`
classification instead of a catalog coupon id list, because the plans
catalog does not expose coupon ids.

## Blast Radius

Only `billing_web_checkout_ui = full_page`. A quote without
`discounts[]` renders exactly as before. Subtotal never renders in this
PR; see BE gaps.

## Verification

- `pnpm --filter @comfyorg/billing-web typecheck`: clean.
- `pnpm --filter @comfyorg/billing-web test:unit`: 381 tests pass.
- `summaryLedger.test.ts` has a table of 7 cases: a catalog coupon
folds; an unnamed entered code reads "Promo code"; a named code reads
its name; the code match ignores case; a held discount has a chip with
no remove; a held discount before an entered code still leaves Subtotal
out because the quote reports no pre-discount base; an entered code with
no amount gets no Subtotal.
- `CheckoutSummaryColumn.test.ts` covers the Subtotal row's presentation
contract given a ledger that already carries one, independent of any
builder.
- `CI=1 pnpm exec playwright test` in `apps/billing-web`: 41 passed.
`full-page-summary.spec.ts` covers a quote with a `plan` coupon, a held
Education discount and an entered code: `Education discount−$10.00`,
`Promo code−$20.00`, `Total due today$20.00`, never the folded coupon,
and never a `Subtotal` row.
- Mutation check: letting `plan` discounts through the filter fails 3
ledger cases.
- `pnpm knip`, lint, oxfmt and oxlint on changed files, and the pre-push
fallow audit: clean.

## BE gaps / design questions

- BE gap: no server-reported subtotal before discounts.
`SubscriptionPreview` has no `subtotal_cents` /
`amount_before_discount_cents` field, so Subtotal cannot render without
the frontend computing it from `amount_due_cents` plus the entered
code's `amount_off_cents`, which this fix removes as frontend-assembled
server state.
- BE gap: `SubscriptionDiscount` has no `duration`, `duration_in_months`
or `percent_off`. The sublines "first year" / "for N months" / "20% off"
cannot be rendered, so rows carry no subline.
- BE gap: a held discount's `code` may be an internal coupon id rather
than a customer-facing code. It is shown on the chip as the server sends
it.
- BE gap (BE-13100): no endpoint removes a standing coupon, so held
chips never get a remove control.
- Design: strikethrough on promo amounts (DES-1088 wording) versus none
(Figma frames).

## AS IS / TO BE

Captured from the e2e harness (production build, mocked Cloud, fake
Stripe) at 1512x982 with `full_page` on. The quote is Pro monthly $50
with a held Education discount (-$10) and an entered code COMFY50
(-$20), the same scenario `full-page-summary.spec.ts` covers. AS IS is
the base branch
(#19267). The chips
render in part 3.

The TO BE screenshot below is recaptured from this fix: no Subtotal row,
because the quote does not report a pre-discount base and this PR no
longer computes one client-side.

| AS IS: the rows are missing, $50 resolves to $20 | TO BE: held row,
entered row, no Subtotal | Figma 351:14634 |
|---|---|---|
|
![as-is](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/b776082b48446e210b7b7dd9a4e054671ee67da6/as-is-held-and-entered.png)
|
![to-be](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/8a73391be26d5ad04c5585a8a8110a8b644e4169/to-be-held-and-entered.png)
|
![figma](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/b776082b48446e210b7b7dd9a4e054671ee67da6/figma-held-plus-code.png)
|

## Where this sits in the plan

One linear stack on `main`: each PR is based on the one above it in the
table. The former FE-3019/FE-3020 sibling stack now sits on top of
FE-3022.

| Step | PR | Scope |
|---|---|---|
| FE-3067 | #19248
(merged) | flag and variant switch |
| FE-3018 PR 0 |
#19252 | page state
union and pure transition |
| FE-3018 PR 1 |
#19253 | shell,
eyebrow, capture skeleton |
| FE-3018 PR 2a |
#19263 | saved-method
tabs, rail failure taxonomy |
| FE-3018 PR 2b |
#19264 | inline Pay
outcomes, backstop, reactivation |
| FE-3018 PR 3a |
#19268 | mount
reconciliation, placeholders |
| FE-3018 PR 3b |
#19271 | bfcache and
cross-tab re-reconciliation |
| FE-3021 PR 1 |
#19279 | success,
already completed, in progress, received, unconfirmed |
| FE-3021 PR 2 |
#19280 | refusal, plan
not available, couldn't load |
| FE-3022 | #19285 |
two-phase submit area, 3DS re-open, redirect methods, verification
failed |
| FE-3019 PR 1 |
#19266 | summary
ledger model and builder |
| FE-3019 PR 2 |
#19267 | left-column
ledger rendering |
| **FE-3020 1/3** | **this PR** | **discount rows, fold rule, Subtotal**
|
| FE-3020 2/3 | #19277
| promo entry state, Pay binding, URL promo |
| FE-3020 3/3 | #19278
| promo entry UI, chips, expired card |

```mermaid
graph LR
  M["main (19248 merged)"] --> N19252["19252 page state"] --> N19253["19253 shell"] --> N19263["19263 rails"] --> N19264["19264 outcomes"] --> N19268["19268 mount reconciliation"] --> N19271["19271 bfcache and cross-tab"] --> N19279["19279 money endings"] --> N19280["19280 refusal screens"] --> N19285["19285 payment authentication"] --> N19266["19266 ledger model"] --> N19267["19267 ledger UI"] --> N19276["19276 discount rows"] --> N19277["19277 promo entry state"] --> N19278["19278 promo entry UI"]
  style N19276 stroke-width:3px
```
## Why

FE-3019 (Milestone 3, checkout guidebook 2, design source DES-1210 and
DES-1088). The full-page checkout's left column shows only "Subscribe to
{plan}", the plan's list price and the total, whatever the transition.
An upgrade reads as a subscribe, and nothing shows the credits, the
proration or the renewal. This PR renders the `SummaryLedger` from
#19266 in that column.

## Root cause

n/a, feature.

## How

- `FullPageCheckoutView.vue` builds the ledger from the capture quote
with `buildSummaryLedger`, the session's workspace name and the tier
copy. It replaces the old `summary` computed. This is the only wiring
change; `checkoutPage.ts`, `useFullPageCheckout.ts` and the payment
column are untouched.
- `components/fullPage/summary/CheckoutLedger.vue` renders the model in
this order:
  - eyebrow
  - headline with currency and optional rate
  - credits line with the coins icon
  - a divider that opens the ledger
  - items and adjustments, each with sublines
  - a divider and Subtotal, only when the model has one
  - a divider and "Total due today"
  - the trailing lines, with no divider after the Total
- `CheckoutSummaryColumn.vue` takes `ledger?: SummaryLedger` and keeps
PR 1's capture skeleton bars until the quote arrives. The section is now
the "Order summary" region, so tests and assistive tech can find it.
- The old `checkout.fullPage.eyebrow` and `eyebrowPlanOnly` keys are
removed.

## Tradeoffs

- Rows reuse existing tokens: `text-sm font-semibold` labels, `text-xs
text-muted-foreground` sublines, `border-border-default` dividers. No
new design tokens.
- The adjustments list renders like items and nothing fills it yet. The
promo row grammar and the strikethrough belong to FE-3020.
- Two `FullPageCheckoutView.test.ts` cases waited on "Subscribe to
Creator Plan" for an `upgrade` quote. They now wait on "Upgrade to
Creator Plan", which is the corrected eyebrow.

## Blast Radius

Only `billing_web_checkout_ui = full_page`. The embedded
`CheckoutView.vue` and `EmbeddedCheckout.vue` are untouched.

## Verification

- `pnpm --filter @comfyorg/billing-web typecheck`: clean.
- `pnpm --filter @comfyorg/billing-web test:unit`: 29 files, 374 tests
pass.
- `CheckoutSummaryColumn.test.ts`: the skeleton holds until the quote
arrives; the page-order outline of dividers and rows is divider, rows,
divider, Total, trailing lines; a Subtotal gets its own divider; a
scheduled headline carries its rate.
- `CI=1 pnpm exec playwright test` in `apps/billing-web` (fresh
production build): 40 passed.
- New `full-page-summary.spec.ts`: a new subscription reads "Subscribe
to Pro Plan · Personal", "$50 USD", "21,100 credits per month", the row,
the total and "Renews at $50.00 on July 28, 2026".
- A tier upgrade priced at a `proration_at` instant reads "Upgrade to
Pro Plan · Personal", "$32.50 USD", "6,858 credits added today (expire
July 28)", "Pro Plan - Prorated", "Existing credits are kept" and the
renewal.
- The quote is mocked through the cloud fixture's
`/billing/preview-subscribe`. `firebase_config` and `/api/features` are
untouched.
- `pnpm --filter @comfyorg/billing-web lint`, oxfmt and type-aware
oxlint on changed files, `pnpm knip`, and the pre-push `fallow:audit`:
clean.

## BE gaps / design questions

Carried from #19266:

- BE gap: no itemized proration amounts, so the upgrade shows one net
row, not Figma's $50.00 / -$17.50 pair.
- BE gap: the credits delta expiry is read from `renewal_at`.
- BE gap: no compare price for yearly plans.
- BE gap: credits are reported as credit-cents.
- BE gap: no top-up quote on billing-web.
- Team commit change proration is unverified (Wei, 2026-09-25), so
commit changes render neutral.
- Design: should Subtotal appear above Total with 2+ rows and no promo?
Figma says no; the DES-1088 wording says yes.

## AS IS / TO BE

Captured from the e2e harness (production build, mocked Cloud, fake
Stripe) at 1512x982 with `full_page` on, workspace "Personal". The fake
Stripe mounts no real element, so the card area is empty. AS IS is the
base stack head
(#19264). Figma is the
DES-1210 frame for the same family (workspace "Comfy Studios", Figma's
own numbers).

| AS IS: an upgrade reads "Subscribe", the list price as headline, no
ledger | TO BE: prorated change | Figma 294:8378 |
|---|---|---|
| ![as-is
upgrade](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/766be797abafa4f2f0664fd9f80562b0a649d4ea/as-is-tier-upgrade.png)
| ![to-be
upgrade](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/766be797abafa4f2f0664fd9f80562b0a649d4ea/to-be-tier-upgrade.png)
| ![figma
upgrade](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/766be797abafa4f2f0664fd9f80562b0a649d4ea/figma-tier-upgrade.png)
|

| AS IS: new subscription | TO BE: charge now, monthly | Figma 266:4370
|
|---|---|---|
| ![as-is new
sub](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/766be797abafa4f2f0664fd9f80562b0a649d4ea/as-is-new-sub-monthly.png)
| ![to-be new
sub](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/766be797abafa4f2f0664fd9f80562b0a649d4ea/to-be-new-sub-monthly.png)
| ![figma new
sub](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/766be797abafa4f2f0664fd9f80562b0a649d4ea/figma-subscribe-monthly.png)
|

| AS IS: downgrade reads "Subscribe" and a $35.00 price over $0.00 | TO
BE: scheduled $0 | Figma 266:4420 |
|---|---|---|
| ![as-is
downgrade](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/766be797abafa4f2f0664fd9f80562b0a649d4ea/as-is-downgrade-scheduled.png)
| ![to-be
downgrade](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/766be797abafa4f2f0664fd9f80562b0a649d4ea/to-be-downgrade-scheduled.png)
| ![figma
downgrade](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/766be797abafa4f2f0664fd9f80562b0a649d4ea/figma-downgrade-scheduled.png)
|

| TO BE: monthly to yearly, not prorated | TO BE: $0-due new
subscription (promo row pending FE-3020) | Figma 294:8224 |
|---|---|---|
| ![to-be monthly to
yearly](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/766be797abafa4f2f0664fd9f80562b0a649d4ea/to-be-monthly-to-yearly.png)
| ![to-be zero
due](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/766be797abafa4f2f0664fd9f80562b0a649d4ea/to-be-new-sub-zero-due.png)
| ![figma zero
due](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/766be797abafa4f2f0664fd9f80562b0a649d4ea/figma-zero-due.png)
|

Differences from Figma, all traced above: the upgrade shows one net row
because the quote has no itemized proration; yearly rows say "Billed
yearly" without the compare price; renewal and start dates carry the
year; the $0-due ledger lacks its promo row until FE-3020, so its row
and total do not reconcile on screen yet.

## Where this sits in the plan

One linear stack on `main`: each PR is based on the one above it in the
table. The former FE-3019/FE-3020 sibling stack now sits on top of
FE-3022.

| Step | PR | Scope |
|---|---|---|
| FE-3067 | #19248
(merged) | flag and variant switch |
| FE-3018 PR 0 |
#19252 | page state
union and pure transition |
| FE-3018 PR 1 |
#19253 | shell,
eyebrow, capture skeleton |
| FE-3018 PR 2a |
#19263 | saved-method
tabs, rail failure taxonomy |
| FE-3018 PR 2b |
#19264 | inline Pay
outcomes, backstop, reactivation |
| FE-3018 PR 3a |
#19268 | mount
reconciliation, placeholders |
| FE-3018 PR 3b |
#19271 | bfcache and
cross-tab re-reconciliation |
| FE-3021 PR 1 |
#19279 | success,
already completed, in progress, received, unconfirmed |
| FE-3021 PR 2 |
#19280 | refusal, plan
not available, couldn't load |
| FE-3022 | #19285 |
two-phase submit area, 3DS re-open, redirect methods, verification
failed |
| FE-3019 PR 1 |
#19266 | summary
ledger model and builder |
| **FE-3019 PR 2** | **this PR** | **left-column ledger rendering** |
| FE-3020 1/3 | #19276
| discount rows, fold rule, Subtotal |
| FE-3020 2/3 | #19277
| promo entry state, Pay binding, URL promo |
| FE-3020 3/3 | #19278
| promo entry UI, chips, expired card |

```mermaid
graph LR
  M["main (19248 merged)"] --> N19252["19252 page state"] --> N19253["19253 shell"] --> N19263["19263 rails"] --> N19264["19264 outcomes"] --> N19268["19268 mount reconciliation"] --> N19271["19271 bfcache and cross-tab"] --> N19279["19279 money endings"] --> N19280["19280 refusal screens"] --> N19285["19285 payment authentication"] --> N19266["19266 ledger model"] --> N19267["19267 ledger UI"] --> N19276["19276 discount rows"] --> N19277["19277 promo entry state"] --> N19278["19278 promo entry UI"]
  style N19267 stroke-width:3px
```
@dante01yoon
dante01yoon merged commit a816c79 into jaewon/fe-3022-checkout-payment-authentication Sep 29, 2026
130 checks passed
@dante01yoon
dante01yoon deleted the jaewon/fe-3019-summary-ledger-model branch September 29, 2026 06:08
dante01yoon added a commit that referenced this pull request Sep 29, 2026
…ll-page checkout (#19285)

## Why

FE-3022 (Milestone 3, checkout guidebook 5; design source DES-1213,
rulebook DES-1088). Between Pay and a terminal the full-page checkout
said nothing: a 3DS challenge, a charge in flight and a redirect method
all showed the same disabled Pay, a reload mid-challenge landed on a
"Finishing your payment…" placeholder, and a challenge the bank refused
left Pay busy forever because the subscribe promise never resolves for a
still-pending operation. This PR renders the two submit phases, the
redirect pre-money line, the lock, the re-openable challenge after a
reload and the Payment not verified card at capture. Stacked on
#19280.

## Root cause

n/a, feature.

## How

- `Attempt` becomes a union: `idle`, or `sent` carrying the operation
the lifecycle publishes for this Pay and the `redirectMethod` when the
chosen method pays on its own site. `submitPhaseOf(page)` derives the
submit area's phase from it and from a `waiting` page: `challenge`
(Phase A) only when the server says `authentication_state:
requires_action` (never from `action_url` presence, FE-2643),
`redirecting` for a non-card method, `processing` (Phase B) otherwise.
The swap is a state change; no timer exists.
- `CheckoutPayAction` renders the footnote in an always-mounted
`role="status" aria-live="polite"` node, so the Phase A line, the Phase
B line and the redirect line announce. Phase A adds a ghost Continue
verification (when `isChallengeReopenable`: hosted with `action_url`, or
an embedded challenge not already on screen) and a ghost Cancel payment
behind `canCancel`.
- `isLocked(page)` is true while a Pay is sent and on `waiting`: the
back arrow hides, the tabs and the saved-method list get `inert`,
`StripePaymentForm` gets a new `locked` prop that makes the elements
inert, and Pay is disabled with `aria-busy`. Only the phase buttons stay
live.
- The `waiting` placeholder column is replaced by the capture skeleton
with the phase footnote, so a reload during Phase A renders the verify
state and a return from a provider renders Phase B on the same layout.
The lifecycle's `continuationKey` watch re-drives the challenge from the
client secret the server still reports.
- A challenge the bank refuses leaves the operation pending with
`failed_retryable`; `followedOwn` lands that verdict as the Payment not
completed card (D1, one card for 3DS and redirect back-outs) with
`attempt` idle, and `isParked` treats it as capture's business so Pay is
live for the retry. `submitting` is now derived from the page, and a
subscribe promise resolving after a newer Pay is ignored
(`payGeneration`).
- `StripePaymentForm` emits the token's `payment_method_preview.type` as
a second `confirm` argument; the saved rail reads the method's `type`.
`PayChoice` carries `methodType`, and any non-card type is a redirect
method (the contract's own rule on `return_url`).
- The full page's `return_url` is the checkout URL itself
(`checkoutReturnUrl`), so the return from Alipay is a fresh mount riding
mount reconciliation; the M2 view keeps `/v1/result`.
- Design review (Alex 2026-09-28): D1 copy "Payment not completed / Your
payment wasn't completed, so you haven't been charged. Pay to try again,
or use a different payment method." (Figma 340-13834) replaces "Payment
not verified" in the refused-challenge path; the outcome kind is
`not_completed`. The back arrow stays hidden while a challenge is open
(the `locked` prop on the summary column).
- Copy: Phase A "Nothing has been charged yet.", Phase B "This payment
is already processing and can't be canceled.", redirect "Taking you to
{method} to finish paying. Nothing has been charged yet." with a
provider-less fallback; the method name comes from
`checkout.fullPage.phase.methods.*`.
- Rebased onto main: the dead `checkoutResultUrl` export is removed.

## Tradeoffs

- Cancel payment is hidden behind `PENDING_PAYMENT_CANCEL_AVAILABLE =
false` rather than faking a cancel: no endpoint cancels a pending
operation or PaymentIntent (the SDK's `cancel()` only changes a display
step), and a Cancel that returned to capture while the server kept the
challenge open would lie. The component and its tests support the
control; flipping the constant and wiring the click is the only work
left once the endpoint lands.
- The lock covers every in-flight phase, not only Phase A: the Figma
frames hide the back arrow on Phase B and the redirect frame too, and a
live tab switch under a charge in flight has no honest outcome.
- Continue verification renders for an embedded challenge only while its
status is `required`. The lifecycle re-drives a resumed challenge on its
own, so on a reload the button exists for the instant before Stripe's
modal opens; the hosted case (a customer who closed the invoice tab) is
where it does the work.
- The two `CheckoutPayAction` instances behind the tab row (the saved
panel's and the card form's, which stays mounted behind the Saved tab)
would be two live regions; only the visible one carries the phase.

## Blast Radius

`billing_web_checkout_ui = full_page` only for the page behaviour. Two
package changes reach the M2 views: `StripePaymentForm` gains an
optional `locked` prop and a second `confirm` argument (existing
listeners ignore it), and `checkoutResultUrl` is untouched.

## Verification

- `pnpm --filter @comfyorg/billing-web typecheck`, `pnpm --filter
@comfyorg/account-ui typecheck`: clean.
- `pnpm --filter @comfyorg/billing-web test:unit`: 31 files, 561 tests
pass (`@comfyorg/account-ui` stripe suite 26 pass). New: reducer tables
for `submitPhaseOf`, `isLocked`, `isChallengeReopenable`, `isParked`
with a refused challenge, and the transitions through a challenge;
`CheckoutPayAction` phases, live region, Cancel behind the capability,
Continue verification; view tests for Phase A to B to success with the
form locked, tabs inert, a refused challenge on its card with the same
form and a second subscribe, the Alipay line over a challenge, Continue
verification after a reload driving the challenge again, `return_url` on
`/v1/checkout`; the Stripe form's `locked` inert region and the emitted
method type.
- Mutation check: 15 mutations, each red (Phase A never detected 6, page
never locked 13, refused challenge stays waiting 4, own refused
challenge never lands the card 3, refused challenge not parked 2,
redirect line lost 2, Pay accepted while sent 3, reopen offered while
the modal is open 4, no live region 1, Cancel shown without the
capability 4, card treated as redirect 2, return URL stays on result 1,
submitting never clears 1, form ignores locked 1, method type not
emitted 1).
- `CI=1 pnpm exec playwright test` in `apps/billing-web`: 57 passed. New
`full-page-authentication.spec.ts`: Pay walks Phase A (locked, nothing
charged, Stripe driven with the poll's secret) into Phase B on the
bank's answer and then success; a saved-method Pay keeps the tabs inert;
a refused challenge lands on Payment not completed with the form still
mounted and Pay live; a reload during Phase A renders the verify state
and re-drives the challenge from the server's secret without a second
subscribe; a redirect method shows the pre-money line, never Phase B,
and leaves for the provider with `return_url` on `/v1/checkout`; the
return renders Phase B and follows to Already completed.
- `pnpm --filter @comfyorg/billing-web lint`, oxlint and oxfmt on
changed files, `pnpm knip`, pre-push `fallow:audit`: clean.

## BE gaps / design questions

- Phase-A cancel endpoint (BE): none exists for a pending operation or
PaymentIntent. Cancel payment stays hidden behind
`PENDING_PAYMENT_CANCEL_AVAILABLE`.
- D1 copy: the Payment not verified body keeps the DES-1088
third-variant copy ("Your bank didn't confirm this payment…"); the
genericised "Your payment wasn't completed, so you haven't been charged"
is pending design and is a locale-only change.
- The lifecycle auto-drives a resumed challenge on reload
(`usePaymentAttempt`'s continuation watch), for hosted pages as a
navigation. DES-1213 reads "re-openable"; if design wants the customer
to click first, that is an SDK change, not a page one.

## AS IS / TO BE

Captured from the e2e harness (production build, mocked Cloud, fake
Stripe with the challenge held open) at 1512x982 with `full_page` on, by
a throwaway spec run once on the base of the stack (AS IS, PR 19280) and
once on this branch. Figma frames from file C1fxz3akrW7Pl22zM2b301. The
fake Stripe mounts nothing, so the element areas are empty in both
columns; the Figma frames show the elements as placeholders too. Known
differences from Figma: no Cancel payment (BE gap above), and the
Payment not verified copy is the DES-1088 third variant (D1).

| Screen | AS IS | TO BE | Figma |
|---|---|---|---|
| Phase A, challenge pending |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/asis-phase-a.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/tobe-phase-a.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/figma-phase-a-145-4584.png)
|
| Phase B, processing |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/asis-phase-b.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/tobe-phase-b.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/figma-phase-b-342-4767.png)
|
| Redirect pre-money line (Alipay) |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/asis-redirecting.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/tobe-redirecting.png)
| frame 447-6886 in
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/figma-happy-flow-312-10091.png)
|
| Verification failed at capture |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/asis-verification-failed.png)
(Pay stuck busy, no card) |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/tobe-verification-failed.png)
| last lane of
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/figma-failed-flow-314-10555.png)
|
| Reload during Phase A |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/asis-reload-phase-a.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/tobe-reload-phase-a.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/3729470ca331bff40a2e0f387c31a195f90d0123/figma-phase-a-145-4584.png)
|

## Where this sits in the plan

One linear stack on `main`: each PR is based on the one above it in the
table. The former FE-3019/FE-3020 sibling stack now sits on top of
FE-3022.

| Step | PR | Scope |
|---|---|---|
| FE-3067 | #19248
(merged) | flag and variant switch |
| FE-3018 PR 0 |
#19252 | page state
union and pure transition |
| FE-3018 PR 1 |
#19253 | shell,
eyebrow, capture skeleton |
| FE-3018 PR 2a |
#19263 | saved-method
tabs, rail failure taxonomy |
| FE-3018 PR 2b |
#19264 | inline Pay
outcomes, backstop, reactivation |
| FE-3018 PR 3a |
#19268 | mount
reconciliation, placeholders |
| FE-3018 PR 3b |
#19271 | bfcache and
cross-tab re-reconciliation |
| FE-3021 PR 1 |
#19279 | success,
already completed, in progress, received, unconfirmed |
| FE-3021 PR 2 |
#19280 | refusal, plan
not available, couldn't load |
| **FE-3022** | **this PR** | **two-phase submit area, 3DS re-open,
redirect methods, verification failed** |
| FE-3019 PR 1 |
#19266 | summary
ledger model and builder |
| FE-3019 PR 2 |
#19267 | left-column
ledger rendering |
| FE-3020 1/3 | #19276
| discount rows, fold rule, Subtotal |
| FE-3020 2/3 | #19277
| promo entry state, Pay binding, URL promo |
| FE-3020 3/3 | #19278
| promo entry UI, chips, expired card |

```mermaid
graph LR
  M["main (19248 merged)"] --> N19252["19252 page state"] --> N19253["19253 shell"] --> N19263["19263 rails"] --> N19264["19264 outcomes"] --> N19268["19268 mount reconciliation"] --> N19271["19271 bfcache and cross-tab"] --> N19279["19279 money endings"] --> N19280["19280 refusal screens"] --> N19285["19285 payment authentication"] --> N19266["19266 ledger model"] --> N19267["19267 ledger UI"] --> N19276["19276 discount rows"] --> N19277["19277 promo entry state"] --> N19278["19278 promo entry UI"]
  style N19285 stroke-width:3px
```
dante01yoon added a commit that referenced this pull request Sep 29, 2026
…e screens (#19280)

## Why

FE-3021 PR 2 of 2 (design source DES-1212, Unauthorized and Checkout
Can't Load sections). PR 3a rendered a refusal and an outage as a bare
title and a line of copy. This PR renders the three designed full-page
refusals: Checkout not available (authorization), This plan is no longer
available (stale link) and Couldn't load your checkout (transient).
Stacked on #19279.

## Root cause

n/a, feature.

## How

- The page union gains `plan_unavailable`, and two events:
`planUnavailable` (only from `resolving`) and `retried` (only from
`unavailable`, back to `resolving`).
- `plan_unavailable` carries a reason: `retired` (a preview-subscribe
failure whose server code is `INVALID_PLAN`, code PLAN_NOT_FOUND),
`team_stop_missing` (the quote came back for a `TEAM` tier and the link
carried no `team_credit_stop_id`, code CHECKOUT_LINK_INVALID) or
`unreadable` (the link failed `parseBillingEntry`, code
CHECKOUT_LINK_INVALID). Any other quote failure is `unavailable`. The
stop stays encoded as `team_credit_stop_id` / `teamCreditStopId`.
- `endingOf` maps the three pages to `refused` (code = the capability
denial reason upper-cased, e.g. NOT_WORKSPACE_OWNER), `plan_unavailable`
and `load_failed` (code = the coded failure). `CheckoutEnding` gains the
refused tone and two primary actions.
- Checkout not available: billing-agnostic body, copyable reason code,
Contact support as the only action. Plan not available ("This plan isn't
available", the checkout's 404): View plans opens the cloud pricing
table (`checkout/cloudLinks.ts`, `/?pricing=1`, or `/?pricing=team` for
a team link missing its stop, with the billed workspace), Contact
support secondary. Couldn't load: Try again re-runs `reconcile()` and
the capture read in place, no navigation.
- Unreadable checkout links, full page only: `App.vue` no longer
explains a failed parse itself when the route is `/v1/checkout` (or the
sign-in page returning to it); `CheckoutRouteView` resolves the flag as
usual and renders `EntryErrorView` for `embedded` (M2 unchanged) or the
full page, whose composable starts on `plan_unavailable: unreadable`. A
signed-out visitor still signs in first, since the flag needs a session.
- Design review (Alex 2026-09-28): D5 (team link without a stop is an
invalid link), View plans into the pricing table on the Team tab, the
generic Plan not available copy, CHECKOUT_LINK_INVALID for unreadable
links. Screenshots below recaptured.
- The PR 3a inline refused/unavailable block and its locale keys are
removed.

## Tradeoffs

- Retrying can't help a dead slug, so Plan not available has no Try
again; a load failure can't be fixed by a catalog, so it has no View
plans. That is DES-1212's reason for two screens.
- Only `INVALID_PLAN` maps to Plan not available. The billing-api
preview answers an unknown slug 404 with no code body, and a
retired-but-present plan answers 422 `TRANSITION_NOT_ALLOWED`, which
also covers other refusals; both stay on Couldn't load.

## Blast Radius

Only `billing_web_checkout_ui = full_page`, and only the refused and
outage pages. The embedded views are untouched.

## Verification

- `pnpm --filter @comfyorg/billing-web typecheck`: clean.
- `pnpm --filter @comfyorg/billing-web test:unit`: 30 files, 507 tests
pass. New cases: reducer (`planUnavailable`, `retried`, and the pairs
that must do nothing), `endingOf` for all seven denial reasons,
`CheckoutEnding` copy, actions and emits for the three screens, view
tests for `INVALID_PLAN` vs any other refused quote and Try again after
a failed recovery (a second `recover` and preview, then capture).
- Mutation check on the whole stack, 17 mutations, each red; the four
specific to this PR: Try again ignored by the reducer, `INVALID_PLAN`
not recognised, Try again skipping the re-read, the refusal code not
upper-cased.
- `CI=1 pnpm exec playwright test` in `apps/billing-web`: 51 passed. New
in `full-page-endings.spec.ts`: a member refused with
`not_workspace_owner` sees the code and Contact support only; a 400
`INVALID_PLAN` quote renders PLAN_NOT_FOUND and View plans lands on the
cloud pricing table (`?pricing=1&workspace=ws_e2e`); a 503 quote renders
Couldn't load and Try again reaches an enabled Pay on the same URL with
exactly two quotes.
- After the design review: unit tables for the three reasons and their
codes (`endingScreen.test.ts`, reducer), a three-row view table
(retired, team plan without its stop, unreadable link: heading, code, no
form, no subscribe, View plans href), `CheckoutRouteView.test.ts`
(unreadable link is the entry error on `embedded` and the full page on
`full_page`), a router test that a signed-out visitor with an unreadable
checkout link reaches sign-in. E2E: a team link without its stop renders
CHECKOUT_LINK_INVALID and View plans lands on
`?pricing=team&workspace=ws_e2e`; an unknown-product checkout link
renders Plan not available on the full page and "We couldn't open that
billing page" with the flag off. 550 unit tests and the endings and
entry specs pass at this head.
- `pnpm --filter @comfyorg/billing-web lint`, oxfmt and oxlint on
changed files, `pnpm knip`, pre-push `fallow:audit`: clean.

## BE gaps / design questions

- `BillingFailure` carries no request id, so Couldn't load shows the
coded failure (REQUEST_FAILED) instead of the `req_…` reference in
Figma.
- Retired plans need a distinct server code; today only an unknown slug
is recognisable.
- The billing-web contract has no host catalog URL, so View plans goes
to `return_to` and is hidden without one.

## AS IS / TO BE

Captured from the e2e harness (production build, mocked Cloud, fake
Stripe) at 1512x982 with `full_page` on, by a throwaway spec run once on
the base of the stack (AS IS, PR 3a placeholders) and once on this
branch. Figma frames from file C1fxz3akrW7Pl22zM2b301. Known difference
from Figma: the Couldn't load code is the coded failure, not a request
id (BE gap).

| Screen | AS IS | TO BE | Figma |
|---|---|---|---|
| Checkout not available |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/asis-refused.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/tobe-refused.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/figma-checkout-not-available-329-10947.png)
|
| Plan not available |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/asis-plan-not-available.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/04c6120c96b0488c1ee40b0aa7fb074229893c19/tobe-plan-not-available.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/figma-plan-not-available-433-6840.png)
|
| Plan not available, team link without its stop (CHECKOUT_LINK_INVALID)
| (no AS IS: rendered the form) |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/04c6120c96b0488c1ee40b0aa7fb074229893c19/tobe-plan-not-available-link-invalid.png)
| same frame |
| Couldn't load your checkout |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/asis-couldnt-load.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/tobe-couldnt-load.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/figma-couldnt-load-421-5804.png)
|

## Where this sits in the plan

One linear stack on `main`: each PR is based on the one above it in the
table. The former FE-3019/FE-3020 sibling stack now sits on top of
FE-3022.

| Step | PR | Scope |
|---|---|---|
| FE-3067 | #19248
(merged) | flag and variant switch |
| FE-3018 PR 0 |
#19252 | page state
union and pure transition |
| FE-3018 PR 1 |
#19253 | shell,
eyebrow, capture skeleton |
| FE-3018 PR 2a |
#19263 | saved-method
tabs, rail failure taxonomy |
| FE-3018 PR 2b |
#19264 | inline Pay
outcomes, backstop, reactivation |
| FE-3018 PR 3a |
#19268 | mount
reconciliation, placeholders |
| FE-3018 PR 3b |
#19271 | bfcache and
cross-tab re-reconciliation |
| FE-3021 PR 1 |
#19279 | success,
already completed, in progress, received, unconfirmed |
| **FE-3021 PR 2** | **this PR** | **refusal, plan not available,
couldn't load** |
| FE-3022 | #19285 |
two-phase submit area, 3DS re-open, redirect methods, verification
failed |
| FE-3019 PR 1 |
#19266 | summary
ledger model and builder |
| FE-3019 PR 2 |
#19267 | left-column
ledger rendering |
| FE-3020 1/3 | #19276
| discount rows, fold rule, Subtotal |
| FE-3020 2/3 | #19277
| promo entry state, Pay binding, URL promo |
| FE-3020 3/3 | #19278
| promo entry UI, chips, expired card |

```mermaid
graph LR
  M["main (19248 merged)"] --> N19252["19252 page state"] --> N19253["19253 shell"] --> N19263["19263 rails"] --> N19264["19264 outcomes"] --> N19268["19268 mount reconciliation"] --> N19271["19271 bfcache and cross-tab"] --> N19279["19279 money endings"] --> N19280["19280 refusal screens"] --> N19285["19285 payment authentication"] --> N19266["19266 ledger model"] --> N19267["19267 ledger UI"] --> N19276["19276 discount rows"] --> N19277["19277 promo entry state"] --> N19278["19278 promo entry UI"]
  style N19280 stroke-width:3px
```
dante01yoon added a commit that referenced this pull request Sep 29, 2026
## Why

FE-3021 (Milestone 3, checkout guidebook 4, design source DES-1212 with
the DES-1088 rulebook). PR 3a rendered placeholders for every page that
is not capture. This PR replaces them with the designed ending screens
for money that settled or is still moving: Success, Already completed,
Payment in progress, Payment received and "We couldn't confirm your
payment". The refusal, Plan not available and Couldn't load screens
follow in the stacked PR 2 of 2.

Fixes FE-2856: an async capture (bank debit) sits in Stripe's processing
state for up to a day with no `action_url`, and no screen existed for
it. Arriving on checkout during that window now renders Payment in
progress instead of a fresh form or a spinner.

## Root cause

n/a, feature.

## How

- The page union gains `unconfirmed` (money whose outcome the page could
not learn) and replaces `terminal.started: boolean` with `attribution:
'started' | 'followed' | 'settled'`. Only `started` (this page's own
Pay) names a plan. `followed` is money watched settle from a screen that
promised to update; `settled` was already through on arrival or on a
re-read.
- `waitingOn(operation)` reads the op's own facts:
`authentication_state: succeeded` while still pending is Payment
received (charge through, plan landing); `processing` with `phase:
in_progress` and no `action_url` is Payment in progress; anything else
stays on PR 3a's verifying column for FE-3022.
- `reconciliation_needed` is never a card now. The BE maps both
`PaidUngrantable` and `SupersedeUncancelled` to it, so the client cannot
say whether money moved; it renders the hedged "We couldn't confirm"
screen. A verifying watch whose poll budget runs out lands there too; a
settling or received watch keeps its screen.
- When a watched operation's poll budget runs out, the page re-runs
`reconcile()`, which re-adopts the operation with a fresh budget. The
waiting screens promise to update on their own and a bank debit can take
hours. No new polling machinery.
- New pure selector `endingOf(page)` maps the page to an `EndingScreen`
and its support code; `CheckoutEnding.vue` renders it from one table
(tone, primary action, support link). Code card with a copy button
(`useClipboard`), Contact support mails the code, waiting screens carry
the close line and no Close button.
- Close: `window.close()` only when a script opened the tab, otherwise
`return_to` with `billing_result=success&billing_ref=<op>`, falling back
to the workspace's Plan & Credits settings when this family has no
destination for the target (the `returnLink` from PR 1). Close always
renders on the done family; the waiting family keeps its close line and
no button, as designed.
- Design review (Alex 2026-09-28): D4, Close destination rule from
DES-1212: `return_to`, else Plan & Credits. The `canClose` gate is gone.
- Removes `CheckoutTerminalCard.vue`.

## Tradeoffs

- The account-ui `CheckoutSuccess` (FE-3046) is not reused. It renders a
PrimeIcons icon billing-web does not load, needs a catalog
`CheckoutPlan` with a monthly credit count, and orders Close differently
from the full-page frame. The plan card here is built from the quote
only.
- The Success plan card omits the credits line from Figma: the quote
reports `credits_cents` (a dollar value) and billing-web keeps no
credits-per-dollar copy. FE-3019's ledger owns that conversion.
- The Success footer ("Auto closing and redirecting you back in 5...")
is not rendered: no countdown exists and DES-1212 says the footer never
promises a close it cannot perform.
- A pending op the lifecycle adopts from `/billing/status` is synthetic
until its first poll, so a revisit of a settled op passes through
verifying for one poll. Verifying resolving to success is therefore
Already completed; only Payment in progress, Payment received and
unconfirmed resolve to the card-less success.

## Blast Radius

Only `billing_web_checkout_ui = full_page`. The embedded views,
`payVerdict`'s card mapping for real declines, and the capture rails are
unchanged. `reconciliation_needed` on this page is now "We couldn't
confirm" instead of the processing-error card.

## Verification

- `pnpm --filter @comfyorg/billing-web typecheck`: clean.
- `pnpm --filter @comfyorg/billing-web test:unit`: 30 files, 483 tests
pass. New: `endingScreen.test.ts` (page to screen table),
`CheckoutEnding.test.ts` (copy, code card, Close/support per screen,
copy button, support mail), reducer tables for attribution, lapses,
`reconciliation_needed` and `waitingOn`, view tests for Close with and
without an opener, Payment in progress to received to success, and
lapsed watches re-reading.
- Mutation check, 13 mutations, each turned a test red: `waitingOn`
ignoring `action_url`, a settling lapse becoming unconfirmed, every
watched success attributed `followed`, own Pay ignoring
`reconciliation_needed`, unconfirmed dropping to capture while pending,
`reconciliation_needed` as a card again, lapsed watch not re-read, Close
always navigating, return link without outcome, settling screen hidden,
done family offering support, Close offered with nowhere to go, support
mail without the code.
- `CI=1 pnpm exec playwright test` in `apps/billing-web`: 48 passed. New
`full-page-endings.spec.ts`: success after Pay naming the plan, with
Close returning `billing_result=success&billing_ref=op_subscribe`;
Already completed on a revisit and again after reload, no subscribe;
FE-2856 processing capture renders Payment in progress, then resolves to
the card-less success when the op settles.
- `pnpm --filter @comfyorg/billing-web lint`, oxfmt and oxlint on
changed files, `pnpm knip`, pre-push `fallow:audit`: clean.
- After the design review: `FullPageCheckoutView.test.ts` adds Close
going to `/?settings=plan-credits&workspace=ws-team` for a
`platform_account` link the test family cannot resolve; the "Close
offered with nowhere to go" cases are removed with the gate. 519 unit
tests pass at this head. No e2e for the fallback: the router guard still
turns a checkout link with an unresolvable `return_to` into an entry
error before the page renders (kept so the flag-off embedded checkout is
unchanged), so on the full page the fallback is reachable only through
the unreadable-link route in the next PR, where View plans is the
action.

## BE gaps / design questions

- The op carries no plan, amount, workspace or credits-added facts, so
recovered ops stay card-less and the Payment received receipt rows
(DES-1088 situation 18) are not built. The receipt grammar and wave dots
wait on server-reported line facts.
- `reconciliation_needed` merges paid-ungrantable with
supersede-uncancelled; a distinct paid-ungrantable signal would let that
case render Payment received instead of the hedged screen.
- `authentication_state: processing` also covers
`requires_confirmation`, `requires_capture` and an unattempted intent,
so a seconds-scale confirmation can briefly render Payment in progress.
- No settled-op lookup: once the pending pointer is cleared a revisit
renders capture (the server still refuses a second Pay).
- Workspace in the body comes from the session credential, not the op.
- No Plan & Credits fallback URL exists without a valid `return_to`, so
Close is hidden there.

## AS IS / TO BE

Captured from the e2e harness (production build, mocked Cloud, fake
Stripe) at 1512x982 with `full_page` on, by a throwaway spec run once on
the base branch (AS IS, PR 3a placeholders) and once on this branch.
Figma frames from file C1fxz3akrW7Pl22zM2b301. Known differences from
Figma: no credits line and no auto-close footer on Success (see
Tradeoffs), and recovered operations are card-less by the attribution
rule.

| Screen | AS IS | TO BE | Figma |
|---|---|---|---|
| Success, this page's Pay |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/asis-success.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/tobe-success.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/figma-success-subscription-77-4068.png)
|
| Already completed, revisit |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/asis-already-completed.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/tobe-already-completed.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/figma-already-completed-328-4444.png)
|
| Payment in progress (FE-2856) |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/asis-in-progress.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/tobe-in-progress.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/figma-payment-in-progress-372-4951.png)
|
| In progress settled while watched, card-less |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/asis-completed-after-watching.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/tobe-completed-after-watching.png)
| attribution rule, no frame |
| Payment received, plain |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/asis-received.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/tobe-received.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/figma-payment-received-plain-80-5456.png)
|
| We couldn't confirm (`reconciliation_needed`; AS IS offers Pay over
it) |
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/asis-unconfirmed.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/tobe-unconfirmed.png)
|
![](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/34865f04264b01ec8a52a6e189658ca3bb90271d/figma-couldnt-confirm-320-10760.png)
|

## Where this sits in the plan

One linear stack on `main`: each PR is based on the one above it in the
table. The former FE-3019/FE-3020 sibling stack now sits on top of
FE-3022.

| Step | PR | Scope |
|---|---|---|
| FE-3067 | #19248
(merged) | flag and variant switch |
| FE-3018 PR 0 |
#19252 | page state
union and pure transition |
| FE-3018 PR 1 |
#19253 | shell,
eyebrow, capture skeleton |
| FE-3018 PR 2a |
#19263 | saved-method
tabs, rail failure taxonomy |
| FE-3018 PR 2b |
#19264 | inline Pay
outcomes, backstop, reactivation |
| FE-3018 PR 3a |
#19268 | mount
reconciliation, placeholders |
| FE-3018 PR 3b |
#19271 | bfcache and
cross-tab re-reconciliation |
| **FE-3021 PR 1** | **this PR** | **success, already completed, in
progress, received, unconfirmed** |
| FE-3021 PR 2 |
#19280 | refusal, plan
not available, couldn't load |
| FE-3022 | #19285 |
two-phase submit area, 3DS re-open, redirect methods, verification
failed |
| FE-3019 PR 1 |
#19266 | summary
ledger model and builder |
| FE-3019 PR 2 |
#19267 | left-column
ledger rendering |
| FE-3020 1/3 | #19276
| discount rows, fold rule, Subtotal |
| FE-3020 2/3 | #19277
| promo entry state, Pay binding, URL promo |
| FE-3020 3/3 | #19278
| promo entry UI, chips, expired card |

```mermaid
graph LR
  M["main (19248 merged)"] --> N19252["19252 page state"] --> N19253["19253 shell"] --> N19263["19263 rails"] --> N19264["19264 outcomes"] --> N19268["19268 mount reconciliation"] --> N19271["19271 bfcache and cross-tab"] --> N19279["19279 money endings"] --> N19280["19280 refusal screens"] --> N19285["19285 payment authentication"] --> N19266["19266 ledger model"] --> N19267["19267 ledger UI"] --> N19276["19276 discount rows"] --> N19277["19277 promo entry state"] --> N19278["19278 promo entry UI"]
  style N19279 stroke-width:3px
```
dante01yoon added a commit that referenced this pull request Sep 29, 2026
…ache restore and across tabs (#19271)

## Why

FE-3018 (Milestone 3, checkout guidebook 1). With PR 3a the full-page
checkout re-reads the live operation on mount, but two re-entries bypass
a mount: a page restored from the back-forward cache comes back exactly
as it was left, which after a Pay is a form over money that has since
moved (rule 16), and a sibling tab on the same checkout keeps its form
after another tab paid (rule 17). This PR re-runs reconciliation on
both, so the page flips to the truth rather than sitting on a stale
form. Second half of FE-3018 PR 3, stacked on
#19268.

## Root cause

n/a, feature.

## How

- `pageshow` with `event.persisted === true` calls `reconcile()`
(`useEventListener` from VueUse, in the view). A fresh navigation's
`pageshow` is ignored; the mount already reconciled.
- New `src/checkout/operationChannel.ts`: a channel named
`comfy:billing:op:${uid}:${workspaceId}`, BroadcastChannel where it
constructs, otherwise the `storage` event on a localStorage key of the
same name (each write is stamped so the event fires every time). Feature
detection follows account-core's `crossTabRefresh.ts`. A notice is `{
workspaceId, operationId, kind: 'started' | 'settled' }`; anything else,
and any notice for another workspace, is dropped. Neither transport
delivers to the tab that sent it.
- `useFullPageCheckout` opens one channel for the session's uid and
workspace, subscribes `() => reconcile()`, and closes it on scope
dispose. A notice is a nudge, never state: the listener reads nothing
from it and re-reads the server. Only an operation this page's own Pay
sent is announced (`started` when it first appears, `settled` when the
page lands on `terminal`), once each, so a tab that merely heard about
an operation never re-broadcasts it and two tabs cannot ping-pong.
- `reconcile()`'s generation guard from PR 3a is what makes re-running
it safe: a bfcache restore or a nudge overtaking a slower earlier read
wins, and the earlier answer is dropped.

## Tradeoffs

- Playwright's Chromium ships with the back-forward cache disabled, so
the e2e models the restore by dispatching `pageshow` with `persisted:
true` from the page, the event a real restore fires. The unit test does
the same.
- A plan the server activates with no operation to follow (`paySettled`)
has no operation id to announce, so sibling tabs learn of it only
through their own next read. They cannot double-charge either way: the
server refuses.
- The channel is same-origin script territory like the JWT refresh
channel; a forged notice costs a sibling one `/billing/status` read and
nothing more.

## Blast Radius

Only `billing_web_checkout_ui = full_page`. The embedded views are
untouched. No package code changes. The e2e fixture is unchanged.

## Verification

- `pnpm --filter @comfyorg/billing-web typecheck`: clean.
- `pnpm --filter @comfyorg/billing-web test:unit`: 28 files, 430 tests
pass.
- New `operationChannel.test.ts` (20): over a fake BroadcastChannel, a
sibling on the same uid and workspace hears a notice and the sender does
not; another uid or workspace hears nothing; another workspace's notice,
an unknown kind, a missing id, a string and null are dropped;
unsubscribe and close stop delivery. Over the storage event: each
publish writes a distinct stamped value under the scoped key; a value
another tab wrote is delivered; another key, a removal, unparseable text
and the malformed shapes are dropped; close stops delivery.
- `FullPageCheckoutView.test.ts` (+7): a persisted `pageshow` re-reads
and lands on waiting; a non-persisted one does nothing; the newest of
two overlapping reconciliations wins over a slower older one (no form
mounts); the channel is opened for `uid:workspace` and closed on
unmount; a sibling's nudge re-reads the server and renders what the
server says, not what the notice claimed; this page's own Pay announces
`started` then `settled` once each; an operation it only heard about is
never announced.
- Mutation check, ten mutations, each turned a test red: stale
reconciliation answer accepted, every pageshow re-reading, pageshow
never re-reading, sibling nudge ignored, heard-about operations
announced, settle never announced, channel not closed on unmount,
foreign-workspace notice delivered, malformed notice delivered, storage
notice not stamped.
- `CI=1 pnpm exec playwright test` in `apps/billing-web` (fresh
production build): 45 passed.
- New `full-page-cross-tab.spec.ts`: (ii) two pages in one context on
the same checkout, Pay in A, and B flips to waiting with no Pay and no
interaction, with more `/billing/status` reads than before the click and
exactly one `/billing/subscribe`; (iii) a page on capture whose server
state changes underneath it, then a synthetic persisted `pageshow`,
flips to waiting with no subscribe request.
- `pnpm --filter @comfyorg/billing-web lint`, oxfmt and oxlint on
changed files, `pnpm knip`, and the pre-push `fallow:audit`: clean.

## BE gaps

- Same as PR 3a: no settled-operation lookup, so a sibling that
reconciles after the operation has succeeded and the pointer was cleared
renders capture and sees the server's refusal. The nudge itself is fine;
the read it triggers has nothing to find.

## AS IS / TO BE

Captured from the e2e harness (production build, mocked Cloud, fake
Stripe) at 1512x982 with `full_page` on. Two tabs in one browser context
on the same checkout. AS IS (PR 3a) is the left column staying put after
the other tab paid.

| AS IS: the sibling tab before the other tab's Pay (and, before this
PR, after it too) | TO BE: the sibling tab after the other tab's Pay,
with no interaction |
|---|---|
| ![sibling
before](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/61ef8851dd6e9b429aa03254bf0f380d72eb5b5b/sibling-before.png)
| ![sibling
after](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/61ef8851dd6e9b429aa03254bf0f380d72eb5b5b/sibling-after.png)
|

## Where this sits in the plan

One linear stack on `main`: each PR is based on the one above it in the
table. The former FE-3019/FE-3020 sibling stack now sits on top of
FE-3022.

| Step | PR | Scope |
|---|---|---|
| FE-3067 | #19248
(merged) | flag and variant switch |
| FE-3018 PR 0 |
#19252 | page state
union and pure transition |
| FE-3018 PR 1 |
#19253 | shell,
eyebrow, capture skeleton |
| FE-3018 PR 2a |
#19263 | saved-method
tabs, rail failure taxonomy |
| FE-3018 PR 2b |
#19264 | inline Pay
outcomes, backstop, reactivation |
| FE-3018 PR 3a |
#19268 | mount
reconciliation, placeholders |
| **FE-3018 PR 3b** | **this PR** | **bfcache and cross-tab
re-reconciliation** |
| FE-3021 PR 1 |
#19279 | success,
already completed, in progress, received, unconfirmed |
| FE-3021 PR 2 |
#19280 | refusal, plan
not available, couldn't load |
| FE-3022 | #19285 |
two-phase submit area, 3DS re-open, redirect methods, verification
failed |
| FE-3019 PR 1 |
#19266 | summary
ledger model and builder |
| FE-3019 PR 2 |
#19267 | left-column
ledger rendering |
| FE-3020 1/3 | #19276
| discount rows, fold rule, Subtotal |
| FE-3020 2/3 | #19277
| promo entry state, Pay binding, URL promo |
| FE-3020 3/3 | #19278
| promo entry UI, chips, expired card |

```mermaid
graph LR
  M["main (19248 merged)"] --> N19252["19252 page state"] --> N19253["19253 shell"] --> N19263["19263 rails"] --> N19264["19264 outcomes"] --> N19268["19268 mount reconciliation"] --> N19271["19271 bfcache and cross-tab"] --> N19279["19279 money endings"] --> N19280["19280 refusal screens"] --> N19285["19285 payment authentication"] --> N19266["19266 ledger model"] --> N19267["19267 ledger UI"] --> N19276["19276 discount rows"] --> N19277["19277 promo entry state"] --> N19278["19278 promo entry UI"]
  style N19271 stroke-width:3px
```
dante01yoon added a commit that referenced this pull request Sep 29, 2026
…live operation (#19268)

## Why

FE-3018 (Milestone 3, checkout guidebook 1). The full-page checkout
rendered a fresh payment form on every mount, whatever the workspace was
already waiting on: a reload mid-3DS, a return from a provider page, a
customer coming back after re-auth, or a tab that lost the race to a
sibling all got a form over money in flight. A Pay that collided with
another operation locked Pay forever behind a skeleton. This PR makes
the page re-read the live operation on mount and after a collided Pay,
so one URL carries every re-entry (rules 2, 3, 4, 13, 18, 19). First
half of FE-3018 PR 3, stacked on
#19264.

## Root cause

n/a, feature.

## How

- `CheckoutPage` gains two kinds. `waiting { operation }` is money in
flight that this page did not send; `terminal { operation?, started }`
is a payment that went through, where `started` is whether this page's
own Pay sent it. `resolving` carries an optional `outcome` so a capture
it resolves into opens on the card of a recovered verdict. Capture gains
`attempt: 'idle' | 'sent'`, set by `paySubmitted` and cleared by every
Pay verdict, which is how an operation the lifecycle publishes mid-Pay
is known to be this page's own.
- New events, all pure:
- `reconciled { operation | undefined, outcome? }` is the lifecycle's
answer. Nothing pending releases a Pay held for a re-read and sends a
`waiting` page back to `resolving`. An operation goes through the same
transition as `operationChanged`.
- `operationChanged { operation, outcome? }` follows the operation the
lifecycle publishes. Success lands on `terminal` (attributed only while
`attempt === 'sent'`). In flight past card collection lands on
`waiting`, unless this page sent it, in which case the form stays with
Pay locked (Figma 312-10091 lane 1). Parked at `awaiting_payment_method`
is capture (rule 4, FE-2643: nothing is inferred from `action_url`). A
settled failure becomes the card above Pay, except for this page's own
Pay, whose verdict already knows about re-quotes. A page that was
`waiting` on an operation that parks or fails resolves a fresh capture,
since no form was ever mounted for it.
- `paySettled` covers a plan the server activated with no operation to
follow.
- `useFullPageCheckout`:
- On arrival `lifecycle.recover()` runs in parallel with the
capabilities, quote, saved methods and Stripe key reads. The capture
event is dispatched only after every reconciliation started before it
has answered, so capture never flashes before the server has spoken
(rule 3).
- `reconcile()` is generation-guarded: a run overtaken by a newer one
drops its answer, so re-running it converges (the bfcache and cross-tab
triggers land in PR 3b).
- A `waiting` page that drops back to `resolving` re-reads its capture
(quote, saved methods) rather than reusing state from before the
operation.
- `checkout.operation` is watched into `operationChanged`, with
`operationOutcomeOf` (extracted from `payVerdictOf`) supplying the
verdict. `timed_out` and `superseded` yield no card (rule 12).
- The backstop: `OPERATION_ALREADY_PENDING`, `CONFLICT` and `timed_out`
dispatch `payRejectedAsPending` and then `reconcile()`. The form stays
mounted with Pay locked until the re-read lands on `waiting`,
`terminal`, or frees Pay with typed details intact.
- A recovery the lifecycle refuses is an unknown, not "nothing pending":
in `resolving` it reads as the coded outage; elsewhere the page keeps
what it has.
- `canPay` no longer locks on any tracked operation, only on one in
flight, so a parked operation's Pay resubmits it (the lifecycle's
`resubmitTarget` path).
- `CheckoutWaitingColumn` is the payment column while waiting: a
`role="status"` polite line "Finishing your payment…", a body line, and
the capture skeleton bars. The summary column stays live. FE-3022
replaces it.
- `CheckoutTerminalCard` is the centred card: "You're all set" naming
the plan and workspace when this page sent the Pay, "Already completed"
naming the workspace and the operation reference when it did not
(attribution, rule 19). The workspace name comes from the session
credential. FE-3021 replaces it.
- The reducer is split into `reduceRail`, `reduceAttempt` and the
page-level switch behind two `Object.hasOwn` type guards, to stay under
the fallow cyclomatic gate.

## Tradeoffs

- A server-pending operation is adopted before its `phase` is known (the
status response carries only the id and continuation), so a parked
operation shows the waiting column for one poll round trip before it
resolves to capture. Treating an unknown phase as in flight is the safe
side: a form over money in flight is the failure this PR exists to
prevent.
- A recovery refusal outside `resolving` leaves the page as it was, so a
collided Pay whose re-read fails stays locked until the customer
reloads. A stuck lock beats a second charge.
- The auth-expiry path adds no UI: `App.vue` already sends a refused
session to `/sign-in?returnTo=`, and the remount reconciles. The e2e
proves it for both outcomes.

## Blast Radius

Only `billing_web_checkout_ui = full_page`. The embedded
`CheckoutView.vue`, `ResultView.vue` and `CheckoutPayment.vue` are
untouched. No package code changes. The fake billing client's `recover`
becomes a `Mock` so a test can script it.

## Verification

- `pnpm --filter @comfyorg/billing-web typecheck`: clean.
- `pnpm --filter @comfyorg/billing-web test:unit`: 27 files, 403 tests
pass.
- `checkoutPage.test.ts`: a 24-row reconciliation table (recovery
outcomes to page kind, parked to capture, waiting following its
operation to terminal / card / parked / vanished, attribution from this
page's Pay, terminal sticky against later re-reads), refused/unavailable
left alone, and `isParked`.
- `payVerdict.test.ts`: `operationOutcomeOf` table, including
`timed_out` and `superseded` yielding no card.
- `FullPageCheckoutView.test.ts`: skeleton held until reconciliation
answers with the quote already in hand (no form mounts); reload with
money in flight renders waiting with no form and follows it to Already
completed with the reference and no plan; invoice and in-progress phases
wait; parked renders capture with Pay live and Pay subscribes; a
recovered decline opens capture on its card with the operation id in the
support link; a settled payment lands on Already completed; a waited
operation that declines resolves a fresh capture on its card; a failed
recovery says so; the backstop for `OPERATION_ALREADY_PENDING` (waiting)
and `CONFLICT` (Already completed) with no decline, no support link,
`recover` called twice and the form mounted once; a collision that
re-reads as nothing frees Pay with the form still mounted; this page's
own success names the plan and workspace; a plan activated with no
operation lands on the terminal.
- Mutation check, each turned a test red (driver in the scratchpad, ten
mutations): capture rendered before reconciliation answers, parked
treated as in flight, success never attributed, collided Pay not
re-read, nothing pending not freeing a held Pay, waiting ignoring its
operation settling, form remounted during a re-read, recovery failure
read as nothing pending, and a recovered failure losing its card. The
stale-generation mutation survives here because nothing in 3a triggers
two overlapping reconciliations; PR 3b's pageshow test covers it.
- `CI=1 pnpm exec playwright test` in `apps/billing-web` (fresh
production build): 43 passed.
- New `full-page-reconciliation.spec.ts`: (i) reload with
`pending_billing_op_id` renders waiting with the eyebrow, no Pay, same
URL, then Already completed with the reference once the operation polls
as succeeded, no `/billing/subscribe`; parked `awaiting_payment_method`
renders capture and Pay resubmits; (iv) a Pay refused for an operation
the status starts reporting pending lands on waiting with no decline and
no subscribe request; a `409 CONFLICT` subscribe lands on Already
completed once the re-read finds the payment settled; auth expiry
mid-checkout (401 on the reads and the mint after Pay) goes to
`/sign-in?returnTo=<the same /v1/checkout URL>`, and Retry session comes
back to that URL reconciling into waiting (pending op) or capture (none)
with no charge.
- The PR 2 "collided Pay keeps Pay locked" spec is replaced by (iv),
since a pending operation on mount now lands on waiting rather than
capture.
- `pnpm --filter @comfyorg/billing-web lint`, oxfmt and oxlint on
changed files, `pnpm knip`, and the pre-push `fallow:audit`: clean.

## BE gaps

- No lookup for a settled operation. `/billing/status` names
`pending_billing_op_id` only while pending, and the tab-local pointer is
cleared on success, so a reload after a success finds nothing and
renders capture; the server's preview or subscribe refusal is then shown
as today. This PR deliberately does not compare `/billing/status`
`plan_slug` with the entry plan to fake "Already completed": that would
be frontend assembly of server state and mis-fires for a customer who
already had the plan.
- The status response carries no `phase` for the pending operation, so
the first render of a parked operation is the waiting column until `GET
/billing/ops/{id}` answers.
- The operation carries no plan, kind, amount or workspace
(`billingContracts.ts`), so a recovered terminal names the workspace
from the session credential and the plan only when this page sent the
Pay.

## AS IS / TO BE

Captured from the e2e harness (production build, mocked Cloud, fake
Stripe) at 1512x982 with `full_page` on. AS IS is the base branch, where
every one of these mounts rendered the capture form (the first
screenshot in #19253
is that form).

| TO BE: reload while a payment is in flight (waiting, no form, summary
live) | TO BE: the operation settles, found on the server, unattributed
(reference, no plan) |
|---|---|
|
![waiting](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/61ef8851dd6e9b429aa03254bf0f380d72eb5b5b/to-be-waiting.png)
| ![already
completed](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/61ef8851dd6e9b429aa03254bf0f380d72eb5b5b/to-be-already-completed.png)
|

| TO BE: this page's own Pay goes through (plan and workspace named) |
|---|
|
![success](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/61ef8851dd6e9b429aa03254bf0f380d72eb5b5b/to-be-success.png)
|

## Where this sits in the plan

One linear stack on `main`: each PR is based on the one above it in the
table. The former FE-3019/FE-3020 sibling stack now sits on top of
FE-3022.

| Step | PR | Scope |
|---|---|---|
| FE-3067 | #19248
(merged) | flag and variant switch |
| FE-3018 PR 0 |
#19252 | page state
union and pure transition |
| FE-3018 PR 1 |
#19253 | shell,
eyebrow, capture skeleton |
| FE-3018 PR 2a |
#19263 | saved-method
tabs, rail failure taxonomy |
| FE-3018 PR 2b |
#19264 | inline Pay
outcomes, backstop, reactivation |
| **FE-3018 PR 3a** | **this PR** | **mount reconciliation,
placeholders** |
| FE-3018 PR 3b |
#19271 | bfcache and
cross-tab re-reconciliation |
| FE-3021 PR 1 |
#19279 | success,
already completed, in progress, received, unconfirmed |
| FE-3021 PR 2 |
#19280 | refusal, plan
not available, couldn't load |
| FE-3022 | #19285 |
two-phase submit area, 3DS re-open, redirect methods, verification
failed |
| FE-3019 PR 1 |
#19266 | summary
ledger model and builder |
| FE-3019 PR 2 |
#19267 | left-column
ledger rendering |
| FE-3020 1/3 | #19276
| discount rows, fold rule, Subtotal |
| FE-3020 2/3 | #19277
| promo entry state, Pay binding, URL promo |
| FE-3020 3/3 | #19278
| promo entry UI, chips, expired card |

```mermaid
graph LR
  M["main (19248 merged)"] --> N19252["19252 page state"] --> N19253["19253 shell"] --> N19263["19263 rails"] --> N19264["19264 outcomes"] --> N19268["19268 mount reconciliation"] --> N19271["19271 bfcache and cross-tab"] --> N19279["19279 money endings"] --> N19280["19280 refusal screens"] --> N19285["19285 payment authentication"] --> N19266["19266 ledger model"] --> N19267["19267 ledger UI"] --> N19276["19276 discount rows"] --> N19277["19277 promo entry state"] --> N19278["19278 promo entry UI"]
  style N19268 stroke-width:3px
```
dante01yoon added a commit that referenced this pull request Sep 29, 2026
… and reactivation on the full-page checkout (#19264)

## Why

FE-3018 (Milestone 3, checkout guidebook 1). On the full-page checkout a
Pay that failed showed nothing and left Pay locked, a Pay that collided
with another operation would have read as a failure, and a cancelled
subscriber could not confirm the reactivation charge. This PR adds the
inline outcome cards from Figma 345-14026 / 314-10555, the race backstop
from the rule set, and the reactivation confirm the embedded view
already has. Second half of FE-3018 PR 2, stacked on
#19263.

## Root cause

n/a, feature.

## How

- The `CheckoutPage` capture state gains `reactivation: 'not_required' |
'required' | 'invalid' | 'confirmed'` and an optional `outcome`:
`declined` (with the decline reason and operation id),
`processing_error`, `not_completed`, `price_updated`, or `reconciling`.
New events: `paySubmitted`, `payFailed`, `payRejectedAsPending`,
`requoted`, `reactivationConfirmed`, `consentMissing`.
- Rules in the reducer:
  - `paySubmitted` clears the card; the card otherwise persists.
- `payFailed` sets the card and never touches the rail, so the Stripe
element is not remounted and typed details survive. Pay stays "Pay and
subscribe".
- `reconciling` locks Pay, and every later Pay-side event is ignored
until PR 3 re-reads the operation.
- Pay stays live over an unticked keep-subscription consent.
`consentMissing` (Pay clicked without the tick) marks it `invalid`;
ticking clears it; a re-quote resets the tick, as the embedded view does
on each new preview.
- `payVerdictOf` (pure) maps a `SubscriptionCommandResult` to what the
page does:
- A settled operation goes through `projectPaymentStep` (account-core).
`declined` with reason `authentication_failed` is Payment not completed
(one card for a 3DS refusal and a redirect back-out, D1), other
`declined` keeps its reason, `processing_error` (including
`reconciliation_needed`) is the processing card. Nothing is derived from
`action_url`.
- `timed_out` (an unknown outcome, rule 12), `OPERATION_ALREADY_PENDING`
and `CONFLICT` become `reconciling`, never a decline (rule 18).
- `serverCode` `PRORATION_QUOTE_EXPIRED` or `SUBSCRIPTION_QUOTE_STALE`
(checked through `matchesServerCode`, before `CONFLICT`) re-quotes and
shows "The price has updated".
- `REACTIVATION_CONFIRMATION_REQUIRED` re-quotes and asks, as
`CheckoutView.vue` does.
  - Any other code keeps PR 1's coded failure line.
- After a card outcome the composable calls `checkout.reset()` so the
failed operation stops locking Pay.
- Keep-subscription consent (Figma 553-9297) replaces the embedded
reactivation copy. It is asked when the quote says
`requires_reactivation_confirmation` or the server answers
`REACTIVATION_CONFIRMATION_REQUIRED` (server-driven, never derived
here). `KeepSubscriptionNotice` is a notice card above Pay with a native
checkbox styled as the shadcn one: title "Your plan was set to end on
{date}" (the date is `cancel_at` from `/billing/status`, read only once
a quote asks), body from `checkout/keepSubscription.ts` by change type
(upgrade, downgrade, monthly to yearly, yearly to monthly, team
commitment, else a neutral line) with the amount and date the quote
reports for the renewal, never computed here. Pay without the tick
submits nothing (the click is intercepted in `CheckoutPayAction`, and
`pay()` refuses a token the form hands over), puts the checkbox in its
Invalid state (`aria-invalid`, red line "Check the box to keep your
subscription, then pay." wired by `aria-describedby`) and focuses it.
With the tick, Pay sends `confirm_reactivation: true` through the shared
`buildSubscribeRequest`.
- `InlineOutcomeCard` is the shared notice style: `rounded-lg p-4
bg-tertiary-background`, 8px gap, `circle-alert` in
`text-warning-background`, medium title, every line 14/20, and for a
decline the mapped line "Reported issue: {reason}". It is
`role="alert"`, and it scrolls into view and takes focus when it mounts.
- A ghost "Contact support" sits under Pay only alongside a card that
carries a failed operation (declined, processing, not completed); a
notice over a fresh price never gets one. It is a
`mailto:support@comfy.org` whose body names the operation id and the
decline code.
- Design review (Alex 2026-09-28): keep-subscription checkbox replaces
the reactivation confirm (Pay live, Invalid state on a click without the
tick); notice card style (`tertiary-background`, medium title, 14/20,
`rounded-lg`); no Contact support under the price-updated card; D1
"Payment not completed" replaces "Payment not verified". Screenshots
below recaptured.
- `reconciling` renders the payment-column skeleton with Pay disabled;
PR 3 replaces it with the reconciled state.
- `pay` is split into `requestFor` and `settle` to stay under the fallow
complexity gate.

## Tradeoffs

- The decline reason line uses new billing-web strings keyed by
`PaymentReasonKey` (the account-core type), because the core's default
copy is full sentences ("Your bank reported insufficient funds.") and
Figma wants a short label after "Reported issue:".
- No support-link builder existed that carries an operation id
(`CheckoutSteps` uses a bare `mailto:`), so `supportLinkFor` is new and
local.
- A server 409 with no known code is treated as a collision
(reconciling), not a decline. If the server ever uses 409 for a genuine
refusal, the customer sees the skeleton until PR 3 reconciles instead of
a coded line.
- Promo expired is left to FE-3020.

## Blast Radius

Only `billing_web_checkout_ui = full_page`. The embedded
`CheckoutView.vue`, `CheckoutPayment.vue` and `CheckoutSubmit.vue` are
untouched. No package code changes.

## Verification

- `pnpm --filter @comfyorg/billing-web typecheck`: clean.
- `pnpm --filter @comfyorg/billing-web test:unit`: 27 files, 353 tests
pass.
- `payVerdict.test.ts` tables 13 SDK results to their verdicts, plus the
support link.
- `checkoutPage.test.ts` adds the post-Pay table, a rail-identity check
on decline, and a reconciliation-hold table.
- `FullPageCheckoutView.test.ts` adds decline (card, reason, focus,
support link with op id and code, form mounted once, cleared on the next
Pay), verification and processing cards, both backstop codes (no card,
Pay locked), quote expired, and reactivation from the quote and from the
server.
- Mutation check, each turned a test red: remounting the element on
decline, keeping the card on the next Pay, not locking Pay while
reconciling, not holding reconciliation against later events, not
locking on an unticked reactivation, rendering `CONFLICT` as a decline,
reading a failed verification as a decline, not re-pricing a stale
quote, not dismissing the failed operation, not sending
`confirm_reactivation`, dropping the op id from the support link, and
not focusing the card.
- `CI=1 pnpm exec playwright test` in `apps/billing-web` (fresh
production build): 38 passed.
- New: a declined subscribe (`decline_reason: insufficient_funds`) shows
the card and reason, Pay "Pay and subscribe" enabled, and Contact
support carrying `op_subscribe` and the code.
- New: a `pending_billing_op_id` already on `/billing/status` makes the
lifecycle refuse with `OPERATION_ALREADY_PENDING`; no decline card, no
support link, Pay disabled, and no `/billing/subscribe` request.
- `pnpm --filter @comfyorg/billing-web lint`, oxfmt and oxlint on
changed files, `pnpm knip`, and the pre-push `fallow:audit`: clean.
- After the design review: `keepSubscription.test.ts` tables the body
per change type and the undated title; `KeepSubscriptionNotice.test.ts`
covers the three states, the focus hand-off on Invalid and the emits;
the reducer table has the consent rows (Pay live while asked,
`consentMissing` marks invalid, tick clears, untick re-asks, re-quote
re-asks, consent nobody asked for); `FullPageCheckoutView.test.ts`
drives Pay without the tick (no subscribe, `aria-invalid`, focus,
described-by), then with it (`confirm_reactivation: true`), a token
handed over without the tick, and the server re-ask with Pay live.
`full-page-checkout.spec.ts` adds 553-9297 end to end: Pay without the
tick sends no `/billing/subscribe` and marks the box invalid, the tick
sends `confirm_reactivation`. 390 unit tests and the checkout spec pass
at this head.

## BE gaps / design questions

- BE gap: the quote-expired refusals (`PRORATION_QUOTE_EXPIRED`,
`SUBSCRIPTION_QUOTE_STALE`) have no coded SDK result; they are matched
by `serverCode`. Their HTTP status is not in the contract.
- Design D1 (decided 2026-09-28): one "Payment not completed" card for
3DS and redirect back-outs, Figma 340-13834.
- Design (decided 2026-09-28): no Contact support under the
price-updated card; the rule wins and the frame was updated.
- Design question: two keep-subscription strings are not in DES-1209's
2026-09-28 copy. `titleUndated` "Your plan was set to end" renders while
`/billing/status` has not yet answered with `cancel_at`, and
`body.other` "This change keeps your subscription, and it renews that
day at {amount}." covers a `new_subscription` quote that still asks for
consent. Both are placeholders pending design copy; the five DES-1209
bodies and the dated title are verbatim.

## AS IS / TO BE

Captured from the e2e harness (production build, mocked Cloud, fake
Stripe) at 1512x982 with `full_page` on. The fake Stripe mounts no real
element, so the card and address areas are empty. AS IS is the base
branch (PR 1).

| AS IS: a declined Pay shows nothing and leaves Pay locked | TO BE:
declined card with reason, Pay unchanged, Contact support |
|---|---|
| ![as-is
declined](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/953336921094b4405b411f4b358e27f257eed54a/as-is-declined.png)
|
![declined](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/a99e3ed2b9e4b36f9b305b9ec920ce0aac189086/to-be-outcome-declined.png)
|

| TO BE: processing error | TO BE: Payment not completed (340-13834) |
|---|---|
| ![processing
error](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/a99e3ed2b9e4b36f9b305b9ec920ce0aac189086/to-be-outcome-processing-error.png)
| ![not
completed](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/a99e3ed2b9e4b36f9b305b9ec920ce0aac189086/to-be-outcome-not-completed.png)
|

| TO BE: keep subscription, asked (553-9297) | TO BE: Pay clicked
without the tick | TO BE: ticked |
|---|---|---|
| ![keep
subscription](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/a99e3ed2b9e4b36f9b305b9ec920ce0aac189086/to-be-keep-subscription-default.png)
|
![invalid](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/a99e3ed2b9e4b36f9b305b9ec920ce0aac189086/to-be-keep-subscription-invalid.png)
|
![ticked](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/a99e3ed2b9e4b36f9b305b9ec920ce0aac189086/to-be-keep-subscription-ticked.png)
|

## Where this sits in the plan

One linear stack on `main`: each PR is based on the one above it in the
table. The former FE-3019/FE-3020 sibling stack now sits on top of
FE-3022.

| Step | PR | Scope |
|---|---|---|
| FE-3067 | #19248
(merged) | flag and variant switch |
| FE-3018 PR 0 |
#19252 | page state
union and pure transition |
| FE-3018 PR 1 |
#19253 | shell,
eyebrow, capture skeleton |
| FE-3018 PR 2a |
#19263 | saved-method
tabs, rail failure taxonomy |
| **FE-3018 PR 2b** | **this PR** | **inline Pay outcomes, backstop,
reactivation** |
| FE-3018 PR 3a |
#19268 | mount
reconciliation, placeholders |
| FE-3018 PR 3b |
#19271 | bfcache and
cross-tab re-reconciliation |
| FE-3021 PR 1 |
#19279 | success,
already completed, in progress, received, unconfirmed |
| FE-3021 PR 2 |
#19280 | refusal, plan
not available, couldn't load |
| FE-3022 | #19285 |
two-phase submit area, 3DS re-open, redirect methods, verification
failed |
| FE-3019 PR 1 |
#19266 | summary
ledger model and builder |
| FE-3019 PR 2 |
#19267 | left-column
ledger rendering |
| FE-3020 1/3 | #19276
| discount rows, fold rule, Subtotal |
| FE-3020 2/3 | #19277
| promo entry state, Pay binding, URL promo |
| FE-3020 3/3 | #19278
| promo entry UI, chips, expired card |

```mermaid
graph LR
  M["main (19248 merged)"] --> N19252["19252 page state"] --> N19253["19253 shell"] --> N19263["19263 rails"] --> N19264["19264 outcomes"] --> N19268["19268 mount reconciliation"] --> N19271["19271 bfcache and cross-tab"] --> N19279["19279 money endings"] --> N19280["19280 refusal screens"] --> N19285["19285 payment authentication"] --> N19266["19266 ledger model"] --> N19267["19267 ledger UI"] --> N19276["19276 discount rows"] --> N19277["19277 promo entry state"] --> N19278["19278 promo entry UI"]
  style N19264 stroke-width:3px
```
dante01yoon added a commit that referenced this pull request Sep 29, 2026
…s on the full-page checkout (#19263)

## Why

FE-3018 (Milestone 3, checkout guidebook 1). With
`billing_web_checkout_ui = full_page`, a customer with a card on file
still had to type a new one, and a failed saved-methods read or a failed
Stripe element either went unnoticed or took the whole payment column.
This PR adds the Saved / Add new payment tabs from Figma 187-8080 and
the in-place failure taxonomy from 360-4874, 368-15319 and 368-15401. It
is the first half of FE-3018 PR 2; the inline Pay outcomes follow in the
PR stacked on this one.

## Root cause

n/a, feature.

## How

- The `CheckoutPage` union from PR 0 grows instead of gaining a parallel
state. A new-subscription rail is now `{ element, saved, tab }`, with
`saved` one of `loading | ready | none | failed`. New events:
`savedLoaded(count)`, `savedFailed`, `savedRetried`, `tabSelected`.
- The rules live in `reduceCheckoutPage` and the pure `railView`:
- The first saved read picks the tab: Saved when the tab row shows at
all (methods on file, or the read failed), Add new otherwise.
- No event other than `tabSelected` changes the tab. A re-read that
finds nothing hides the tab row, which leaves Add new.
- Element failed with no saved methods, or with the saved read also
failed: the whole-column error (360-4874 / both rails down).
- Element failed beside saved methods: the error sits in the Add new tab
and Saved stays payable (368-15319).
- Saved read failed: the error sits on the Saved tab with its own copy,
and Add new stays live (368-15401).
- `useFullPageCheckout` reads the saved methods (`usePaymentMethods`) in
parallel with the capabilities, the quote and the Stripe key, so capture
never renders a half-known rail. Try again re-reads the list, remounts
the element, or both from the whole-column error.
- Pay on the Saved tab sends `saved_payment_method_id` (default method,
else the first, else the customer's pick).
`SubscribeRequest.saved_payment_method_id` is in the generated contract
and account-core already validates it; it was only unwired in
billing-web. A plan change still charges the method on file with no id,
matching `subscribeAcceptsSavedMethod` in the cloud app.
- The Stripe form stays mounted under `v-show` while the Saved tab is
open, so switching tabs never loses typed card details.
- `PaymentFormError` uses the shared notice style from the design
review: `bg-tertiary-background`, `rounded-lg p-4`, 8px gap, title
medium, every line 14/20.
- Design review (Alex 2026-09-28): notice card style applied to the
three rail-failure cards; screenshots below recaptured.
- Reuse: `CheckoutSavedMethods` (now exported from
`@comfyorg/account-ui/billing/checkout`, one line) for the single row
and the multi-method picker, and `usePaymentMethods`. New:
`PaymentMethodTabs`, `PaymentTabsRail`, `SavedMethodPanel`;
`PaymentFormError` takes a `rail` variant for the three copies.
- Rebased onto main: the account-ui `@source` styles commit is dropped
because main's `styles.css` already covers it.

## Tradeoffs

- The saved read joins the initial `Promise.all`, so capture waits for
max(quote, saved methods) rather than showing a tab row that could flip
under the customer. Both are fast reads; the alternative was an
auto-switch, which the rule set forbids.
- The Saved tab shows no billing address card (see BE gaps). The address
element is part of the Stripe form, so it is visible only on Add new.
- In the tabbed layout the Stripe form keeps its "Choose how you would
like to pay." subtitle under the tab row; its "Payment method" heading
is blanked so the label is not doubled.
- `CheckoutSavedMethods` is reused as-is, so the single-method row keeps
its "Change" link (it selects Add new) and a "Saved payment method"
label that Figma does not draw.

## Blast Radius

Only `billing_web_checkout_ui = full_page`, which Cloud serves per
account (cloud PR 10904, merged). `CheckoutView.vue` (embedded M2) is
untouched; `buildSubscribeRequest` gained an optional
`savedPaymentMethodId` that the embedded view never passes. account-ui
gains one export. The new `@source` adds CSS rules only for class names
that appear in the account-ui checkout components; an embedded-view
element using one of those names would pick up its intended style. The
full e2e suite, including the embedded checkout specs, passes.

## Verification

- `pnpm --filter @comfyorg/billing-web typecheck`: clean.
- `pnpm --filter @comfyorg/billing-web test:unit`: 26 files, 312 tests
pass. `checkoutPage.test.ts` tables every event sequence, every ignored
transition, and a no-auto-switch table over (tab x element/saved event);
`railView` has one row per taxonomy frame.
`FullPageCheckoutView.test.ts` adds 6 component cases (default method
charged without a token, single row vs picker, form mounted once across
tab switches, 368-15401 retry, 368-15319, both rails down).
- Mutation check, each turned a test red: allowing a Saved tab with
nothing saved, auto-switching on element or saved failure, landing a
failed first read on Add new, dropping or widening the whole-column
rule, letting Pay on Saved ignore the list, not sending the saved id,
`v-if` instead of `v-show` on the Stripe form, and a column retry that
skips the saved read.
- `CI=1 pnpm exec playwright test` in `apps/billing-web` (fresh
production build): 36 passed on this branch.
`full-page-checkout.spec.ts` covers the saved-method subscribe body,
360-4874, 368-15319 (fake Stripe `loaderror` with a card on file) and
368-15401 (`GET /billing/payment-methods` 500, then Try again).
`checkout-ui.spec.ts` still covers flag off and fallback.
- `pnpm --filter @comfyorg/billing-web lint`, oxfmt and oxlint on
changed files, `pnpm knip`, and the pre-push `fallow:audit`: clean.

## BE gaps / design questions

- BE gap: `SavedPaymentMethod` carries no billing address
(`types.gen.ts` `SavedPaymentMethod` is `{ id, type, is_default, brand?,
last4? }`), so the Figma "John Doe / 000 Name St." card with its
"Update" action is not rendered. Nothing is fabricated.
- Design: the 368-15319 body copy ("…or pay with a saved payment
method.") is taken from Figma; DES-1088 quotes only the 360 copy.
- Design: brands render as the API sends them (`visa •••• 4242`), the
existing shared component's behavior.

## AS IS / TO BE

Captured from the e2e harness (production build, mocked Cloud, fake
Stripe) at 1512x982 with `full_page` on. The fake Stripe mounts no real
element, so the card and address areas are empty. AS IS is the base
branch (PR 1).

| AS IS: a card on file, PR 1 shows only the card form | TO BE: Saved
tab, picker for two methods (187-8080) |
|---|---|
| ![as-is card on
file](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/953336921094b4405b411f4b358e27f257eed54a/as-is-card-on-file.png)
| ![saved
tabs](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/953336921094b4405b411f4b358e27f257eed54a/to-be-saved-tabs.png)
|

| TO BE: Add new payment tab | TO BE: element failed, no saved method
(360-4874) |
|---|---|
| ![add new
tab](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/953336921094b4405b411f4b358e27f257eed54a/to-be-add-new-tab.png)
|
![360](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/66b180feaf5f6af7666a58374ecfca368c478cce/to-be-360-element-failed.png)
|

| TO BE: element failed beside saved methods (368-15319) | TO BE:
saved-methods read failed (368-15401) |
|---|---|
|
![368-15319](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/66b180feaf5f6af7666a58374ecfca368c478cce/to-be-368-15319-element-failed-saved.png)
|
![368-15401](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/66b180feaf5f6af7666a58374ecfca368c478cce/to-be-368-15401-saved-failed.png)
|

## Where this sits in the plan

One linear stack on `main`: each PR is based on the one above it in the
table. The former FE-3019/FE-3020 sibling stack now sits on top of
FE-3022.

| Step | PR | Scope |
|---|---|---|
| FE-3067 | #19248
(merged) | flag and variant switch |
| FE-3018 PR 0 |
#19252 | page state
union and pure transition |
| FE-3018 PR 1 |
#19253 | shell,
eyebrow, capture skeleton |
| **FE-3018 PR 2a** | **this PR** | **saved-method tabs, rail failure
taxonomy** |
| FE-3018 PR 2b |
#19264 | inline Pay
outcomes, backstop, reactivation |
| FE-3018 PR 3a |
#19268 | mount
reconciliation, placeholders |
| FE-3018 PR 3b |
#19271 | bfcache and
cross-tab re-reconciliation |
| FE-3021 PR 1 |
#19279 | success,
already completed, in progress, received, unconfirmed |
| FE-3021 PR 2 |
#19280 | refusal, plan
not available, couldn't load |
| FE-3022 | #19285 |
two-phase submit area, 3DS re-open, redirect methods, verification
failed |
| FE-3019 PR 1 |
#19266 | summary
ledger model and builder |
| FE-3019 PR 2 |
#19267 | left-column
ledger rendering |
| FE-3020 1/3 | #19276
| discount rows, fold rule, Subtotal |
| FE-3020 2/3 | #19277
| promo entry state, Pay binding, URL promo |
| FE-3020 3/3 | #19278
| promo entry UI, chips, expired card |

```mermaid
graph LR
  M["main (19248 merged)"] --> N19252["19252 page state"] --> N19253["19253 shell"] --> N19263["19263 rails"] --> N19264["19264 outcomes"] --> N19268["19268 mount reconciliation"] --> N19271["19271 bfcache and cross-tab"] --> N19279["19279 money endings"] --> N19280["19280 refusal screens"] --> N19285["19285 payment authentication"] --> N19266["19266 ledger model"] --> N19267["19267 ledger UI"] --> N19276["19276 discount rows"] --> N19277["19277 promo entry state"] --> N19278["19278 promo entry UI"]
  style N19263 stroke-width:3px
```
dante01yoon added a commit that referenced this pull request Sep 29, 2026
…d payment column layout per M3 design review (#19374)

## Summary

Follow-up to design review on #19253. Brings the full-page checkout's
summary ledger and payment column in line with Alex's M3 review (FE-3019
"Added 2026-09-28", DES-1210).

## Why

The review found three places where the build does not match Figma, and
one behavior bug. When a team lowers its commitment, the summary said
"You'll keep Team until July 28". It did not say which commitment runs
until then, because every commitment has the same tier name.

## Root cause

- The scheduled family's trailing line named the kept plan by tier only.
For a team-to-team change, the tier is the same on both sides, so the
line could not tell commitments apart.
- Held and promo discount amounts used the foreground color. Figma mutes
every negative amount (305-9069).
- The saved method used the shared embedded-checkout row: a "Saved
payment method" caption, `visa •••• 4242`, and a Change link. The
full-page design uses a filled picker row with a card icon, `Visa ··
4242`, and a chevron (180-6640). Add new already has its own tab, so the
Change link duplicated it.
- `StripePaymentForm` always drew its own semibold heading and
method-choice subtitle. On the tabbed rail it drew an empty heading with
the subtitle still showing. Figma wants "Payment method" and "Billing
address" in Regular 16, 12px above what they label, with no subtitle
(180-6630).

## How

- `summaryLedger.ts`: on a team commit change, the kept-plan line reads
"You'll keep Team at $1,400.00 /mo until July 28, 2026". The rate is
`current_plan.seat_summary.total_cost_cents`, formatted and not
computed.
- `CheckoutLedger.vue`: adjustment and promo amounts use
`text-muted-foreground`.
- New `SavedMethodSelect.vue` (billing-web only): a Reka select whose
trigger is the Figma row. The brand is capitalized in CSS, and `··
{last4}` is muted. Alipay shows a wallet icon and its name.
`SavedMethodPanel` drops the shared `CheckoutSavedMethods` and its
Change and Add new affordances.
- `StripePaymentForm` gets an opt-in `pageLayout` prop. With it, the
form drops its heading and subtitle, names its group with `aria-label`,
and sets the Billing address label in Regular 16. The prop defaults to
off, so the core app's embedded checkout does not change. billing-web
renders one "Payment method" label above the tabs and the form, with a
12px gap.

| Alex's item | Status | Commit |
| --- | --- | --- |
| Strikethrough only on a discounted plan's compare price; promo and
held rows show "−$X" and are never struck through | Already correct for
promo and held rows: they render `−$X` and nothing is struck through.
The compare price is a BE gap, see below | none |
| Subtotal only when a discount follows 2 or more price rows | Already
correct: Subtotal never renders. Today's ledger has at most one money
row, and the quote reports no subtotal. BE gap, see below | none |
| Bug 8 (#19266): lowering a team commitment doesn't say which
commitment is kept | Fixed | 9ad5045 (test), b86190c |
| Discount amounts muted (305-9069) | Fixed | 4d159c7 |
| Saved card as a filled row with a card icon, `Visa ·· 4242`, and a
chevron (180-6640) | Fixed | c158118 (test), daaaf30 |
| "Payment method" / "Billing address" in Regular 16, 12px gap, no
subtitle (180-6630) | Fixed | 90cdb8a (test), 1a08061, daaaf30
|

### BE gaps (not computed on the frontend)

- **Compare price.** The strikethrough compare price on a discounted
rate ("$630 ~~$700~~ /mo × 12 months") needs a server-reported
per-period list price and discounted price. `PreviewSubscribeResponse`
has only `price_cents` and a `plan` discount with no per-period figures.
Deriving $630 as 756000 / 12 would be client money arithmetic, so the
annual subline stays "Billed yearly".
- **Subtotal.** `PreviewSubscribeResponse` has no pre-discount subtotal
field. The `subtotal` ledger slot stays unpopulated until the server
reports one. It can only qualify once the quote itemizes proration into
two rows.

## Review Focus

- The saved method is now always a picker, including when there is only
one method. Figma shows the chevron on a single Visa, so a one-item list
opens. Alex should confirm this over a static row.
- The kept-commitment copy ("at $1,400.00 /mo") is new. FE-3019 and
FE-2856 have no copy for it, so it needs Alex's sign-off. Team commit
proration copy is still held until Wei answers (DES-1210).

## Plan position

| PR | Scope |
| --- | --- |
| #19253 | M3 full-page checkout shell (base) |
| FE-3018 follow-up | entry and keep-subscription |
| **this PR (FE-3019)** | **summary and payment column layout** |
| FE-3020 follow-up | promo |
| FE-3021 follow-up | endings |
| FE-3022 follow-up | payment auth |

```mermaid
graph LR
  base["#19253 shell"] --> a["FE-3018 entry"]
  base --> b["FE-3019 summary + payment column"]
  base --> c["FE-3020 promo"]
  base --> d["FE-3021 endings"]
  base --> e["FE-3022 payment auth"]
  style b fill:#f5c518,color:#000
```

## Verification

- billing-web: vitest (729 passed), `typecheck:billing-web`, lint, and
Playwright. The full suite ran 66 of 68 green. The other 2 lost their
preview server partway through the run (a refused connection on :4174)
and passed when `full-page-checkout.spec.ts` was rerun (7/7).
- account-ui: vitest (215 passed) and `typecheck:account-ui`.
- Root: `pnpm typecheck` and `pnpm knip` are clean. The fallow audit
shows advisory token-drift warnings only.

## Screenshots

All images are from the **fixture build**: the billing-web Playwright
fixtures (`apps/billing-web/e2e/fixtures`, mocked Cloud and a fake
Stripe.js), production `vite build`, dark theme, 1280px wide unless the
row says phone. AS IS is the base
`jaewon/fe-3018-full-page-checkout-shell` @ `2c0d3a1381`; TO BE is this
PR @ `daaaf30e2f`. None are from a real backend.

| Item | AS IS | TO BE |
| --- | --- | --- |
| Bug 8: lowered team commitment names the kept commitment by its rate |
<img width="420" alt="lowered-team-commitment AS IS"
src="https://github.com/user-attachments/assets/d179d3d3-8eff-439a-a6ff-d1ec91b18192"
/> | <img width="420" alt="lowered-team-commitment TO BE"
src="https://github.com/user-attachments/assets/90d25983-3480-4f3e-a8d7-63430fe32e5d"
/> |
| Discount amounts muted (305-9069) | <img width="420"
alt="discount-rows AS IS"
src="https://github.com/user-attachments/assets/7afe5971-7195-4bdf-b5a0-1687d7bcf9d9"
/> | <img width="420" alt="discount-rows TO BE"
src="https://github.com/user-attachments/assets/656d705e-a640-4b2b-9e4b-28b6620f26bf"
/> |
| Saved card as a picker row, `Visa ·· 4242`, chevron (180-6640) | <img
width="420" alt="saved-card AS IS"
src="https://github.com/user-attachments/assets/1e4b8aed-0f87-404c-bf69-0cdc95a4433d"
/> | <img width="420" alt="saved-card TO BE"
src="https://github.com/user-attachments/assets/d780d148-b44e-4262-b4a6-e63f86c13fa5"
/> |
| "Payment method" / "Billing address" labels, Regular 16, no subtitle
(180-6630), Add new payment tab | <img width="420" alt="payment-labels
AS IS"
src="https://github.com/user-attachments/assets/2b215d06-28b7-4b3e-8bc4-c9ce947c55be"
/> | <img width="420" alt="payment-labels TO BE"
src="https://github.com/user-attachments/assets/f4104bf7-e142-427b-9377-39b0f64d9152"
/> |

Not captured:

- The fake Stripe.js in the fixture build renders no card or address
fields, so the payment column shows only the labels around empty
Elements.
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 29, 2026
…lestone 3 full-page checkout behind billing_web_checkout_ui (Comfy-Org#19253)

> **Now carries the whole Milestone 3 full-page checkout.** The approved
stacked PRs above were squash-merged top-down into this branch; each was
reviewed and approved at its own head:
Comfy-Org#19263 (saved methods,
rail failures), Comfy-Org#19264
(inline outcomes, keep-subscription consent, re-quote failure),
Comfy-Org#19268 (mount
reconciliation),
Comfy-Org#19271 (bfcache,
cross-tab), Comfy-Org#19279
(ending screens),
Comfy-Org#19280 (refusal, plan
not available, couldn't load),
Comfy-Org#19285 (3DS / redirect
two-phase submit),
Comfy-Org#19266 +
Comfy-Org#19267 (summary
ledger), Comfy-Org#19276 +
Comfy-Org#19277 +
Comfy-Org#19278 (promo codes).
Everything stays behind `billing_web_checkout_ui = full_page`; flag off
is the Milestone 2 checkout unchanged. Design review: Alex Tov confirmed
the PRs match the guidebooks (#proj-billing, 2026-09-28).

## Why

FE-3018 (Milestone 3, checkout guidebook 1: flow and entry). With
`billing_web_checkout_ui = full_page`, `/v1/checkout` rendered an empty
"Checkout" stub. This PR turns it into the two-tone full-page capture
from Figma 187-8080, with the loading rule from 479-4848 (DES-1014) and
the element-failure column from 360-4874.

## Root cause

n/a, feature.

## How

- `useFullPageCheckout` reads capabilities, the quote and the Stripe key
in parallel on arrival and dispatches one event into the `CheckoutPage`
reducer from the PR below: a denied `can_subscribe_self_serve` goes to
`refused`, a failed read goes to `unavailable`, a quote goes to
`capture`. Nothing renders capture before all three are in; the key is
awaited because `StripePaymentForm` reads it only on mount.
- Skeleton: the header, the "Total due today" label, both payment group
labels, the Pay button and the terms line render for real; eyebrow,
headline and total are skeleton bars. No spinner.
- Pay enables only when the quote has arrived and the Stripe payment
element reports `payment_element_ready` (the address element's ready
does not count). A started operation keeps Pay locked so a second click
cannot charge twice; rendering the post-Pay outcome is PR 2 / PR 3.
- Eyebrow is `Subscribe to {tier} Plan · {workspace.name}`, with the
name read from the minted session credential, not the quote.
- The back arrow goes to the entry's allowlisted `return_to` through
`buildReturnUrl`, the same helper the embedded view uses. When this
family has no destination for the target, it falls back to the
workspace's Plan & Credits settings on the cloud origin
(`checkout/cloudLinks.ts`, `/?settings=plan-credits&workspace=<id>`, the
same deep link the contract's `comfyui_credits` target names), so the
arrow always renders and always has somewhere to go.
- Design review (Alex 2026-09-28): D4. Back arrow destination is
`return_to` with the Plan & Credits fallback; the `canGoBack` prop is
gone since there is always a destination.
- A `payment_element_failed` replaces the whole payment column with the
360-4874 card and a Try again that remounts `StripePaymentForm` and
re-disables Pay until the new element is ready.
- A plan change (`transition_type` other than `new_subscription`)
renders Pay without a card form and subscribes without a confirmation
token, as the embedded view does.
- Subscribe goes through `useCheckout().subscribe` with the same request
fields as the embedded view (quote id and version, proration, credit
stop, `return_url` to `/v1/result`).
- Reuse: `StripePaymentForm`, `usePreviewSubscribe`, `useCheckout`,
`formatQuoteMoney`, and `CheckoutTermsNote` (now exported from
`@comfyorg/account-ui/billing/checkout`, one line).
- The refusal is a minimal placeholder with i18n copy; FE-3021 owns the
real ending screen.
- Rebased onto main: the `CheckoutView.vue` refactor is dropped because
Comfy-Org#19101 owns the M2 `CheckoutView`, the seven `checkout.*` locale keys
the full page reads are restored, and `subscribeRequest.ts` serves the
full page only.

## Tradeoffs

- The subscribe-request builder and `resultUrl` are a copy of the
embedded view's, because that view must stay untouched while the flag is
off. The copy goes when the embedded variant is retired.
- The left column is eyebrow, headline and total only; the ledger
grammar, credits line and promo chip are FE-3019 / FE-3020.
- The refusal copy is one generic line; the reason stays in the state
for FE-3021.
- `h-84` placeholder boxes stand in for the Stripe elements until the
quote arrives, because `StripePaymentForm` never mounts its elements
when the amount is not yet known.
- Known gaps, all parity with the embedded view and all for PR 2 (listed
so nobody serves `full_page` before then): after Pay the page shows no
outcome and keeps Pay locked; a quote needing reactivation confirmation
gets the server's coded refusal on Pay instead of the confirm checkbox;
a zero-amount quote, an `allowed: false` quote, or one without a payment
method configuration leaves Pay disabled with no explanation.
- The page is split into `CheckoutSummaryColumn` and
`CheckoutPaymentColumn` so the view template stays under the fallow
complexity gate.

## Blast Radius

Only `billing_web_checkout_ui = full_page`, which Cloud does not serve
yet (cloud PR 10904, merged); targeted per account in PostHog. Flag off
is byte-identical: `CheckoutView.vue`, `CheckoutPayment.vue`,
`EmbeddedCheckout.vue` are untouched and the embedded e2e still passes.
The e2e fake Stripe now fires element `ready`, which the embedded view
ignores.

## Verification

- `pnpm --filter @comfyorg/billing-web typecheck`: clean.
- `pnpm --filter @comfyorg/billing-web test:unit`: 25 files, 266 tests
pass (13 new component cases in `FullPageCheckoutView.test.ts`; mutating
the operation lock, the `canPay` guard in `pay()`, or the `allowed`
check each turns one red).
- `pnpm exec playwright test` in `apps/billing-web` (fresh production
build, `CI=1`): 33 passed. New `e2e/full-page-checkout.spec.ts` asserts
the eyebrow names plan and workspace, Pay is labelled "Pay and
subscribe" and enabled once ready, and the failed-element column plus
Try again. `checkout-ui.spec.ts` still asserts flag-off shows "Confirm
your payment".
- `pnpm --filter @comfyorg/billing-web lint` (eslint + stylelint), oxfmt
and oxlint on changed files, `pnpm knip`: clean.
- After the design review: `cloudLinks.test.ts` (the settings deep link
with and without a workspace) and a two-row table in
`FullPageCheckoutView.test.ts` (Back to `comfyui_workspace`, Back to
Plan & Credits for `platform_account`, which the test family cannot
resolve). Typecheck and 294 unit tests pass at this head.

## Design questions

- 360-4874 drops the back arrow in the whole-column failure; the 368
frames keep it. This PR keeps it, since the summary column stays live
and the customer still needs a way back. Intentional in Figma, or a
frame slip?
- The error card background in Figma is `#2d2e32`
(`semantic/secondary/background-hover`), which has no repo token. This
uses `bg-secondary-background-hover` (`#313235` in dark). Retoken, or
accept?

## AS IS / TO BE

Captured from the e2e harness (production build, mocked Cloud, fake
Stripe) at 1512x982, `full_page` on. The fake Stripe mounts no real
element, so the ready state shows the element area empty.

| AS IS (base: empty stub) | TO BE: capture skeleton (479-4848) |
|---|---|
|
![as-is](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/47c1ef8e2f8a7afa903c2a3152cfab3a896d217c/as-is-full-page.png)
|
![skeleton](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/47c1ef8e2f8a7afa903c2a3152cfab3a896d217c/to-be-skeleton.png)
|

| TO BE: capture ready, Pay enabled | TO BE: element failed, whole
column (360-4874) |
|---|---|
|
![ready](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/47c1ef8e2f8a7afa903c2a3152cfab3a896d217c/to-be-ready.png)
|
![element-failed](https://raw.githubusercontent.com/Comfy-Org/ComfyUI_frontend/47c1ef8e2f8a7afa903c2a3152cfab3a896d217c/to-be-element-failed.png)
|

## Where this sits in the plan

One linear stack on `main`: each PR is based on the one above it in the
table. The former FE-3019/FE-3020 sibling stack now sits on top of
FE-3022.

| Step | PR | Scope |
|---|---|---|
| FE-3067 | Comfy-Org#19248
(merged) | flag and variant switch |
| FE-3018 PR 0 |
Comfy-Org#19252 | page state
union and pure transition |
| **FE-3018 PR 1** | **this PR** | **shell, eyebrow, capture skeleton**
|
| FE-3018 PR 2a |
Comfy-Org#19263 | saved-method
tabs, rail failure taxonomy |
| FE-3018 PR 2b |
Comfy-Org#19264 | inline Pay
outcomes, backstop, reactivation |
| FE-3018 PR 3a |
Comfy-Org#19268 | mount
reconciliation, placeholders |
| FE-3018 PR 3b |
Comfy-Org#19271 | bfcache and
cross-tab re-reconciliation |
| FE-3021 PR 1 |
Comfy-Org#19279 | success,
already completed, in progress, received, unconfirmed |
| FE-3021 PR 2 |
Comfy-Org#19280 | refusal, plan
not available, couldn't load |
| FE-3022 | Comfy-Org#19285 |
two-phase submit area, 3DS re-open, redirect methods, verification
failed |
| FE-3019 PR 1 |
Comfy-Org#19266 | summary
ledger model and builder |
| FE-3019 PR 2 |
Comfy-Org#19267 | left-column
ledger rendering |
| FE-3020 1/3 | Comfy-Org#19276
| discount rows, fold rule, Subtotal |
| FE-3020 2/3 | Comfy-Org#19277
| promo entry state, Pay binding, URL promo |
| FE-3020 3/3 | Comfy-Org#19278
| promo entry UI, chips, expired card |

```mermaid
graph LR
  M["main (19248 merged)"] --> N19252["19252 page state"] --> N19253["19253 shell"] --> N19263["19263 rails"] --> N19264["19264 outcomes"] --> N19268["19268 mount reconciliation"] --> N19271["19271 bfcache and cross-tab"] --> N19279["19279 money endings"] --> N19280["19280 refusal screens"] --> N19285["19285 payment authentication"] --> N19266["19266 ledger model"] --> N19267["19267 ledger UI"] --> N19276["19276 discount rows"] --> N19277["19277 promo entry state"] --> N19278["19278 promo entry UI"]
  style N19253 stroke-width:3px
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cloud/1.55 Backport PRs for cloud 1.55 core/1.55 Backport PRs for core 1.55 needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch risk:xhigh PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants