fix(dashboard): hand off cleanly from setup wizard to model onboarding

On a fresh install useAuthOnboarding's effect ran at mount before the
setup wizard's 500ms auto-open timer fired. The one-shot ref locked,
and the resolved fetch could either stack model onboarding on top of
the wizard or never re-trigger after the wizard closed.

- Gate the trigger on projectId being set so the wizard owns the
  bootstrap phase; the auth check only fires once a project exists.
- Re-check setupWizardOpen via a ref when the auth fetch resolves to
  avoid stacking onboarding on top of a wizard opened mid-fetch.
- Release the one-shot in that suppressed branch so the effect retries
  when the wizard closes.

Adds two regression tests: fresh-install handoff and mid-fetch wizard
suppression.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Fusion
2026-04-28 14:30:38 -07:00
committed by gsxdsm
parent 5e5020b78f
commit 5e6dbbb6f3
7 changed files with 300 additions and 109 deletions

View File

@@ -114,6 +114,8 @@ export const DEFAULT_PROJECT_SETTINGS = {
smartConflictResolution: true,
worktreeRebaseBeforeMerge: true,
worktreeRebaseRemote: "",
worktreeRebaseLocalBase: true,
mergeConflictStrategy: "smart",
workflowStepTimeoutMs: 360_000,
strictScopeEnforcement: false,
buildRetryCount: 0,