From 0a1f509e3f4bb5caa946c90368946199d1c84f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LAGACHE?= Date: Fri, 19 Jun 2026 13:43:14 +0200 Subject: [PATCH] fix(onboarding): skip intermediate agent steps when going back from project-create to agent-create --- src/features/onboarding/onboarding-shell.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/features/onboarding/onboarding-shell.tsx b/src/features/onboarding/onboarding-shell.tsx index 14a59a03..74a9964a 100644 --- a/src/features/onboarding/onboarding-shell.tsx +++ b/src/features/onboarding/onboarding-shell.tsx @@ -10,7 +10,7 @@ import { AuthLogoSection } from "../auth/auth-logo-section"; import { STEP_ORDER } from "@/features/onboarding/constants/steps"; export const OnboardingShell = () => { - const { state, previous, skip, next, renderStep } = useOnboarding(); + const { state, previous, skip, next, goToStep, renderStep } = useOnboarding(); const currentStepId = String(state?.currentStep?.id ?? ""); const currentIndex = STEP_ORDER.indexOf(currentStepId); @@ -28,7 +28,6 @@ export const OnboardingShell = () => { const isGoingBack = currentIndex < latestIndex; - // Steps that are one-way: disable Back both when ON them and when they'd be the destination const BLOCKED_STEPS = ["login", "account-info", "security"]; const prevStepId = STEP_ORDER[currentIndex - 1] ?? ""; const canGoBack = @@ -47,7 +46,13 @@ export const OnboardingShell = () => {