Repository navigation
feat(ecommerce): add live checkout quotes and discount administration - #350
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 210916090d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Bundle size5 of 194 bundles changed.
Measured 22 packed archives separately; full report includes their compressed bytes without installed dependencies. |
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Candidate: The React Router regression was waiting for a refetch while its fixture retained a fresh five-minute quote cache. Waiting for Preparing payment alone still reproduced the timeout. The test now holds the real successful checkout response until that state is visible, advances browser fixed time beyond the cache window, and aborts delivery. The real quote endpoint rejects with 400; retry keeps the identical body/key, same order and one discount use. Product query semantics are unchanged. Fresh React Router and Next.js production builds each passed all four Ecommerce browser scenarios. All 42 Ecommerce unit tests, typecheck and targeted Biome pass; registry regeneration has no diff. Independent Standards, Spec and native Safeguard reviews found no issues. Generated fixture lockfile churn was preserved locally and excluded. Full-suite and packed-consumer verification remain CI-owned. |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Closes #340.
Optional
calculateShippingandcalculateTaxconfiguration functions receive authoritative prices and the shipping address. StaticshippingAmountand zero tax remain the defaults. Net product revenue remainssubtotal - discount. Preview does not reserve stock or discount uses. Discount administration requiresecommerce.discount.manage.Evidence
Recovery candidate
52797bb5: a fresh React Router production build and a freshly generated Next.js production build each pass all 4 Ecommerce browser scenarios. Ecommerce's 42 unit tests, typecheck, dependency builds, and Biome on the corrected spec pass. Registry regeneration produces no diff. Independent Standards and Spec reviews each report zero findings.The original lost-response test and the preparing-state-only correction both reproduced the React Router quote timeout. Its fixture caches queries for five minutes. The corrected test holds the successful checkout response until Preparing payment renders, advances browser fixed time past that cache window, then aborts delivery. The quote endpoint returns a real 400; retry uses the identical body/idempotency key, recovers the same order, and leaves exactly one discount use. Product query semantics are unchanged.
Before: Checkout supported static shipping, had no stored tax or live quote operation, and discount codes had no administrative list/delete interface.
After: 42 ecommerce unit tests and all 4
smoke.ecommerce.spec.tsbrowser tests pass, covering recalculation, retry fingerprints, tampered input, rollback, legacy tax fallback, authorization, admin controls and both existing checkout flows.The lost-response browser regression first reproduced a disabled payment button after the order consumed the discount's last use. It now proves recovery with the original idempotency key, the same order, and one discount use despite a fresh quote error.
Ecommerce build/typecheck and Biome on 50 relevant files pass. Registry output is regenerated and limited to Ecommerce and the index. The docs production build passed; the subsequent main merge contains release metadata/migration-doc updates, with targeted ecommerce checks rerun afterward.
Captioned demo (MP4), checkout screenshot, discount usage screenshot, mobile screenshot, full inspected evidence bundle. All 7 recording steps passed. Mobile overflow, keyboard tabs, fixed-code expiry, dark theme and quote-error retry were checked.
Media links are durable in the owner's archive and require the owner's website login plus LAN/private Tailscale access; they are not anonymous public GitHub uploads. Rates and products are demo data. The full local suite, TanStack browser run and complete multi-plugin packed-consumer matrix are left to CI. The recovery reran Ecommerce browser checks on both Next.js and React Router production; previous docs/media verification is historical and was not rerun for the test-only correction.
Merge Danger
Door: Two-way application rollback; the additive database column can remain.
Apply the
ecommerceOrder.taxmigration before deploying. Calculator failures reject checkout; transaction rollback retains stock/discount availability. Calculators should avoid purchase side effects and use bounded service timeouts.Blast Radius: Checkout