Skip to content

Conversation

@github-actions
Copy link
Contributor

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.

* feat(stripe): add Stripe integration with auto-approval for internal team

* chore: merge main into it

* fix(upgrade): harden stripe domain auto-approval

* chore(posthog): update getPostHogClient to return a Promise and await client calls

* refactor(posthog): simplify client calls by removing async/await

* fix(stripe): require exact domain match for customer lookup

---------

Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>
@vercel
Copy link

vercel bot commented Dec 22, 2025

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

Project Deployment Review Updated (UTC)
app (staging) Ready Ready Preview, Comment Dec 22, 2025 9:39pm
portal (staging) Ready Ready Preview, Comment Dec 22, 2025 9:39pm

@cursor
Copy link

cursor bot commented Dec 22, 2025

PR Summary

Adds Stripe-based domain checks to auto-approve org access and an internal-only onboarding fast-path, with env and dependency updates.

Stripe-backed domain auto-approval and internal onboarding fast-path

  • Adds lib/stripe.ts with extractDomain, isPublicEmailDomain, findStripeCustomerByDomain, and isDomainActiveStripeCustomer to detect active Stripe customers by email/website domain
  • Updates upgrade/[orgId]/page.tsx to auto-set hasAccess when the user is internal (trycomp.ai) or their email domain matches the org website and has an active Stripe subscription
  • Introduces internal-only onboarding bypass: shows Complete action when NODE_ENV !== 'production' or user email ends with @trycomp.ai
  • Extends env config to include STRIPE_SECRET_KEY; adds stripe dependency; removes "use server" from posthog.ts

Written by Cursor Bugbot for commit da9bab9. This will update automatically on new commits. Configure here.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@graphite-app
Copy link

graphite-app bot commented Dec 22, 2025

Graphite Automations

"Auto-assign PRs to Author" took an action on this PR • (12/22/25)

1 reviewer was added to this PR based on Mariano Fuentes's automation.

@Marfuen Marfuen merged commit f232d73 into release Dec 22, 2025
12 of 16 checks passed
const canSkipOnboarding = useMemo(() => {
if (!userEmail) return false;
return userEmail.endsWith('@trycomp.ai');
}, [userEmail]);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Case-sensitive mismatch in internal team email checks

The canSkipOnboarding check uses userEmail.endsWith('@trycomp.ai') which is case-sensitive, while the upgrade page's isTrycompEmail check uses extractDomain which lowercases the email domain before comparison. For an email like User@TryComp.AI, the upgrade page would auto-approve the organization (domain becomes trycomp.ai), but the onboarding page would not show the skip button (case-sensitive endsWith fails). This creates inconsistent behavior for the same internal team feature.

Additional Locations (1)

Fix in Cursor Fix in Web

@claudfuen
Copy link
Contributor

🎉 This PR is included in version 1.72.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants