Repository navigation
[backport cloud/1.56] FE-3292 fix(billing-web): label a recovered payment with its own plan - #20507
Conversation
…#20456) ## Why QA 1.56: after closing a Team Monthly ($665) 3DS checkout and subscribing to Pro from the app, billing-web recovered the pending Team op and resumed its 3DS. The page and the success screen both said "Pro Monthly", but the server granted Team. ## Root cause billing-web labelled and priced every screen from the checkout link's quote, even while it showed an op it had not sent. The SDK dropped `plan` from a pending op's status, and a settled op without a quote was named by looking its receipt slug up in the catalog. ## How - `account-core`: `reducePending` keeps the server's `plan` (`BillingOperationPlan`) on `PendingBillingOperation`. The receipt already carried it. - `billing-web/checkout/operationPlan.ts`: `operationPlanOf` reads the op's server plan (pending `plan` or receipt `plan`). `operationPlanLabel` renders it: tier + duration as the name, `price_cents` per month, and `monthly_price_cents` for ANNUAL (no division). A missing tier, price or currency renders nothing. - Full page: a `waiting` page (money this page did not send) shows the op's plan in the summary column with no due-today total. Every terminal names the receipt plan. Only this page's own Pay, settled without one, falls back to its quote. The catalog lookup (`readSettledPlan`, `settledPlanSource`, `settledPlanRead`) is removed. - Embedded (`CheckoutView`): an op the lifecycle held before this page's own subscribe was in flight counts as recovered (a Pay joins it). Its confirm summary and success card show the op's plan. `account-ui` confirm and success steps gained `summary`/`plan` slots behind `summaryReplaced`/`planReplaced`. The plan-change charge block moved into `CheckoutTransitionTotal` to keep template complexity under the fallow gate. No catalog lookup, no comparison with the link plan, no Team stop pricing, no division, no re-quote. ## AS IS / TO BE _pending capture_ ## Test plan - `account-core` `operationState.test.ts`: a pending op carries the polled plan. - `FullPageCheckoutView.test.ts`: a recovered op on another plan shows its own name and rate, with no link plan and no total. ANNUAL shows `monthly_price_cents` per month. An absent tier or price shows nothing. Its ending names the receipt plan. A receipt without tier or price shows the code, not a catalog name. The existing settled-plan tests now read receipt fields. - `CheckoutView.test.ts`: the same summary cases, and the success step naming the op's plan. - `pnpm exec vitest run` on billing-web `src` (1491 passed), account-ui `src/billing` (175 passed) and account-core `src/core/billing` (737 passed). Typecheck passes for billing-web, account-ui and account-core. `fallow audit` is clean. - Fixes FE-3292 - QA report (original thread): https://comfy-organization.slack.com/archives/C0932CGKT5K/p1791364288339559?thread_ts=1791246295.718539&cid=C0932CGKT5K
🌐 Website E2ETip All tests passed.
🎨 Storybook: ✅ Built — View Storybook🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 6a991d7116a92edccfb133087f86e054e57a87ae
Full docs: ADR-DEVEX-LINT-0015 🎭 Playwright: ✅ 2198 passed, 0 failed · 2 flaky📊 Browser Reports
🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff. Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md |
christian-byrne
left a comment
There was a problem hiding this comment.
Self-review: this bot-authored cloud/1.56 carrier has the same stable patch-id as merged #20456, with the complete 25-file recovered-payment behavior and regression set and no target-specific drift. Merge only after the current required and aggregate checks settle green.
dante01yoon
left a comment
There was a problem hiding this comment.
Diff matches the #20456 squash commit line for line.
Backport of #20456 to
cloud/1.56Automatically created by backport workflow.