Skip to content

fix(desktop-windows): reset onboarding when a different account signs in - #7

Open
formed2forge wants to merge 2 commits into
mainfrom
fix/windows-onboarding-per-account-reset
Open

fix(desktop-windows): reset onboarding when a different account signs in#7
formed2forge wants to merge 2 commits into
mainfrom
fix/windows-onboarding-per-account-reset

Conversation

@formed2forge

Copy link
Copy Markdown
Owner

Summary

reconcileAccountForSignIn detected a UID change and wiped user data, but onboardingCompletedAt survived teardown — so a second user on the same machine was dropped straight into the home screen without seeing the setup wizard.

Fix: call resetOnboarding() (deletes onboardingCompletedAt + onboardingStep) just before teardownUserData() inside the stored !== uid branch. Same-user re-auth and first-ever sign-in are unaffected.

Test plan

  • pnpm test -- authTeardown.test.ts passes (7 tests)
  • Sign in as user A, complete onboarding, sign out, sign in as user B → onboarding wizard appears
  • Sign out and back in as same user → no wizard

🤖 Generated with Claude Code

github-actions Bot and others added 2 commits August 26, 2026 10:32
reconcileAccountForSignIn detected a UID change and wiped user data, but
onboardingCompletedAt survived teardown — so a second user on the same
machine was dropped straight into the home screen without seeing the
setup wizard.

Fix: call resetOnboarding() (deletes onboardingCompletedAt +
onboardingStep) just before teardownUserData() inside the
stored!==uid branch of reconcileAccountForSignIn. Same-user re-auth
and first-ever sign-in are unaffected (guard condition unchanged).

Verified: pnpm test -- authTeardown.test.ts passes (7 tests, 3
assertions updated to pin resetOnboarding call-count per branch).

Failure-Class: none

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KADKRuaPJdho9CDE7nLXQP
@formed2forge
formed2forge force-pushed the fix/windows-onboarding-per-account-reset branch from d4a939a to bc6d5d3 Compare August 26, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant