Repository navigation
Route Get Pro directly to Stripe checkout - #8813
Conversation
📝 WalkthroughWalkthroughPro pricing CTAs now always use the billing checkout endpoint. The checkout feature flag and fallback routing are removed, documentation is updated, and a component test verifies the checkout link output. ChangesPro checkout routing
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 warning, 2 inconclusive)
✅ Passed checks (22 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR completes the Stripe checkout rollout by retiring the
Confidence Score: 5/5Safe to merge — the change is a straightforward flag retirement with no remaining branches dependent on the removed logic. Every changed file is consistent and purposeful: the flag evaluation is fully deleted, the retired-flags blocklist is updated, docs and the billing skill are kept in sync, and the new regression test pins the pre-hydration href to the checkout URL. TypeScript would catch any callers that still pass the removed fallbackHref prop, and CI lint would catch any attempt to reuse the retired flag key. No code paths were left partially wired. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User clicks Get Pro CTA] --> B[ProCtaLink onClick]
B --> C[posthog.capture checkout=true]
C --> D{useCheckoutRedirect.start}
D -- href starts with /api/billing/checkout --> E[preventDefault]
E --> F[fetch /api/billing/checkout?format=json]
F -- success --> G[window.location.assign Stripe URL]
F -- network failure --> H[window.location.assign fallback route]
H --> I[Server-side 302 to Stripe]
style A fill:#f0f0f0
style G fill:#d4edda
style I fill:#d4edda
Reviews (1): Last reviewed commit: "route Pro pricing CTA directly to checko..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/tests/pro-cta-link.test.tsx`:
- Around line 15-28: Add a client-side test for ProCtaLink that mocks the
redirect hook, simulates clicking the CTA, and asserts start is called with
checkoutHref and the click event, along with the unconditional checkout
analytics event. Keep the existing renderToStaticMarkup href assertions
unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 2f7e5cb0-a0d7-4fa2-a7d8-ba769e93fc3b
📒 Files selected for processing (7)
docs/pro-badge-options.htmlscripts/retired-feature-flags.txtskills/cmux-billing/SKILL.mdweb/app/[locale]/components/pro-cta-link.tsxweb/app/[locale]/pricing/page.tsxweb/app/lib/feature-flags.tsweb/tests/pro-cta-link.test.tsx
💤 Files with no reviewable changes (1)
- web/app/lib/feature-flags.ts
Summary
Testing
cd web && bun test tests/pro-cta-link.test.tsx tests/checkout-navigation.test.tsx tests/pricing-page.test.tsx tests/app-pricing-page.test.tsx tests/billing-checkout-route.test.tscd web && bun run typecheckpython3 scripts/lint-feature-flags.pyIssues
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Route all public Get Pro CTAs directly to Stripe Checkout and remove the rollout flag and download fallback for a consistent upgrade flow. Adds a server-rendered regression test to cover pre-hydration clicks.
/api/billing/checkout; remove the download confirmation fallback.pro-checkout-enabled-releaseflag and add it toscripts/retired-feature-flags.txt.ProCtaLinkto always start the checkout redirect and capturecheckout: true.Written for commit ef42016. Summary will update on new commits.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation