Skip to content

[backport cloud/1.56] FE-3292 fix(billing-web): label a recovered payment with its own plan - #20507

Merged
christian-byrne merged 1 commit into
cloud/1.56from
backport-20456-to-cloud-1.56
Oct 8, 2026
Merged

christian-byrne merged 1 commit into
cloud/1.56from
backport-20456-to-cloud-1.56

Conversation

@comfy-pr-bot

Copy link
Copy Markdown
Member

Backport of #20456 to cloud/1.56

Automatically created by backport workflow.

…#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
@comfy-pr-bot comfy-pr-bot added the backport Backporting a PR onto a release candidate label Oct 8, 2026
@comfy-pr-bot
comfy-pr-bot requested review from a team and dante01yoon as code owners October 8, 2026 03:06
@comfy-pr-bot
comfy-pr-bot enabled auto-merge (squash) October 8, 2026 03:06
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 10/08/2026, 03:08:51 AM UTC

Links

🌾 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 6a991d7116a92edccfb133087f86e054e57a87ae

Full docs: ADR-DEVEX-LINT-0015

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

📊 Browser Reports
  • chromium: View Report (✅ 2176 / ❌ 0 / ⚠️ 2 / ⏭️ 0)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 19 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🧩 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

@codecov

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.64045% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ing-web/src/components/fullPage/EndingPlanCard.vue 0.00% 0 Missing and 2 partials ⚠️
apps/billing-web/src/views/CheckoutView.vue 89.47% 1 Missing and 1 partial ⚠️
...ccount-ui/src/billing/checkout/CheckoutSuccess.vue 84.61% 0 Missing and 2 partials ⚠️
...illing-web/src/components/OperationPlanSummary.vue 80.00% 0 Missing and 1 partial ⚠️
...pps/billing-web/src/views/FullPageCheckoutView.vue 93.33% 0 Missing and 1 partial ⚠️
.../src/billing/checkout/CheckoutSubscribeConfirm.vue 75.00% 0 Missing and 1 partial ⚠️
...nt-ui/src/billing/checkout/CheckoutTeamSuccess.vue 0.00% 1 Missing ⚠️
...src/billing/checkout/CheckoutTransitionConfirm.vue 80.00% 0 Missing and 1 partial ⚠️
@@              Coverage Diff              @@
##             cloud/1.56   #20507   +/-   ##
=============================================
  Coverage              ?   84.95%           
=============================================
  Files                 ?     3512           
  Lines                 ?   169975           
  Branches              ?    44745           
=============================================
  Hits                  ?   144401           
  Misses                ?    23590           
  Partials              ?     1984           
Flag Coverage Δ
billing-web-unit 92.30% <88.88%> (?)
unit 82.94% <85.71%> (?)
website-unit 79.91% <ø> (?)

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 94.34% <ø> (ø)
apps/billing-web/src/checkout/endingScreen.ts 94.82% <ø> (ø)
apps/billing-web/src/checkout/operationPlan.ts 100.00% <100.00%> (ø)
.../src/components/fullPage/CheckoutSummaryColumn.vue 100.00% <100.00%> (ø)
...billing-web/src/composables/useFullPageCheckout.ts 94.40% <ø> (ø)
...es/account-core/src/core/billing/operationState.ts 81.37% <100.00%> (ø)
...i/src/billing/checkout/CheckoutTransitionTotal.vue 100.00% <100.00%> (ø)
...illing-web/src/components/OperationPlanSummary.vue 80.00% <80.00%> (ø)
...pps/billing-web/src/views/FullPageCheckoutView.vue 95.45% <93.33%> (ø)
.../src/billing/checkout/CheckoutSubscribeConfirm.vue 97.95% <75.00%> (ø)
... and 5 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

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 dante01yoon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Diff matches the #20456 squash commit line for line.

@github-actions github-actions Bot added the risk:xhigh PR risk grade (advisory shadow check; grader-owned) label Oct 8, 2026
@christian-byrne
christian-byrne merged commit 2f59ddf into cloud/1.56 Oct 8, 2026
137 checks passed
@christian-byrne
christian-byrne deleted the backport-20456-to-cloud-1.56 branch October 8, 2026 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Backporting a PR onto a release candidate risk:xhigh PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants