From c7ee5ce2693c82cafb2c8b18b382e1d4e332ffdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= <35082514+alezmad@users.noreply.github.com> Date: Sun, 22 Feb 2026 23:48:38 +0000 Subject: [PATCH] feat: enable PostHog session replay and fix checkout origin fallback - Enable session recording in PostHog provider (was disabled by default) - Add origin URL fallback in checkout route to prevent Stripe "Not a valid URL" error - Refactor logo component to extract LogoIcon and add color scheme support - Add .moat/ to gitignore Co-Authored-By: Claude Opus 4.6 --- .gitignore | 3 + .../src/app/api/blueprint/checkout/route.ts | 2 +- .../web/src/modules/common/whyrating-logo.tsx | 130 ++++++++---------- .../web/src/providers/posthog/index.tsx | 2 +- 4 files changed, 64 insertions(+), 73 deletions(-) diff --git a/.gitignore b/.gitignore index 9635231..937521f 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,6 @@ dist/ # Auto Claude data directory .auto-claude/ + +# Moat task system +.moat/ diff --git a/apps/web/src/app/api/blueprint/checkout/route.ts b/apps/web/src/app/api/blueprint/checkout/route.ts index 44b4a76..2a7ffea 100644 --- a/apps/web/src/app/api/blueprint/checkout/route.ts +++ b/apps/web/src/app/api/blueprint/checkout/route.ts @@ -31,7 +31,7 @@ export async function POST(request: NextRequest) { } const stripe = getStripe(); - const origin = request.headers.get("origin") || ""; + const origin = request.headers.get("origin") || process.env.NEXT_PUBLIC_URL || "http://localhost:3000"; const lang = locale || "en"; const session = await stripe.checkout.sessions.create({ diff --git a/apps/web/src/modules/common/whyrating-logo.tsx b/apps/web/src/modules/common/whyrating-logo.tsx index 6213237..45ca362 100644 --- a/apps/web/src/modules/common/whyrating-logo.tsx +++ b/apps/web/src/modules/common/whyrating-logo.tsx @@ -3,90 +3,78 @@ import { cn } from "@turbostarter/ui"; interface WhyRatingLogoProps { className?: string; iconClassName?: string; + wordmarkClassName?: string; showWordmark?: boolean; + colorScheme?: "light" | "dark"; +} + +function LogoIcon({ className }: { className?: string }) { + return ( + + + + + + + + + + + + + + + + + + + + ); } export function WhyRatingLogo({ className, iconClassName, + wordmarkClassName, showWordmark = true, + colorScheme = "light", }: WhyRatingLogoProps) { + const isDark = colorScheme === "dark"; + return (
- - - - - - - - - - - - - - - - - - - + {showWordmark && ( - - whyrating.com + + whyrating.com )}
); } + +export { LogoIcon }; diff --git a/packages/analytics/web/src/providers/posthog/index.tsx b/packages/analytics/web/src/providers/posthog/index.tsx index 8ad1701..7314ab2 100644 --- a/packages/analytics/web/src/providers/posthog/index.tsx +++ b/packages/analytics/web/src/providers/posthog/index.tsx @@ -27,7 +27,7 @@ if (typeof window !== "undefined" && isValidPosthogConfig) { person_profiles: "always", capture_pageview: false, disable_external_dependency_loading: true, - disable_session_recording: true, + disable_session_recording: false, }); }