Skip to content

feat: join page flow with onboard guard#95

Merged
GraysonCAdams merged 3 commits intomainfrom
feat/join-page-flow
Mar 9, 2026
Merged

feat: join page flow with onboard guard#95
GraysonCAdams merged 3 commits intomainfrom
feat/join-page-flow

Conversation

@GraysonCAdams
Copy link
Collaborator

Summary

  • Refactor join flow from a raw API endpoint (+server.ts GET redirect) to a proper SvelteKit page with +page.server.ts load/action and +page.svelte UI
  • Users now see the group name and a "Join Group" button instead of being silently redirected
  • Fix unique phone constraint violation when multiple users join but haven't completed onboarding (uses pending:{userId} placeholder)
  • Add onboard page server guard to prevent accessing /onboard in invalid states

Test plan

  • Open an invite link — verify the join page renders with group name
  • Tap "Join Group" — verify redirect to /onboard
  • Visit /onboard without a session — verify redirect to /join
  • Visit /onboard after completing onboarding — verify redirect to /
  • Have two users join via invite code simultaneously without onboarding — verify no phone constraint error

Replace the GET-based +server.ts redirect with a proper +page.server.ts
load function and +page.svelte UI. Users now see the group name and tap
"Join Group" via a form action instead of being silently redirected.
Uses a unique placeholder phone to avoid violating the unique constraint
when multiple users are in pre-onboarding state.
Avoid violating the unique phone constraint when multiple users join
via invite code but haven't completed onboarding yet. Uses a
pending:{userId} placeholder that gets replaced with the real phone
during onboarding.
Redirect users to /join if they have no session, and to / if they've
already completed onboarding. Prevents accessing the onboard page in
invalid states.
@GraysonCAdams GraysonCAdams enabled auto-merge (squash) March 9, 2026 03:26
@GraysonCAdams GraysonCAdams merged commit 8aeef55 into main Mar 9, 2026
20 checks passed
@GraysonCAdams GraysonCAdams deleted the feat/join-page-flow branch March 9, 2026 03:29
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