fix(core): CATALYST-1579 Replace checkout redirect server action with /checkout route#2680
Merged
jordanarldt merged 1 commit intocanaryfrom Nov 11, 2025
Merged
fix(core): CATALYST-1579 Replace checkout redirect server action with /checkout route#2680jordanarldt merged 1 commit intocanaryfrom
jordanarldt merged 1 commit intocanaryfrom
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
jorgemoya
approved these changes
Nov 11, 2025
jamesqquick
pushed a commit
that referenced
this pull request
Feb 11, 2026
… /checkout route (#2680)
chanceaclark
pushed a commit
that referenced
this pull request
Apr 27, 2026
… /checkout route (#2680)
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.
What/Why?
We found that the
redirectToCheckoutserver action was a bit unnecessary, as it was simply checking if the cart exists before redirecting to/checkout, which would also then check the cart and redirect to the checkout route.By removing the server action and updating the checkout button to simply
GET /checkout, we're skipping an unnecessary step which should improve performance by a bit.Additionally, I updated the translations to return better user-facing errors instead of mentioning a cart cookie, and also updated the
/checkoutroute to return toast messages on errors.Testing
Manual testing locally
Before change - proceed to checkout takes several seconds
before_change.mov
After change - proceed to checkout takes about 1 second
after_change.mov
Migration
core/app/[locale]/(default)/cart/_actions/redirect-to-checkout.tscheckoutActionincore/app/[locale]/(default)/cart/page.tsxto"/checkout"core/app/[locale]/(default)/checkout/route.tscore/lib/server-toast.tsand set the cookiemaxAgeto1- this ensures any toast errors live through the redirect back to the/cartpagecore/vibes/soul/sections/cart/client.tsxen.jsonwith the updated translation values (optional)