Skip to content

[_]: refactor/extract-checkout-price-refetch-hook - #2104

Draft
sg-gs wants to merge 2 commits into
masterfrom
fix/checkout-tax-refetch-hook-tests
Draft

[_]: refactor/extract-checkout-price-refetch-hook#2104
sg-gs wants to merge 2 commits into
masterfrom
fix/checkout-tax-refetch-hook-tests

Conversation

@sg-gs

@sg-gs sg-gs commented Aug 6, 2026

Copy link
Copy Markdown
Member

What

Extracts the price/tax refetch effect triggered by billing address changes into usePriceRefetchOnAddressChange (fix applied in #2103), with unit tests covering the cases that caused the tax flash.

Why

The bug in #2103 wasn't caught by any test because that logic lived inline in CheckoutViewWrapper with no coverage. Extracting it into a hook makes it testable and prevents a future regression.

sg-gs added 2 commits August 6, 2026 14:13
Regression guard for the checkout tax flash fixed in a773b23: the
debounced refetch that recalculates tax when the billing address
changes now lives in usePriceRefetchOnAddressChange, with unit tests
covering the missing-country and missing-postal-code cases that caused
the bug.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: afe52e6
Status: ✅  Deploy successful!
Preview URL: https://76e10b48.drive-web.pages.dev
Branch Preview URL: https://fix-checkout-tax-refetch-hoo.drive-web.pages.dev

View logs

@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants