From d9fa4534809b00cdef1d6420a6bea0772939fac7 Mon Sep 17 00:00:00 2001 From: PostHog Code Date: Thu, 7 May 2026 11:49:53 +0000 Subject: [PATCH 1/2] fix: make Skip setup button actually skip onboarding and setup The button previously called navigateToSetup() (sending the user *to* the setup view) and never marked setup complete or set a directory, so App.tsx fell back to OnboardingFlow because of the !selectedDirectory guard. The guard existed solely to paper over this broken state. Wire the button to a dedicated handleSkip that completes onboarding + setup and routes to task-input, drop the App.tsx guard, and show the button in production as well as dev. TaskInput already handles an empty selectedDirectory via mostRecentRepo. Generated-By: PostHog Code Task-Id: c5a0b893-61f1-40a5-8f84-8d93c1ad2dba --- apps/code/src/renderer/App.tsx | 8 +---- .../onboarding/components/OnboardingFlow.tsx | 33 +++++++++++-------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/apps/code/src/renderer/App.tsx b/apps/code/src/renderer/App.tsx index a3eea63c7..a5f399743 100644 --- a/apps/code/src/renderer/App.tsx +++ b/apps/code/src/renderer/App.tsx @@ -40,9 +40,6 @@ function App() { const hasCompletedOnboarding = useOnboardingStore( (state) => state.hasCompletedOnboarding, ); - const selectedDirectory = useOnboardingStore( - (state) => state.selectedDirectory, - ); const isAuthenticated = authState.status === "authenticated"; const hasCodeAccess = authState.hasCodeAccess; const isDarkMode = useThemeStore((state) => state.isDarkMode); @@ -217,11 +214,8 @@ function App() { } // Rendering: onboarding (includes auth + invite code gate) → main app - // We also route to onboarding when no directory is selected — without one, the - // main app has nothing meaningful to show (the dev "Skip setup" button can - // produce this state by flipping hasCompletedOnboarding without picking a directory). const renderContent = () => { - if (!hasCompletedOnboarding || !selectedDirectory) { + if (!hasCompletedOnboarding) { return ( diff --git a/apps/code/src/renderer/features/onboarding/components/OnboardingFlow.tsx b/apps/code/src/renderer/features/onboarding/components/OnboardingFlow.tsx index 868af1b1b..f17e4c6d7 100644 --- a/apps/code/src/renderer/features/onboarding/components/OnboardingFlow.tsx +++ b/apps/code/src/renderer/features/onboarding/components/OnboardingFlow.tsx @@ -4,7 +4,6 @@ import { useAuthStateValue } from "@features/auth/hooks/authQueries"; import { useOnboardingStore } from "@features/onboarding/stores/onboardingStore"; import { ArrowRight, SignOut } from "@phosphor-icons/react"; import { Button, Flex } from "@radix-ui/themes"; -import { IS_DEV } from "@shared/constants/environment"; import { useNavigationStore } from "@stores/navigationStore"; import { AnimatePresence, LayoutGroup, motion } from "framer-motion"; import { useHotkeys } from "react-hotkeys-hook"; @@ -40,11 +39,15 @@ export function OnboardingFlow() { const completeOnboarding = useOnboardingStore( (state) => state.completeOnboarding, ); + const completeSetup = useOnboardingStore((state) => state.completeSetup); const hasCompletedSetup = useOnboardingStore( (state) => state.hasCompletedSetup, ); const resetOnboarding = useOnboardingStore((state) => state.resetOnboarding); const navigateToSetup = useNavigationStore((state) => state.navigateToSetup); + const navigateToTaskInput = useNavigationStore( + (state) => state.navigateToTaskInput, + ); const logoutMutation = useLogoutMutation(); const isAuthenticated = useAuthStateValue( (state) => state.status === "authenticated", @@ -61,6 +64,12 @@ export function OnboardingFlow() { } }; + const handleSkip = () => { + completeOnboarding(); + completeSetup(); + navigateToTaskInput(); + }; + const footerRight = ( {isAuthenticated && ( @@ -78,18 +87,16 @@ export function OnboardingFlow() { Log out )} - {IS_DEV && ( - - )} + ); From d28b2fd1bf41ab67455776bb6d5f102dac16b03d Mon Sep 17 00:00:00 2001 From: PostHog Code Date: Thu, 7 May 2026 11:58:42 +0000 Subject: [PATCH 2/2] fix: keep Skip setup button gated to dev only Generated-By: PostHog Code Task-Id: c5a0b893-61f1-40a5-8f84-8d93c1ad2dba --- .../onboarding/components/OnboardingFlow.tsx | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/apps/code/src/renderer/features/onboarding/components/OnboardingFlow.tsx b/apps/code/src/renderer/features/onboarding/components/OnboardingFlow.tsx index f17e4c6d7..8c7fb2ca9 100644 --- a/apps/code/src/renderer/features/onboarding/components/OnboardingFlow.tsx +++ b/apps/code/src/renderer/features/onboarding/components/OnboardingFlow.tsx @@ -4,6 +4,7 @@ import { useAuthStateValue } from "@features/auth/hooks/authQueries"; import { useOnboardingStore } from "@features/onboarding/stores/onboardingStore"; import { ArrowRight, SignOut } from "@phosphor-icons/react"; import { Button, Flex } from "@radix-ui/themes"; +import { IS_DEV } from "@shared/constants/environment"; import { useNavigationStore } from "@stores/navigationStore"; import { AnimatePresence, LayoutGroup, motion } from "framer-motion"; import { useHotkeys } from "react-hotkeys-hook"; @@ -87,16 +88,18 @@ export function OnboardingFlow() { Log out )} - + {IS_DEV && ( + + )} );