Skip to content

fix(onboarding): hard-navigate to /dashboard after finish#86

Merged
f-amine merged 1 commit into
masterfrom
fix/onboarding-finish
May 15, 2026
Merged

fix(onboarding): hard-navigate to /dashboard after finish#86
f-amine merged 1 commit into
masterfrom
fix/onboarding-finish

Conversation

@f-amine

@f-amine f-amine commented May 15, 2026

Copy link
Copy Markdown
Owner

router.replace + router.refresh raced against the app layout's hasCompletedOnboarding check. The audit_log INSERT hadn't propagated to the new request yet → bounced back to /onboarding silently.

Use window.location.href for a hard reload. Slower (~50ms) but deterministic. Catch + surface thrown errors in the toast.

router.replace + router.refresh occasionally raced against the app
layout's hasCompletedOnboarding check — the audit_log row insert
hadn't been observed by the new request yet, so the layout bounced
the user straight back to /onboarding with no visible feedback.

Use window.location.href for a hard reload after the action resolves.
Slower (~50ms) but deterministic. Also surfaces thrown errors in the
toast instead of silently returning.

Side-effects:
- Drop unused useRouter import
@f-amine f-amine merged commit 7bc901a into master May 15, 2026
2 checks passed
@f-amine f-amine deleted the fix/onboarding-finish branch May 15, 2026 15:07
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