diff --git a/desktop/src/components/AgentOnboardingWizard.tsx b/desktop/src/components/AgentOnboardingWizard.tsx index 1c7dfa1..c65c05c 100644 --- a/desktop/src/components/AgentOnboardingWizard.tsx +++ b/desktop/src/components/AgentOnboardingWizard.tsx @@ -192,7 +192,12 @@ export function AgentOnboardingWizard({ isOpen, onClose, onSuccess }: AgentOnboa // Navigate to next step const nextStep = () => { if (validateStep(currentStep)) { - setCurrentStep((prev) => Math.min(prev + 1, steps.length)); + // On the last step, trigger submit instead of navigating past it + if (currentStep === steps.length - 1) { + handleSubmit(); + } else { + setCurrentStep((prev) => prev + 1); + } } }; @@ -290,7 +295,8 @@ export function AgentOnboardingWizard({ isOpen, onClose, onSuccess }: AgentOnboa } else { setSubmitStatus('error'); } - } catch { + } catch (err) { + log.error('Agent creation failed:', err); setSubmitStatus('error'); } }; @@ -723,7 +729,7 @@ export function AgentOnboardingWizard({ isOpen, onClose, onSuccess }: AgentOnboa
- {currentStep < steps.length ? ( + {currentStep < steps.length - 1 ? (