The open-source app everyone uses to manage agents at work
TypeScript acpxagent-orchestrationagent-skillsagentic-aiai-agentsai-engineeringai-governanceai-toolsautonomous-agentsclaudeclaude-codeclaude-skillscodexhermesllmmcpmulti-agentopenclawproject-managementworkflow-automation
Fix onboarding step reset after company creation
Dotta313a4aa36a52
diff --git a/ui/src/components/OnboardingWizard.tsx b/ui/src/components/OnboardingWizard.tsxindex b7c49f5331..45b077625a 100644--- a/ui/src/components/OnboardingWizard.tsx+++ b/ui/src/components/OnboardingWizard.tsx@@ -84,18 +84,23 @@ export function OnboardingWizard() {const [createdAgentId, setCreatedAgentId] = useState<string | null>(null);const [createdIssueRef, setCreatedIssueRef] = useState<string | null>(null);- // Sync step and company when onboarding opens with options+ // Sync step and company when onboarding opens with options.+ // Keep this independent from company-list refreshes so Step 1 completion+ // doesn't get reset after creating a company.useEffect(() => {- if (onboardingOpen) {- const cId = onboardingOptions.companyId ?? null;- setStep(onboardingOptions.initialStep ?? 1);- setCreatedCompanyId(cId);- if (cId) {- const company = companies.find((c) => c.id === cId);- if (company) setCreatedCompanyPrefix(company.issuePrefix);- }- }- }, [onboardingOpen, onboardingOptions, companies]);+ if (!onboardingOpen) return;+ const cId = onboardingOptions.companyId ?? null;+ setStep(onboardingOptions.initialStep ?? 1);+ setCreatedCompanyId(cId);+ setCreatedCompanyPrefix(null);+ }, [onboardingOpen, onboardingOptions.companyId, onboardingOptions.initialStep]);++ // Backfill issue prefix for an existing company once companies are loaded.+ useEffect(() => {+ if (!onboardingOpen || !createdCompanyId || createdCompanyPrefix) return;+ const company = companies.find((c) => c.id === createdCompanyId);+ if (company) setCreatedCompanyPrefix(company.issuePrefix);+ }, [onboardingOpen, createdCompanyId, createdCompanyPrefix, companies]);const { data: adapterModels } = useQuery({queryKey: ["adapter-models", adapterType],