Skip to content

feat(onboarding): explicit role selection with role-aware steps#96

Merged
BK1031 merged 2 commits into
mainfrom
bk1031/onboarding-role-redesign
Jun 25, 2026
Merged

feat(onboarding): explicit role selection with role-aware steps#96
BK1031 merged 2 commits into
mainfrom
bk1031/onboarding-role-redesign

Conversation

@BK1031

@BK1031 BK1031 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor
  • Welcome step now asks current member / alumni / guest directly; the email-domain "Are you a current student?" dialog is removed
  • Step list is derived from role: guests skip the academic step; alumni and guests get a new occupation step (job title + company)
  • SAE registration number is shown only for current members
  • Credentials step blocks member + non-ucsb.edu and alumni + ucsb.edu with role-anchored copy
  • Past-graduation-year check is gated on role (member) instead of email domain
  • Adds user.occupation_title / user.occupation_company columns (GORM AutoMigrate picks them up on boot)
  • Backend now enforces the same role/email rules as the frontend, and gates the past-grad-year check on role
  • Final username availability check in the consume handler narrows the race with concurrent signups before entity creation
  • Trim mentor/sponsor from validInitialRoles + DiscordRolesForInitialRole (frontend no longer sends them; guest → other)

BK1031 added 2 commits June 25, 2026 03:05
Replace the email-domain heuristic dialog with an explicit role
picker (current member / alumni / guest) on the welcome step, and
tailor the rest of the flow to the chosen role.

Frontend:
- Welcome step now gates progression on a chosen role. The "Are you
  a current student?" dialog is gone.
- Step list is derived from the role: guests skip the academic step,
  alumni and guests get a new occupation step (job title + company)
  inserted before team gear.
- SAE registration number is shown only for current members; the
  field is zeroed in the submit payload for other roles.
- Credentials step blocks progression with a clearer dialog when
  member uses a non-ucsb.edu email, OR when alumni use a ucsb.edu
  email (those accounts expire after graduation).
- Past-graduation-year check is gated on role === "member" instead
  of email domain.
- Review step hides academic for guests and SAE for non-members,
  shows occupation for alumni/guests.

Backend:
- Add user.occupation_title and user.occupation_company columns
  (picked up by GORM AutoMigrate on next boot).
- Forward the new fields through discord onboarding consume.
- Match the frontend's role/email rules in the consume handler for
  defense in depth: reject member + non-ucsb.edu and alumni +
  ucsb.edu submissions, and gate the past-grad-year check on role.
- Final username availability check before entity creation narrows
  the race with concurrent signups (DB unique index remains the
  authoritative guard, but losing the race after entity creation
  would orphan the entity).
- Trim mentor/sponsor from validInitialRoles and
  DiscordRolesForInitialRole; the frontend no longer sends those
  values (guest → other).
…e-redesign

# Conflicts:
#	discord/api/onboarding_token.go
#	discord/service/guild.go
@BK1031 BK1031 merged commit 64339f4 into main Jun 25, 2026
18 checks passed
@BK1031 BK1031 deleted the bk1031/onboarding-role-redesign branch June 25, 2026 10:15
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