Repository navigation
fix(billing-web): re-quote on QUOTE_STALE in the full-page checkout - #19499
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. Your free on-demand review promotion remains active until October 9, 2026 at 6:00 PM UTC. 📝 WalkthroughWalkthroughCheckout now maps ChangesCheckout stale quote handling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The change restores re-quoting for stale checkout quotes without treating server failures as quote expiry. No merge-blocking risk remains on the supplied evidence. 🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
Full details: End-To-End Regression Coverage For FixesExplanation The PR uses bug-fix language in the title and commit subject:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 156813d1db380b50e45fb7dfbe91f52276e2bf18
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 🎭 Playwright: 🕵🏻 0 passed, 0 failed📊 Browser Reports
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #19499 +/- ##
==========================================
+ Coverage 84.28% 85.13% +0.85%
==========================================
Files 3286 2410 -876
Lines 158348 135875 -22473
Branches 43025 36718 -6307
==========================================
- Hits 133463 115678 -17785
+ Misses 23060 19728 -3332
+ Partials 1825 469 -1356
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 876 files with indirect coverage changes 🚀 New features to boost your workflow:
|
This reverts commit 1856e25.
…19499) ## Summary Fixes the `full-page-promo.spec.ts` "a code that lapses before Pay" failure that has been red on main since #19126. The full-page checkout now re-quotes when a subscribe comes back as `QUOTE_STALE`. ## Changes - **What**: #19253 made `payVerdictOf` re-quote only when a raw `SUBSCRIPTION_QUOTE_STALE` `serverCode` came back. #19126 then changed account-core to turn a 4xx with that code into `{ code: 'QUOTE_STALE' }` with no `serverCode`. The two PRs were written in parallel and merged about 40 minutes apart. Since then, `payVerdictOf` falls through to `failure`. The page shows "Your quote changed…" instead of re-pricing and showing the expired-promo card. `payVerdictOf` now maps `QUOTE_STALE` to `requote`. - The `payVerdict` and `FullPageCheckoutView` unit tests built the pre-#19126 result shape by hand, so they missed this. They now use the shape account-core actually returns. ## Review Focus `SUBSCRIPTION_QUOTE_STALE` is gone from `STALE_QUOTE_SERVER_CODES`. Only `subscribe` emits it, and account-core now maps it for 4xx responses. A 5xx that echoes the code arrives as `REQUEST_FAILED`, which account-core treats as an upstream failure, not a stale quote. With this change, that 5xx no longer triggers a re-quote. Red/green: both updated unit tests fail without the `payVerdict.ts` change and pass with it. `pnpm test:e2e:local e2e/full-page-promo.spec.ts` passes 6/6.
…19499) ## Summary Fixes the `full-page-promo.spec.ts` "a code that lapses before Pay" failure that has been red on main since #19126. The full-page checkout now re-quotes when a subscribe comes back as `QUOTE_STALE`. ## Changes - **What**: #19253 made `payVerdictOf` re-quote only when a raw `SUBSCRIPTION_QUOTE_STALE` `serverCode` came back. #19126 then changed account-core to turn a 4xx with that code into `{ code: 'QUOTE_STALE' }` with no `serverCode`. The two PRs were written in parallel and merged about 40 minutes apart. Since then, `payVerdictOf` falls through to `failure`. The page shows "Your quote changed…" instead of re-pricing and showing the expired-promo card. `payVerdictOf` now maps `QUOTE_STALE` to `requote`. - The `payVerdict` and `FullPageCheckoutView` unit tests built the pre-#19126 result shape by hand, so they missed this. They now use the shape account-core actually returns. ## Review Focus `SUBSCRIPTION_QUOTE_STALE` is gone from `STALE_QUOTE_SERVER_CODES`. Only `subscribe` emits it, and account-core now maps it for 4xx responses. A 5xx that echoes the code arrives as `REQUEST_FAILED`, which account-core treats as an upstream failure, not a stale quote. With this change, that 5xx no longer triggers a re-quote. Red/green: both updated unit tests fail without the `payVerdict.ts` change and pass with it. `pnpm test:e2e:local e2e/full-page-promo.spec.ts` passes 6/6.
…19499) ## Summary Fixes the `full-page-promo.spec.ts` "a code that lapses before Pay" failure that has been red on main since #19126. The full-page checkout now re-quotes when a subscribe comes back as `QUOTE_STALE`. ## Changes - **What**: #19253 made `payVerdictOf` re-quote only when a raw `SUBSCRIPTION_QUOTE_STALE` `serverCode` came back. #19126 then changed account-core to turn a 4xx with that code into `{ code: 'QUOTE_STALE' }` with no `serverCode`. The two PRs were written in parallel and merged about 40 minutes apart. Since then, `payVerdictOf` falls through to `failure`. The page shows "Your quote changed…" instead of re-pricing and showing the expired-promo card. `payVerdictOf` now maps `QUOTE_STALE` to `requote`. - The `payVerdict` and `FullPageCheckoutView` unit tests built the pre-#19126 result shape by hand, so they missed this. They now use the shape account-core actually returns. ## Review Focus `SUBSCRIPTION_QUOTE_STALE` is gone from `STALE_QUOTE_SERVER_CODES`. Only `subscribe` emits it, and account-core now maps it for 4xx responses. A 5xx that echoes the code arrives as `REQUEST_FAILED`, which account-core treats as an upstream failure, not a stale quote. With this change, that 5xx no longer triggers a re-quote. Red/green: both updated unit tests fail without the `payVerdict.ts` change and pass with it. `pnpm test:e2e:local e2e/full-page-promo.spec.ts` passes 6/6.
…19499) ## Summary Fixes the `full-page-promo.spec.ts` "a code that lapses before Pay" failure that has been red on main since #19126. The full-page checkout now re-quotes when a subscribe comes back as `QUOTE_STALE`. ## Changes - **What**: #19253 made `payVerdictOf` re-quote only when a raw `SUBSCRIPTION_QUOTE_STALE` `serverCode` came back. #19126 then changed account-core to turn a 4xx with that code into `{ code: 'QUOTE_STALE' }` with no `serverCode`. The two PRs were written in parallel and merged about 40 minutes apart. Since then, `payVerdictOf` falls through to `failure`. The page shows "Your quote changed…" instead of re-pricing and showing the expired-promo card. `payVerdictOf` now maps `QUOTE_STALE` to `requote`. - The `payVerdict` and `FullPageCheckoutView` unit tests built the pre-#19126 result shape by hand, so they missed this. They now use the shape account-core actually returns. ## Review Focus `SUBSCRIPTION_QUOTE_STALE` is gone from `STALE_QUOTE_SERVER_CODES`. Only `subscribe` emits it, and account-core now maps it for 4xx responses. A 5xx that echoes the code arrives as `REQUEST_FAILED`, which account-core treats as an upstream failure, not a stale quote. With this change, that 5xx no longer triggers a re-quote. Red/green: both updated unit tests fail without the `payVerdict.ts` change and pass with it. `pnpm test:e2e:local e2e/full-page-promo.spec.ts` passes 6/6.
… full-page checkout (#19643) ## Summary Backports #19499 to `core/1.55` so the full-page promo flow handles account-core's current `{ code: 'QUOTE_STALE' }` result and re-quotes instead of showing the generic quote-changed failure. ## Scope - Cherry-picks merged commit `9fa2eb037f` with provenance. - Changes only `payVerdictOf` and its two existing focused test files (3 files, +5/-13). - Does not import website/catalog content or alter billing assertions. ## Verification - Red on the target implementation with the updated source tests: 2 failures / 126 passes; `QUOTE_STALE` falls through to `failure`, and the promo case shows generic quote-changed copy. - Green at this head: 128/128 focused Vitest tests. - `pnpm typecheck` passed for `@comfyorg/billing-web`. - `pnpm lint` passed for `@comfyorg/billing-web`. - The local Playwright suite is blocked before checkout behavior by release-branch auth-route drift (`/cloud/login` versus the fixture's `/sign-in` expectation); hosted `billing-web-e2e` remains required and is not waived. Backport of #19499. Co-authored-by: Alexander Brown <drjkl@comfy.org>
Summary
Fixes the
full-page-promo.spec.ts"a code that lapses before Pay" failure that has been red on main since #19126. The full-page checkout now re-quotes when a subscribe comes back asQUOTE_STALE.Changes
payVerdictOfre-quote only when a rawSUBSCRIPTION_QUOTE_STALEserverCodecame back. FE-3056 fix(billing-web): re-quote a stale subscribe quote the way the app does #19126 then changed account-core to turn a 4xx with that code into{ code: 'QUOTE_STALE' }with noserverCode. The two PRs were written in parallel and merged about 40 minutes apart. Since then,payVerdictOffalls through tofailure. The page shows "Your quote changed…" instead of re-pricing and showing the expired-promo card.payVerdictOfnow mapsQUOTE_STALEtorequote.payVerdictandFullPageCheckoutViewunit tests built the pre-FE-3056 fix(billing-web): re-quote a stale subscribe quote the way the app does #19126 result shape by hand, so they missed this. They now use the shape account-core actually returns.Review Focus
SUBSCRIPTION_QUOTE_STALEis gone fromSTALE_QUOTE_SERVER_CODES. Onlysubscribeemits it, and account-core now maps it for 4xx responses. A 5xx that echoes the code arrives asREQUEST_FAILED, which account-core treats as an upstream failure, not a stale quote. With this change, that 5xx no longer triggers a re-quote.Red/green: both updated unit tests fail without the
payVerdict.tschange and pass with it.pnpm test:e2e:local e2e/full-page-promo.spec.tspasses 6/6.