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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user