LTRAC-2085: fix(core) - Refresh the cart shipping form after its actions - #3254
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 3b5e708 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Bundle Size ReportComparing against baseline from No bundle size changes detected. |
jorgemoya
marked this pull request as ready for review
September 29, 2026 22:07
ShippingForm seeds useActionState from props once, and updateShippingInfo returns the previous state, so "View shipping options", "Add shipping", and quantity changes left the form stale until a full page reload. Key the form on the server's shipping state so it remounts with fresh props when that state changes. Drop the try/catch reload fallbacks from the shipping E2E tests. They masked this bug and each burned a 5s wait, pushing the quantity test past its 30s timeout on every CI run. Refs LTRAC-2085 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
jorgemoya
force-pushed
the
LTRAC-2085/fix/cart-shipping-form-refresh
branch
from
September 29, 2026 23:09
436f462 to
3b5e708
Compare
Contributor
Unlighthouse Performance Comparison — VercelComparing PR preview deployment Unlighthouse scores vs production Unlighthouse scores. Summary ScoreAggregate score across all categories as reported by Unlighthouse.
Category Scores
Core Web Vitals
|
rtalvarez
approved these changes
Sep 30, 2026
bc-yevhenii-buliuk
approved these changes
Sep 30, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear: LTRAC-2085
What/Why?
The cart shipping estimator didn't update after its own actions. After "View shipping options", "Add shipping", or a quantity change, the new options or selection only appeared after a full page reload.
Root cause:
ShippingFormseeds itsuseActionStateanduseStatefrom props once.updateShippingInforeturnsprevState, so the new address, quote, and selection never reach the form. The server re-render sends fresh props, but the mounted form ignores them.Fix: key
ShippingFormon the server's shipping state (address, options, selected option,showShippingForm). The form remounts only when that state actually changes. A failed action leaves it in place, so validation errors still show.E2E impact: the shipping specs wrapped every step in
try { expect } catch { reload }(the oldCATALYST-1685TODOs). That hid the bug, and each step burned a 5s wait first.Updating cart quantity … new quotewas hitting its 30s timeout on every attempt, which keptE2E Functional Tests (default)red on every PR. This PR removes the fallbacks, so the specs now assert the real behavior.This is one piece of LTRAC-2085. The other flaky
defaultfailures (account wishlists/addresses, etc.) are not addressed here.Testing
Run locally against the E2E test store (
next build+next start, chromium,--retries=0):shipping.spec.tspassed 3/3, then 9/9 with--repeat-each=3. The quantity test takes ~12s, down from ~30s (timeout).client.tsxreverted): 3/3 fail. Each one seesgetByLabel('Shipping options')stay hidden right after "View shipping options".Migration
In
core/vibes/soul/sections/cart/client.tsx, add akeytoShippingForm. See the changeset for the snippet.🤖 Generated with Claude Code