refactor: Update GraphitiStep to proceed to the next step after successful configuration save

- Changed behavior to call onNext() immediately after a successful save of the Graphiti configuration, enhancing user experience by streamlining the onboarding process.
- Removed the previous setSuccess() call to avoid confusion regarding the step transition.
- Remove task creation from onboarding
This commit is contained in:
AndyMik90
2025-12-15 19:31:04 +01:00
parent 39dc91a12c
commit a5a1eb1431
2 changed files with 3 additions and 13 deletions
@@ -178,7 +178,8 @@ export function GraphitiStep({ onNext, onBack, onSkip }: GraphitiStepProps) {
if (result?.success) {
// Update local settings store
updateSettings({ globalOpenAIApiKey: config.openAiApiKey.trim() });
setSuccess(true);
// Proceed to next step immediately after successful save
onNext();
} else {
setError(result?.error || 'Failed to save Graphiti configuration');
}
@@ -13,7 +13,6 @@ import { WizardProgress, WizardStep } from './WizardProgress';
import { WelcomeStep } from './WelcomeStep';
import { OAuthStep } from './OAuthStep';
import { GraphitiStep } from './GraphitiStep';
import { FirstSpecStep } from './FirstSpecStep';
import { CompletionStep } from './CompletionStep';
import { useSettingsStore } from '../../stores/settings-store';
@@ -25,14 +24,13 @@ interface OnboardingWizardProps {
}
// Wizard step identifiers
type WizardStepId = 'welcome' | 'oauth' | 'graphiti' | 'first-spec' | 'completion';
type WizardStepId = 'welcome' | 'oauth' | 'graphiti' | 'completion';
// Step configuration
const WIZARD_STEPS: { id: WizardStepId; label: string }[] = [
{ id: 'welcome', label: 'Welcome' },
{ id: 'oauth', label: 'Auth' },
{ id: 'graphiti', label: 'Memory' },
{ id: 'first-spec', label: 'First Task' },
{ id: 'completion', label: 'Done' }
];
@@ -147,15 +145,6 @@ export function OnboardingWizard({
onSkip={skipWizard}
/>
);
case 'first-spec':
return (
<FirstSpecStep
onNext={goToNextStep}
onBack={goToPreviousStep}
onSkip={skipWizard}
onOpenTaskCreator={handleOpenTaskCreator}
/>
);
case 'completion':
return (
<CompletionStep