From 6e6041bb5b086daf9fda8e4557b18aa42cf81f1d Mon Sep 17 00:00:00 2001 From: Timo Knuth Date: Mon, 6 Jul 2026 13:05:25 +0200 Subject: [PATCH] =?UTF-8?q?feat(app):=20remove=20hard-paywall=20redirect?= =?UTF-8?q?=20=E2=80=94=20signed-in=20free=20users=20reach=20the=20app?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- app/_layout.tsx | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/app/_layout.tsx b/app/_layout.tsx index d188864..d11595c 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -96,11 +96,8 @@ function RootLayoutInner() { colorPalette, signOut, session, - billingSummary, - isActivatingEntitlement, isInitializing, isLoadingPlants, - isLoadingBilling, } = useApp(); const colors = useColors(isDarkMode, colorPalette); const pathname = usePathname(); @@ -118,19 +115,11 @@ function RootLayoutInner() { }, [signOut]); const isAppReady = installCheckDone && !isInitializing && !isLoadingPlants; - const hasActiveEntitlement = isActivatingEntitlement - || (billingSummary?.entitlement?.plan === 'pro' - && billingSummary?.entitlement?.status === 'active'); const isAllowedWithoutSession = pathname.includes('onboarding') || pathname.includes('auth/') || pathname.includes('scanner') || isShareIntentCallbackPath(pathname) || pathname.includes('profile/billing'); - const isAllowedWithoutEntitlement = pathname.includes('auth/') - || pathname.includes('onboarding') - || pathname.includes('scanner') - || isShareIntentCallbackPath(pathname) - || pathname.includes('profile/billing'); let content = null; @@ -148,10 +137,12 @@ function RootLayoutInner() { }} > + + ); } - } else if (!hasActiveEntitlement && !isLoadingBilling && billingSummary && !isAllowedWithoutEntitlement) { - // Signed-in but confirmed non-pro: send to the paywall, not back to - // onboarding — bouncing a logged-in user to onboarding looks like an - // app restart. billingSummary === null means "unknown" (fetch failed), - // never redirect on unknown. - content = ; } else { content = ( <> @@ -182,10 +167,12 @@ function RootLayoutInner() { }} > + +