feat: use signup API and collect names in About you onboarding
Summary (AI generated)
Create accounts through Capgo POST /auth/register, then collect both first and last name in the first console onboarding step, renamed About you. Names appear before the goal choices on desktop and mobile, without adding a step.
- Make names optional on the existing registration API. Preserve supplied names for older clients; seed empty profile names for onboarding.
- Preserve README referral metadata and newsletter preferences. CAPTCHA, password, deleted-account and duplicate-email checks remain server-side.
- Route console signup through the registration API. The console consumes its returned session tokens using the current session client; it no longer calls browser
auth.signUpor seedspublic.usersitself. - Align console password validation with the existing API requirement for a numeric character.
- Assign nameless signups to persisted onboarding V6. Only V6 shows the profile form; V4/V5 keep their existing cohort and goal label.
- Track first/last name entry after a 500 ms debounce using field length only. Track profile save success/failure separately from goal completion. Update PostHog person first name, last name and full name after the profile write succeeds. Analytics failures do not block onboarding.
- Autosave both raw name drafts after 500 ms in
users.onboarding.profile_draft, using the existing serialized write queue and compare-and-swap helper. Restore partial or explicitly cleared inputs on refresh; preserve concurrent onboarding progress and A/B assignments. Definitive names and PostHog identity update only after validation. - Require both trimmed names and persist them before advancing. Failed profile saves keep the user on the step for retry. Prefill partial profiles and preserve complete profiles, including the standalone organization flow.
- Keep visible onboarding copy in i18n. Preserve current main's paused WebNativeApp allocations.
- Keep generated graph artifacts identical to main, as requested in human review.
- Preserve current main’s PR preview workflow using the latest published CLI (#3723); the earlier preview uploader pin in this branch is superseded.
Companion website PR: https://github.com/Cap-go/website/pull/1113. Deploy this console/backend PR first, then the website PR. The website's nameless API requests require the backend change here.
This uses the registration API already merged in #3426, with the current session-token handoff.
Motivation (AI generated)
Shorten registration while still collecting complete profile names before onboarding continues. Centralize account creation and validation in the existing Capgo API.
Business Impact (AI generated)
Reduce required signup fields and keep the website and console on the same registration contract. Conversion impact still needs measurement after deployment.
Test Plan (AI generated)
- Fresh registration/onboarding Playwright: all 14 cases pass, including real database draft recovery after refresh on desktop and mobile before selecting a goal, API signup, failed-save retry, partial profiles, standalone organization creation and password validation.
- Full unit suite: 3,912 tests pass across 427 files on Node 24, UTC and an empty WEBAPP_URL.
- Profile unit tests cover persisted V6 gating, legacy versions, PostHog identity, 500 ms analytics and database debounce, partial/cleared draft restoration, concurrent writes, newer typing, retry, unmount flush and authentication generation changes.
- Existing registration API integration tests passed, including nameless V6 profile seeding and referral metadata.
- Oxlint, ESLint and frontend/backend/CLI typechecks pass; production frontend build succeeds.
- Current main 743e952e0 merged; preview CLI conflict resolved by preserving main’s
@capgo/cli@latest. Generated graph stays identical to main per human review. - After the merge: 3,912 unit tests and all 14 registration Playwright cases pass; configured lint, full typechecks and preview-workflow actionlint pass.
- Before/after layout captures against current main c0ca02ba5 cover registration and profile onboarding on desktop/mobile, plus standalone organization flows.
- Latest GitHub CI and automated review complete.
Visual changes (AI generated)
Generated at 2026-10-16T03:08:44.595Z. Threshold: 0.1% pixel difference.
| Route | Diff % | Status |
|---|---|---|
| register | 8.847 | changed |
| register-mobile | 15.453 | changed |
| onboarding-profile-goal | 5.236 | changed |
| onboarding-profile-goal-mobile | 8.661 | changed |
| onboarding-organization-profile-legacy | 2.553 | changed |
| onboarding-organization-profile | 0.000 | unchanged |
Before/after/diff report. Baseline: current main c0ca02ba5; head: 157f48101; captured 2026-10-16.
Summary by CodeRabbit
- New Features
- New accounts can be created without entering a first or last name during registration. Users with incomplete profiles are prompted to add their names during onboarding, with saved drafts restored if they return later.
- Onboarding wording now asks what users would like to do with Capgo and labels the step “About you.”
- Bug Fixes
- Passwords must include a number to pass registration validation.
- Profile details must be valid and successfully saved before onboarding or organization creation can continue.
Summary (AI generated)
Create accounts through Capgo POST /auth/register, then collect both first and last name in the first console onboarding step, renamed About you. Names appear before the goal choices on desktop and mobile, without adding a step.
- Make names optional on the existing registration API. Preserve supplied names for older clients; seed empty profile names for onboarding.
- Preserve README referral metadata and newsletter preferences. CAPTCHA, password, deleted-account and duplicate-email checks remain server-side.
- Route console signup through the registration API. The console consumes its returned session tokens using the current session client; it no longer calls browser
auth.signUpor seedspublic.usersitself. - Align console password validation with the existing API requirement for a numeric character.
- Assign nameless signups to persisted onboarding V6. Only V6 shows the profile form; V4/V5 keep their existing cohort and goal label.
- Track first/last name entry after a 500 ms debounce using field length only. Track profile save success/failure separately from goal completion. Update PostHog person first name, last name and full name after the profile write succeeds. Analytics failures do not block onboarding.
- Autosave both raw name drafts after 500 ms in
users.onboarding.profile_draft, using the existing serialized write queue and compare-and-swap helper. Restore partial or explicitly cleared inputs on refresh; preserve concurrent onboarding progress and A/B assignments. Definitive names and PostHog identity update only after validation. - Require both trimmed names and persist them before advancing. Failed profile saves keep the user on the step for retry. Prefill partial profiles and preserve complete profiles, including the standalone organization flow.
- When
public.usersfirst or last name changes,on_user_updatesyncs PostHog identify and Bento subscriber import; provider failures return 5xx so the trigger retries. - Keep visible onboarding copy in i18n. Preserve current main's paused WebNativeApp allocations.
- Keep generated graph artifacts identical to main, as requested in human review.
- Preserve current main's PR preview workflow using the latest published CLI (#3723).
Companion website PR: https://github.com/Cap-go/website/pull/1113. Deploy this console/backend PR first, then the website PR. The website's nameless API requests require the backend change here.
This uses the registration API already merged in #3426, with the current session-token handoff.
Motivation (AI generated)
Shorten registration while still collecting complete profile names before onboarding continues. Centralize account creation and validation in the existing Capgo API.
Business Impact (AI generated)
Reduce required signup fields and keep the website and console on the same registration contract. Conversion impact still needs measurement after deployment.
Test Plan (AI generated)
- Registration/onboarding Playwright suite (14 cases): API signup, password validation, draft recovery after refresh on desktop/mobile, failed-save retry, partial profiles, standalone organization profile gating, org-switcher incomplete profile E2E.
- Profile unit tests: V6 gating, legacy versions, PostHog identity, 500 ms analytics and database debounce, draft restoration, concurrent writes, retry, unmount flush.
-
on_user_updatedisplay name sync and Bento trigger ordering unit tests. - Registration API integration and unit tests, including nameless V6 profile seeding and referral metadata.
- Merged current
mainatccbe23327(f23c95762); branch is mergeable with no conflict. - CI green on
f23c95762(full test matrix, visual diff run39133216832). - Oxlint, ESLint, frontend/backend/CLI typechecks and production frontend build succeed locally after merge.
Visual changes (AI generated)
Baseline: main at ccbe23327. Head captures: CI visual diff run 39133216832 on f23c95762, committed at 4ddf9772d under .github/pr-assets/defer-signup-name-current/.
| Route | Diff % (CI) | Before | After |
|---|---|---|---|
| register | 8.968 | desktop before | desktop after |
| register-mobile | 15.792 | mobile before | mobile after |
| onboarding-profile-goal | 5.753 | desktop before | desktop after |
| onboarding-profile-goal-mobile | 9.434 | mobile before | mobile after |
Generated with AI

