feat(web): cart page uses cart line details (#40) #125
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/kws!125
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/40-cart-uses-line-details"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
The web cart page now reads names, labels, park, availability and the unit price straight from the cart response that PR #124 added, instead of asking every park for its products on every visit date. This removes the
shortcut:inuseCartLines.tsand the parks × dates request fan-out (a rate-limit risk behind shared IPs). Web only; no API change.Changes
resolveLines.ts(pure, no requests) replacesuseCartLines.ts. States:ok,unavailable,past. A line isokonly when the server saysavailableand sent a name, park and price.CartProviderexposesdetails(the server's lines) next tolines. PUT bodies still carry only the fourCartLineInputkeys (a test pins it; the API rejects extra keys).noArithmetic.test.tscovers the new file); the fixed price note stays.Checks
make cover: 91.3% total (minimum 80%; Go unchanged)scripts/web-e2e.sh114 passed, 46 skippedNot verified
e2e-idp(real IdP + API) not run in this PR; the mocked e2e has no signed-in cart. A failed background currencies refetch can show "Try again" next to still-correct prices (unlikely, minor).🤖 Generated with Claude Code