Skip to content

fix(core): CATALYST-1579 Replace checkout redirect server action with /checkout route#2680

Merged
jordanarldt merged 1 commit intocanaryfrom
ja/CATALYST-1579
Nov 11, 2025
Merged

fix(core): CATALYST-1579 Replace checkout redirect server action with /checkout route#2680
jordanarldt merged 1 commit intocanaryfrom
ja/CATALYST-1579

Conversation

@jordanarldt
Copy link
Copy Markdown
Contributor

@jordanarldt jordanarldt commented Nov 11, 2025

What/Why?

We found that the redirectToCheckout server 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 /checkout route 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

  1. Remove core/app/[locale]/(default)/cart/_actions/redirect-to-checkout.ts
  2. Update checkoutAction in core/app/[locale]/(default)/cart/page.tsx to "/checkout"
  3. Copy changes to core/app/[locale]/(default)/checkout/route.ts
  4. Update core/lib/server-toast.ts and set the cookie maxAge to 1 - this ensures any toast errors live through the redirect back to the /cart page
  5. Copy changes in core/vibes/soul/sections/cart/client.tsx
  6. Update en.json with the updated translation values (optional)

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Nov 11, 2025

⚠️ No Changeset found

Latest commit: 8e167ba

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
catalyst-b2b Ready Ready Preview Comment Nov 11, 2025 7:20pm
catalyst-canary Ready Ready Preview Comment Nov 11, 2025 7:20pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
catalyst Ignored Ignored Nov 11, 2025 7:20pm

@jordanarldt jordanarldt added this pull request to the merge queue Nov 11, 2025
Merged via the queue into canary with commit 0b2c30d Nov 11, 2025
12 checks passed
@jordanarldt jordanarldt deleted the ja/CATALYST-1579 branch November 11, 2025 21:28
jamesqquick pushed a commit that referenced this pull request Feb 11, 2026
chanceaclark pushed a commit that referenced this pull request Apr 27, 2026
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