perf: render pricing as server shell with client CTA islands#108
perf: render pricing as server shell with client CTA islands#108charlesrhoward merged 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ee6e91f to
61301fd
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61301fd125
ℹ️ 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".
| </span> | ||
| </button> | ||
| )} | ||
| <PricingPlanAction plan="pro" /> |
There was a problem hiding this comment.
Share auth state across plan action islands
Rendering PricingPlanAction for both cards means useAuth() runs twice on /pricing, and each instance performs supabase.auth.getUser() plus its own onAuthStateChange subscription and profile/subscription fetches. This introduces duplicated auth traffic and listeners for every page view (a regression from the previous single hook instance), which can delay CTA state resolution on slower clients; consider lifting auth state to one parent island and passing it down.
Useful? React with 👍 / 👎.
61301fd to
71ec64a
Compare
27d030f to
a1ee4b9
Compare
Summary\n- moved /pricing static content to a server component\n- extracted auth-aware CTA logic into small client components\n- replaced client FAQ state with native details/summary and kept canceled checkout notice as tiny client island\n\n## Validation\n- pnpm lint\n- pnpm build\n\nCloses #99
Note
Medium Risk
Touches pricing upgrade/downgrade UX and Stripe redirect flows (now moved into a new component), so regressions could affect conversions or subscription management, though the underlying API endpoints are unchanged.
Overview
Renders the
/pricingpage as a server component by removing client-only auth/queryparam state and the page-level Suspense loader, keeping interactivity in small client “islands”.Extracts subscription CTA logic (login gating, Stripe checkout/portal redirects, loading states, and
LoginDialog) into a reusablePricingPlanActioncomponent for both Free/Pro cards, and moves the canceled-checkout queryparam notice into a tinyPricingCancelNoticeclient component rendered viaSuspense.Replaces FAQ open/close React state with native
details/summaryfor simpler, more SSR-friendly behavior, and simplifies the Pro card background effect (removes mouse-following glow).Written by Cursor Bugbot for commit a1ee4b9. This will update automatically on new commits. Configure here.