Skip to content

Redirect incomplete users to onboarding#274

Merged
jakebromberg merged 1 commit intomainfrom
feat/onboarding-incomplete-redirect
Apr 21, 2026
Merged

Redirect incomplete users to onboarding#274
jakebromberg merged 1 commit intomainfrom
feat/onboarding-incomplete-redirect

Conversation

@jakebromberg
Copy link
Copy Markdown
Member

Summary

Extracted from #271 (fix/e2e-test-infrastructure). Adds redirect logic so that users with incomplete profiles (missing realName) are sent to the onboarding form instead of the dashboard.

  • Login layout (app/login/@modern/layout.tsx): Verified but incomplete users now see the onboarding form (isIncomplete={true}) instead of being redirected to the dashboard.
  • requireAuth() (lib/features/authentication/server-utils.ts): Dashboard pages redirect incomplete users back to /login?incomplete=true. Uses an "in" check so the redirect only fires when better-auth actually includes realName in the session object.
  • E2E page object (e2e/pages/onboarding.page.ts): isOnOnboardingPage() now recognizes /login?incomplete=true as an onboarding page.

Test plan

  • Unit tests added for requireAuth() incomplete user redirect and the realName-not-in-session bypass
  • Verify existing server-utils.test.ts tests pass (npm run test:run)
  • Verify CI passes (lint, typecheck, unit tests, build)

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Mar 8, 2026

Deploying wxyc-dj with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6b0efd2
Status: ✅  Deploy successful!
Preview URL: https://b1fc2ed0.dj-site.pages.dev
Branch Preview URL: https://feat-onboarding-incomplete-r.dj-site.pages.dev

View logs

@jakebromberg jakebromberg force-pushed the feat/onboarding-incomplete-redirect branch from e2ddb9e to 6b0efd2 Compare March 9, 2026 01:43
@jakebromberg jakebromberg merged commit 053ba29 into main Apr 21, 2026
5 checks passed
@jakebromberg jakebromberg deleted the feat/onboarding-incomplete-redirect branch April 21, 2026 16:36
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.

2 participants