From 83c90db261922de6d8bfc434be22850869fb1cd5 Mon Sep 17 00:00:00 2001
From: Neil <4138956+nwparker@users.noreply.github.com>
Date: Sat, 23 May 2026 21:44:46 -0700
Subject: [PATCH] Fix onboarding rerun project continuation (#2735)
---
.../components/onboarding/OnboardingFlow.tsx | 29 ++++++++++++---
.../components/onboarding/RepoStep.test.tsx | 36 +++++++++++++++++++
.../onboarding/use-onboarding-flow.ts | 35 ++++++++++++++++++
3 files changed, 96 insertions(+), 4 deletions(-)
create mode 100644 src/renderer/src/components/onboarding/RepoStep.test.tsx
diff --git a/src/renderer/src/components/onboarding/OnboardingFlow.tsx b/src/renderer/src/components/onboarding/OnboardingFlow.tsx
index b7f9484fe..0dc7738fb 100644
--- a/src/renderer/src/components/onboarding/OnboardingFlow.tsx
+++ b/src/renderer/src/components/onboarding/OnboardingFlow.tsx
@@ -84,7 +84,12 @@ export default function OnboardingFlow({
const shouldShowSkipToProjectSetup = currentStep.id !== 'repo' && currentStep.id !== 'tour'
const shouldShowStepHeading = !isTourStep
const footerPrimaryLabel = isTourStep ? 'Skip the tour' : primaryActionLabel
- const { next: flowNext, openFolder: flowOpenFolder, skipTourToRepo: flowSkipTourToRepo } = flow
+ const {
+ next: flowNext,
+ openFolder: flowOpenFolder,
+ continueWithExistingProject: flowContinueWithExistingProject,
+ skipTourToRepo: flowSkipTourToRepo
+ } = flow
// Why: depend on stable callbacks + step id only so the listener doesn't
// re-bind on every render of the parent (flow object identity changes).
useEffect(() => {
@@ -110,14 +115,26 @@ export default function OnboardingFlow({
return
}
if (currentStep.id === 'repo') {
- void flowOpenFolder()
+ if (flow.hasExistingProject) {
+ void flowContinueWithExistingProject('keyboard')
+ } else {
+ void flowOpenFolder()
+ }
} else {
void flowNext('keyboard')
}
}
window.addEventListener('keydown', onKeyDown, { capture: true })
return () => window.removeEventListener('keydown', onKeyDown, { capture: true })
- }, [currentStep.id, flowNext, flowOpenFolder, flowSkipTourToRepo, tourStarted])
+ }, [
+ currentStep.id,
+ flow.hasExistingProject,
+ flowContinueWithExistingProject,
+ flowNext,
+ flowOpenFolder,
+ flowSkipTourToRepo,
+ tourStarted
+ ])
return (
)}
- {currentStep.id !== 'repo' && (
+ {(currentStep.id !== 'repo' || flow.hasExistingProject) && (