Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions apps/code/src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 (
<motion.div key="onboarding" initial={{ opacity: 1 }}>
<OnboardingFlow />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,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",
Expand All @@ -61,6 +65,12 @@ export function OnboardingFlow() {
}
};

const handleSkip = () => {
completeOnboarding();
completeSetup();
navigateToTaskInput();
};

const footerRight = (
<Flex gap="5">
{isAuthenticated && (
Expand All @@ -83,7 +93,7 @@ export function OnboardingFlow() {
size="1"
variant="ghost"
color="gray"
onClick={handleComplete}
onClick={handleSkip}
className="opacity-50"
>
<ArrowRight size={14} weight="bold" />
Expand Down
Loading