Repository navigation
FE-3021 fix(billing-web): ending screens and error-card buttons from the M3 design review - #19376
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🌾 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 92e7d8a7768be5139536b86e58916ce52f2ba56c
Full docs: ADR-DEVEX-LINT-0015 🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measureExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight This candidate changes nothing the matrix measures, so every expensive stage was 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
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## jaewon/fe-3018-full-page-checkout-shell #19376 +/- ##
==========================================================================
Coverage ? 85.20%
==========================================================================
Files ? 2411
Lines ? 136691
Branches ? 35235
==========================================================================
Hits ? 116471
Misses ? 19764
Partials ? 456
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
christian-byrne
left a comment
There was a problem hiding this comment.
The ending states no longer claim that no charge occurred when the payment re-read itself failed. Retry first re-establishes server truth, while the form and Pay action remain unavailable until that succeeds.
…ger claims nothing was charged The lifecycle's recover() is the check for money in flight. When it fails before any form shows, the page landed on the load-failure ending, whose body says "Nothing has been charged", which the page could not know. It now ends on its own recheck_failed screen: same title, Try again and code, with copy that makes no claim about money.
…t opened Browsers let only a script-opened tab close itself. That tab now shows "Closing in 5…" and closes when it reaches zero; any other tab says "You can close this tab now." (Figma 77-4144).
…charged." as its own sentence Figma 345-14023.
…ne card and a ghost button on endings Design review decision: under an inline error card Contact support uses the tertiary filled variant; on full-page endings it uses the text-only ghost variant instead of an underlined link. Both reuse the design-system button recipe.
…eground color Figma 314-10530.
…and heading as in Figma Plan name 16 bold and price 32 semibold (77-4079), reference code monospace Regular 16 (372-4963), heading on one line from the sm breakpoint (77-4073). JetBrains Mono is not loaded anywhere in the repo, so the code uses the font-mono stack.
… checkout Keeps reduceCheckoutPage under the fallow cognitive-complexity gate after recheckFailed joined it.
2553da9 to
4900411
Compare
cff42e3
into
jaewon/fe-3018-full-page-checkout-shell
…e-check failure body (#19487) ## Summary Applies two decisions from Alex Tov (design, 2026-09-29 18:21 and 18:33 EDT) to two endings added in #19462 and #19376: the scheduled-change refusal names its plan like the rest of checkout, and the failed payment re-check becomes the Couldn't load ending with its own body. ## Changes - **Why**: Alex asked for the SUBSCRIPTION_CHANGE_IN_PROGRESS refusal to read "Pro" / "Pro Yearly" with a full date, matching the summary (Figma 643-14661). He also asked for the re-check failure to be the same "Couldn't load your checkout" screen as the quote-load failure, with only the body changed (Figma 677-14662). - **Root cause**: the refusal named the plan through `useHostedCopy().planName`, the settings panel's "{tier} · {duration}" format, rather than the summary's naming. The re-check failure was a distinct page kind (`recheck_failed`) and a distinct ending, although it differs from the quote-load failure only in copy. - **How**: - `summaryLedger.ts` exports `namedPlan`, the naming the summary's "You'll keep {plan} until {date}" line already used. The refusal calls it with the cadence shown only for yearly, so a monthly change reads "Pro" and a yearly one "Pro Yearly". The date was already `longDate` (full month, UTC), and a test now covers that. - `recheck_failed` is gone from both the page and the ending. The page's `unavailable` now carries `cause: 'quote' | 'recheck'`. The `recheckFailed` event still names the re-check, and it lands on `unavailable` with `cause: 'recheck'`. `load_failed` picks `body.quote` or `body.recheck`, and Try again handles both causes the same way, re-running the re-check and the quote. `ending.recheck_failed.*` is removed and `ending.load_failed.body` is split by cause. | Item | Commit | | --- | --- | | 1. Scheduled-change plan/date format | 07d4adb `fix(billing-web): name a scheduled change's plan the way the summary names a kept plan` | | 2. Re-check failure folded into Couldn't load | 5a0dc5d `fix(billing-web): fold the failed payment re-check into Couldn't load your checkout` | The tests went in with each fix because the pre-commit typecheck rejects a red test commit. I confirmed them red locally first: 11 failing before either fix. ## Review Focus - A retry still re-runs the re-check. `retryLoad` calls `reconcile()` and dispatches `retried`, and `retried` resolves again from any `unavailable`. That is covered in the view test (recover called twice) and in e2e (`full-page-endings.spec.ts`, which now also asserts the new body). - Stacked on #19462 (in the merge queue). GitHub retargets this PR to main when that branch is deleted. Plan position: | PR | Scope | | --- | --- | | #19373 / #19374 / #19376 / #19379 | M3 design review rounds 1-2 (merged) | | #19462 | M3 design review round 3 (merge queue) | | **this PR** | **M3 design review round 4: Alex's 2026-09-29 decisions** | ```mermaid graph LR A[round 1-2 merged] --> B[#19462 round 3] --> C[round 4: this PR] style C stroke-width:3px ``` ## Screenshots (if applicable) All captures come from the billing-web e2e fixture build (mocked cloud, dark, 1512×982), labelled **fixture build**. AS IS is df3e0ad (#19462 head). | Fixture build | AS IS | TO BE | | --- | --- | --- | | Scheduled change, monthly (`pro_monthly`) | <img width="756" alt="as is" src="https://github.com/user-attachments/assets/eb22b626-1bac-4191-8b4c-cd9dd06465fe" /> | <img width="756" alt="to be" src="https://github.com/user-attachments/assets/24e1389b-0fe8-4391-8bad-d63d97924661" /> | | Scheduled change, yearly (`pro_yearly`) | <img width="756" alt="as is" src="https://github.com/user-attachments/assets/0ade37c8-3c6d-48a7-8a0e-d30009a50e59" /> | <img width="756" alt="to be" src="https://github.com/user-attachments/assets/2e50f6c5-ccd3-472b-a0ed-ddc557b0d34c" /> | | Payment re-check failed | <img width="756" alt="as is" src="https://github.com/user-attachments/assets/f8ebec6d-4488-41b2-a22d-2242d4e3b65f" /> | <img width="756" alt="to be" src="https://github.com/user-attachments/assets/5393a952-c67e-413e-ac05-2b06345afba0" /> | Quote-load failure, unchanged, for comparison (fixture build): <img width="756" alt="quote failed" src="https://github.com/user-attachments/assets/6c836d94-6cd3-4756-b3b8-85ebd1d450cd" />
…ming and endings copy (Comfy-Org#19537) ## Summary Fixes seven items from Alex Tov's UX pass on the M3 full-page checkout (`billing_web_checkout_ui`): a refused Pay gets the processing-error card, a $0 total says why, yearly kept plans name their cadence, team keep-subscription copy follows a period change, and three endings (View plans, capabilities failure, missing Stripe key) behave per design. ## Changes - **Why** (Alex's items) - 13: a coded Pay failure (e.g. a 500 → `REQUEST_FAILED`) rendered as a bare red `<p role=alert>` with no support path. Figma 314-10612 wants the "Payment couldn't be processed" card with Contact support. - 14: a $0 total with no explanation. An upgrade a code takes to $0, or a $0 new subscription the quote gives no `renewal_at`, got no zero-due line. Figma 294-8224. - 15: a yearly→yearly downgrade read "You'll keep Pro until…"; yearly plans must read "Pro Yearly". Figma 294-8445. - 17b: team monthly→yearly read "Changing your commitment…" instead of the switch-to-yearly line. - 16a: View plans opened the Team tab only for a missing stop; a retired team plan whose link carries `team_credit_stop_id` went to the default tab. - 16b: a failed capabilities read showed the quote body ("We couldn't load your quote. Nothing has been charged…"). Figma 421-5804. - 16c: a missing Stripe key ended the whole page. Figma 370-15519 fails inside the payment column. - **Root cause** - 13: `payVerdictOf` had a separate `failure` verdict that bypassed `InlineOutcome`, so the page threaded a plain `failure` string through the view, column and pay action beside the card. - 14: `chargeNowTrailing` gated the zero-due line on `new_subscription` and a `renewal_at`; the prorated family never had one. - 15: `keptPlanLine` passed `cadenceChanges` to `namedPlan`, which is false for yearly→yearly. - 17b: `changeOf` checked TEAM→TEAM before the duration change. - 16a: `viewPlansLink` read only the page's `team_stop_missing` reason, never the link. - 16b: `capabilityStop` emitted the quote's `unavailable` event. - 16c: `quotedStop` turned a missing key into an `unavailable` stop. - **How** - 13: a coded refusal is now `InlineOutcome { kind: 'processing_error', code, serverMessage? }`. `payFailed` always carries an outcome; the `failure` verdict, `payFailure` and the `failure` prop chain are deleted. The card body goes through `useHostedCopy().refusal`, so the "show server message" rule (status-only codes, 5xx included) holds inside the card. Support mail quotes `Error code: <code>`. - 14: one `zeroDueLine` for every $0 total in `charge_now` and `prorated_change` (not `scheduled`); dated → existing `zeroDue`, undated → new `zeroDueUndated`. Amounts are the quote's `renewal_amount_cents ?? cost_next_period_cents`. - 15: the kept plan names its cadence when it changes or when it is yearly. - 17b: TEAM→TEAM is `commitment` only when the duration is unchanged; otherwise `to_yearly` / `to_yearly_undated` / `to_monthly`. - 16a: Team tab when the link carries a stop, or the quote named a team plan without one. - 16b: new `capabilitiesFailed` event → `unavailable { cause: 'capabilities' }` with its own body that does not claim nothing was charged. Title, code and Try again unchanged. - 16c: the `quoted` event carries `element: 'failed'` when no key resolved, so the collect rail arrives failed. With no saved method that is `column_error` (Try again remounts the form, which picks up a key that arrived); beside saved methods, Saved stays payable. On-file plan changes never read the key. ## Review Focus - 16c beside saved methods: the failure stays inside Add new rather than taking the column, per the existing rail rules (368-15319). Figma 370-15519 shows the no-saved-method case. - 13 body wording: `REQUEST_FAILED` with a server message shows that message; without one, billing-web's own copy for the code. ## Screenshots (fixture build) Taken from the Playwright e2e fixture build (mocked cloud, fake Stripe), not a real backend. AS IS is `origin/main` source, TO BE is this branch. | Item | AS IS (fixture build) | TO BE (fixture build) | | --- | --- | --- | | 13 Pay failure (500 with a server message) | <img width="640" alt="item13-asis" src="https://github.com/user-attachments/assets/6c02c40e-abcc-4d1d-8831-3cb918519a39" /> | <img width="640" alt="item13-tobe" src="https://github.com/user-attachments/assets/19fe1596-e731-4381-87d4-583ac0d935bf" /> | | 14 upgrade taken to $0 by a code | <img width="640" alt="item14-asis" src="https://github.com/user-attachments/assets/14e964d2-0b65-4b64-9bf0-9856612fcd0b" /> | <img width="640" alt="item14-tobe" src="https://github.com/user-attachments/assets/8891c3d6-af19-4b6a-9e90-83fa75b59c88" /> | | 15 yearly to yearly downgrade | <img width="640" alt="item15-asis" src="https://github.com/user-attachments/assets/7f0c40e6-d57b-4115-b08d-80ad410a895a" /> | <img width="640" alt="item15-tobe" src="https://github.com/user-attachments/assets/cb611b3e-ee21-4a4a-8718-c2aef802af7f" /> | | 17b team monthly to yearly, plan set to end | <img width="640" alt="item17b-asis" src="https://github.com/user-attachments/assets/c83cbc14-2d64-4884-b831-8d2ee4366c25" /> | <img width="640" alt="item17b-tobe" src="https://github.com/user-attachments/assets/d0ef591e-f99e-4429-bfc8-aaac3f920ba5" /> | | 16b capabilities read failed | <img width="640" alt="item16b-asis" src="https://github.com/user-attachments/assets/270e6ab8-8c37-4ade-b838-1b49660fe708" /> | <img width="640" alt="item16b-tobe" src="https://github.com/user-attachments/assets/d2f03058-e4e7-4ad8-b681-6a3bb95ee57d" /> | 16a is a URL change, covered by the e2e spec for a retired team plan whose link carries its commit stop. 16c has no fixture-build screenshot because the e2e build bakes a Stripe key; the component test `370-15519` covers it. ## Plan position | PR | Ticket | Scope | | --- | --- | --- | | Comfy-Org#19374 | FE-3019 | summary discounts, kept team commitment, payment column layout | | Comfy-Org#19373 | FE-3020 | promo pricing on Pay, unreadable promo links, expired card on re-reads | | Comfy-Org#19376 | FE-3021 | ending screens, error-card buttons | | Comfy-Org#19379 | FE-3022 | payment authentication follow-ups | | **this PR** | **FE-3021** | **Pay failure card, $0 explanation, yearly naming, endings copy (items 13-17b)** | ```mermaid flowchart LR R[M3 design review] --> A[FE-3019 Comfy-Org#19374] R --> B[FE-3020 Comfy-Org#19373] R --> C[FE-3021 Comfy-Org#19376] R --> D[FE-3022 Comfy-Org#19379] R --> E[FE-3021 items 13-17b] style E fill:#f5c518,color:#000 ``` ## Verification - Red first: 16 new or changed unit and component tests and 5 new e2e specs failed on `origin/main` source, pass here. - `apps/billing-web`: typecheck, lint (eslint + stylelint + oxlint), vitest 839/839, Playwright 95/95. - `pnpm knip` clean; `fallow audit --changed-since origin/main`: no new findings.
Why
Follow-up to design review on #19253 (Alex Tov, 2026-09-29), FE-3021 scope: the full-page ending screens and the button variants on error cards.
Root cause
Bug 5 (#19280):
reconciledEventmapped a failedlifecycle.recover()to the sameunavailableevent as a failed quote or capabilities read.recover()is the check for money in flight, so when it fails the page cannot know whether anything was charged, yet the Couldn't load ending said "Nothing has been charged".How
recheckFailed, which ends a resolving page on a newrecheck_failedpage and ending: same title, Try again and code as Couldn't load, with a body that makes no claim about money. A failed quote or capabilities read keeps the existing copy. Try again retries both.SuccessCloseFootercounts down "Closing in 5…" and emitscloseonly whenwindow.openeris set (the signalclose()already uses); any other tab reads "You can close this tab now."buttonVariants:tertiaryunder an inline error card,textonly(ghost) on endings.font-monostacksmup. It still wraps on phones so it doesn't overflowAlso: 834b892 restores real timers after every billing-web test, which the
no-redundant-vitest-cleanuplint rule already assumes.Verification
pnpm --filter @comfyorg/billing-web typecheck,lint,test:unit(739 pass),pnpm knip, oxfmt check,fallow auditagainst the base: clean.CI=1 playwright testinapps/billing-web: 69 pass. New case infull-page-endings.spec.ts: a failing/billing/statusrenders Couldn't load without "Nothing has been charged", and Try again follows the pending operation to Already completed with no subscribe. The success case asserts "You can close this tab now."Open questions for design
recheck_failedbody is new copy: "We couldn't check this workspace's payments, so we can't show your checkout yet." It has no Figma frame.AS IS / TO BE
All images are from the fixture build: the billing-web Playwright fixtures (
apps/billing-web/e2e/fixtures, mocked Cloud and a fake Stripe.js), productionvite build, dark theme, 1280px wide unless the row says phone. AS IS is the basejaewon/fe-3018-full-page-checkout-shell@2c0d3a1381; TO BE is this PR @2553da9745. None are from a real backend./billing/status503)window.openerset): "Closing in 5…"Not captured:
font-monofallback in both builds.