fix(onboarding): stop new-user redirect loop back to setup flow - #2958
Draft
posthog-eu[bot] wants to merge 1 commit into
Draft
fix(onboarding): stop new-user redirect loop back to setup flow#2958posthog-eu[bot] wants to merge 1 commit into
posthog-eu[bot] wants to merge 1 commit into
Conversation
… settings Store the onboarding dashboard exploration grant in session storage so it survives a full page load, instead of a module variable that dies on every reload. Exempt the app settings pages from the resume redirect so new users can read their own app id without being sent back to the setup flow. Generated-By: PostHog Code Task-Id: 0c570388-8833-4ab8-85a5-759fe13eee07
Contributor
Merging this PR will not alter performance
Comparing Footnotes
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
2026-08-04cutoff with one org and one app still flaggedneed_onboardingwere bounced back to/app/new?resume=<appId>on nearly every navigation. This sits on the signup-to-activation path and repeats per user rather than firing once.src/utils/onboardingRedirect.ts, so it died on every full page load and had to be re-granted through the confirm dialog each time. The only exempt route was/app/new, so the app dashboard and app settings pages were both caught.sessionStorage(with a module-memory fallback for blocked storage) so it survives a page reload./app/<id>/settingsand its sub-routes so onboarding users can read their own app id without being ejected.Test plan
bunx vitest run tests/onboarding-redirect.unit.test.ts tests/auth-sso-provisioning.unit.test.tssessionStoragevalue)./app/<id>/settings,/app/<id>/settings/access) return no redirect.bun run lintandbun run typecheck:frontendpass.Screenshots
Checklist
bun run lint:backend && bun run lint.accordingly.
my tests
Created with PostHog Desktop from this inbox report.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.