improvement(landing): rebrand to AI workspace, add auth modal, harden PostHog tracking#4116
improvement(landing): rebrand to AI workspace, add auth modal, harden PostHog tracking#4116waleedlatif1 merged 13 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Introduces an Hardens and expands PostHog tracking by switching page-view events to Reviewed by Cursor Bugbot for commit 7151e98. Configure here. |
- Fix auth modal race condition: show loading state instead of redirecting when provider status hasn't loaded yet - Fix auth modal HTTP error caching: reject non-200 responses so they aren't permanently cached - Replace <img> with next/image <Image> in auth modal - Use cn() instead of template literal class concatenation in hero, footer-cta - Remove commented-out dead code in footer, landing, sitemap - Remove unused arrow property from FooterItem interface - Convert relative imports to absolute in integrations/[slug]/page - Remove no-op sanitizedName variable in signup form - Remove unnecessary async from llms-full.txt route - Remove extraneous non-TSDoc comment in auth modal Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- auth-modal: add @sim/logger, log social sign-in errors instead of swallowing silently - auth-modal: extract duplicated social button classes into SOCIAL_BTN constant - auth-modal: remove unused isProduction from ProviderStatus interface - auth-modal: memoize getBrandConfig() call - footer: remove stale arrow destructuring left after interface cleanup, use cn() throughout - footer-cta: replace inline styles on submit button with Tailwind classes via cn() - footer-cta: replace caretColor inline style with caret-white utility - templates: fix incorrect section value 'landing_preview' → 'templates' for PostHog tracking - events: add 'templates' to landing_cta_clicked section union - integrations: replace "canvas" with "workflow builder" per constitution rules - llms-full: replace "canvas" terminology with "visual builder"/"workflow builder" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These docs pages don't exist yet — link to docs.sim.ai until they are published. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
Greptile SummaryThis PR rebrands all user-facing copy across the landing pages and docs from "workflow tool / automation platform" to "AI workspace", adds an inline
Confidence Score: 5/5Safe to merge — no functional regressions; both remaining findings are analytics edge-case P2s that do not affect the auth flow itself The auth modal handles the previously-flagged race condition and isProduction leak correctly. All CTA tracking, provider detection, and redirect logic is sound. The two P2 comments concern analytics accuracy in narrow edge cases (modal opened before fetch resolves + registrationDisabled, and destination label when no social providers are configured) — neither blocks correct user authentication. apps/sim/app/(landing)/components/auth-modal/auth-modal.tsx — minor analytics timing issues around auth_modal_opened event and hasModalContent logic Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant CTA as CTA Button (onClick)
participant Modal as AuthModal (onOpenChange)
participant API as /api/auth/providers
participant PH as PostHog
User->>CTA: click
CTA->>PH: landing_cta_clicked { destination: 'auth_modal' }
CTA->>Modal: handleOpenChange(true)
alt providerStatus already loaded AND !hasModalContent
Modal->>User: router.push('/login' or '/signup')
else providerStatus loaded AND hasModalContent
Modal->>PH: auth_modal_opened { view, source }
Modal->>User: show social/SSO buttons
else providerStatus === null (still fetching)
Modal->>PH: auth_modal_opened { view: defaultView, source }
Modal->>User: show spinner
API-->>Modal: { githubAvailable, googleAvailable, registrationDisabled }
alt hasModalContent
Modal->>User: show social/SSO buttons
Note over Modal: if registrationDisabled and view=signup setView('login')
else !hasModalContent
Modal->>User: router.push('/login' or '/signup')
end
end
User->>Modal: click social button
Modal->>Modal: client.signIn.social({ provider, callbackURL: '/workspace' })
Modal->>User: redirect to /workspace
Reviews (3): Last reviewed commit: "fix(landing): prevent mobile auth modal ..." | Re-trigger Greptile |
Remove "workflows" from the non-tagged blog meta description to align with the AI workspace rebrand across the rest of the PR. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…te-resolve redirect - Destructure only githubAvailable/googleAvailable from getOAuthProviderStatus so isProduction is not leaked to unauthenticated callers. - Add useEffect to redirect away from the modal if provider status resolves after the modal is already open and no social providers are configured. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SSO button when NEXT_PUBLIC_SSO_ENABLED is set - Gate "Continue with email" behind EMAIL_PASSWORD_SIGNUP_ENABLED - Expose registrationDisabled from /api/auth/providers and hide the "Sign up" toggle when registration is disabled - Simplify skip-modal logic: redirect to full page when no social providers or SSO are available (hasModalContent) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a CTA passes defaultView='signup' but registration is disabled, the modal now opens in login mode instead of showing "Create free account" with social buttons that would fail on the backend. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@cursor review |
|
@greptile |
When the user opens the modal before providerStatus resolves and registrationDisabled comes back true, the view was stuck on 'signup'. Now the late-resolve useEffect also forces the view to 'login'. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Create IntegrationCtaButton client component that wraps AuthModal and fires trackLandingCta on click, matching the pattern used by every other landing section CTA. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
Remove setMobileMenuOpen(false) from mobile AuthModal button onClick handlers. Closing the mobile menu unmounts the AuthModal before it can open. The modal overlay or page redirect makes the menu irrelevant without needing to explicitly close it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 7151e98. Configure here.
Summary
llms.txt,robots.txt,sitemap.ts, andmanifest.tsto reflect the new positioningAuthModal) for social login on landing CTAs — users can sign in with GitHub/Google without leaving the page; falls back to/loginor/signupwhen social providers aren't available/api/auth/providersroute to power the auth modal's provider detectionusePostHog()+useEffect([posthog])pattern withcaptureClientEvent(fires exactly once on mount); tightenlanding_cta_clicked.destinationfrom barestringto an autocomplete-friendly union type; addauth_modal_openedevent; add CTA tracking to templates and integration pages.claude/rules/constitution.md,.cursor/rules/constitution.mdc) codifying language and positioning guidelines for AI-assisted copy editingType of Change
Testing
tsc --noEmit)Checklist