Repository navigation
[backport core/1.60] fix(billing-web): stop the Payment not verified top-up page from reloading itself - #23222
Conversation
…ading itself (#23216) ## Summary Reported in QA case C-28. After a 3DS challenge the bank refuses on the full-page top-up, the "Payment not verified" card showed, then the page re-quoted and re-mounted the payment form every few seconds with no input. ### Why The customer could not act on the not-verified card because the form kept reloading under them. ### Root cause A refused challenge leaves the operation `pending` server-side (one open invoice), and the operation lifecycle deliberately keeps polling it on the parked cadence. Every poll re-published the same operation, so `operationChanged` hit `waitingInCapture` in the reducer: an `awaitedHere` operation with a verdict sends capture back to `resolving`, which re-runs `readCapture` (capabilities, quote, saved methods) and re-mounts the payment column. That repeated on each poll. The server reporting the operation as pending is correct, so this is a frontend fix. ### How `waitingInCapture` leaves the page as it is when the capture already shows that verdict kind for that same operation. Shared reducer, so the subscription checkout (same `operationChanged` path) is covered too. ## Verification - AS IS: each lifecycle poll of the refused challenge re-quoted and re-mounted the form. - TO BE: further polls keep the same form and the Payment not verified card; no extra quote, no remount. - `FullPageTopupView.test.ts` › "keeps the Payment not verified card on the same form while the lifecycle goes on reading the refused challenge as pending" (fails before the fix: quote called twice, form mounted twice). - `checkoutPage.test.ts` › "ignores another poll of this tab's own refused challenge over its not-verified card" (fails before the fix: page goes to `resolving`). - `pnpm exec vitest run src/checkout/checkoutPage.test.ts src/views/FullPageTopupView.test.ts src/views/FullPageCheckoutView.test.ts`: 447 passed. - Not verified on testbilling.comfy.org with the real 3DS card yet.
📦 Bundle: ⏳ Size data collection in progress…🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure
Findings and check detailsExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight The matrix runs on same-repository version-bump PRs with relevant changes, main-branch pushes, and manual dispatches. This candidate does not qualify, so every expensive stage was skipped. Full docs: scripts/registry-census/README.md 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
🌾 Fallow: ✅ PassedFindings and check detailsFallow 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. Full docs: ADR-DEVEX-LINT-0015 Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 2ec64d9b6fb5dd9c96c333a51fd9c9bb2edb6a6e
🏛️ Architecture: ✅ PassedFindings and check detailsWarnings (389)
Full docs: Frontend domain catalog Reproduce locallypnpm architecture:check |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## core/1.60 #23222 +/- ##
=============================================
+ Coverage 87.51% 87.61% +0.09%
=============================================
Files 2900 3008 +108
Lines 160458 163841 +3383
Branches 42928 44102 +1174
=============================================
+ Hits 140432 143546 +3114
- Misses 19263 19364 +101
- Partials 763 931 +168
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 107 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Backport of #23216 to
core/1.60Automatically created by backport workflow.