Skip to content

fix: fire signup_submitted when email verification is off#98

Merged
mattdjenkinson merged 1 commit into
mainfrom
fix/signup-submitted-no-verification
Jul 16, 2026
Merged

fix: fire signup_submitted when email verification is off#98
mattdjenkinson merged 1 commit into
mainfrom
fix/signup-submitted-no-verification

Conversation

@mattdjenkinson

Copy link
Copy Markdown
Collaborator

Summary

Confirmed live in staging: a real password signup produced no signup_submitted event at all — the event log jumped straight from the /signup/password page hit to landing in /onboarding/profile, with nothing in between.

Root cause

TrackOnMount(signup_submitted) only renders on /signup/password's "Check your email" screen, which is the branch taken when email verification is required. Staging runs with EMAIL_VERIFICATION=false, so registration takes the other branch in runEnumerationSafeRegister and redirects straight to postRegisterStep's target — the browser never renders a page that could fire the client-side event.

Changes

runEnumerationSafeRegister's verification-not-required branch now calls trackServerEvent('signup_submitted', ...) directly, mirroring the existing IdP call in this same file and its rationale (the browser never renders a trackable page). Channel is 'password' or 'passkey' based on cfg.hasPassword, since both registerWithPassword and registerPasskeyFirst share this function.

Typecheck, lint, and prettier all pass. No existing unit tests cover signup.service.ts (it has zero prior coverage), and the outbound call is a server-side fetch() that Cypress's browser-level cy.intercept() can't observe, so this is verified live rather than via a new test harness.

TrackOnMount(signup_submitted) only rendered on the "Check your email"
page, which requireVerification:false skips entirely -- that path
redirects straight to postRegisterStep's target, so the event never
fired on any environment with EMAIL_VERIFICATION=false (staging).
Confirmed live: a real password signup in staging showed no event
between the /signup/password page hit and landing in onboarding.

Key changes:
- runEnumerationSafeRegister now calls trackServerEvent in its
  verification-not-required branch, mirroring the existing IdP call
  and its rationale (browser never renders a page to track from)
- Channel is 'password' or 'passkey' based on cfg.hasPassword, covering
  both registerWithPassword and registerPasskeyFirst since they share
  this function
@github-actions

Copy link
Copy Markdown
Contributor

🧪 Test Summary

Job Status
E2E (fast, fake provider) ✅ success
Unit Tests (component) (0) ✅ success
Unit Tests (component) (1) ✅ success
Unit Tests (component) (2) ✅ success

View workflow run

@mattdjenkinson
mattdjenkinson enabled auto-merge July 16, 2026 21:15
@mattdjenkinson
mattdjenkinson merged commit 90bbba4 into main Jul 16, 2026
18 checks passed
@mattdjenkinson
mattdjenkinson deleted the fix/signup-submitted-no-verification branch July 16, 2026 21:40
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