Skip to content

refactor(onboarding): remove the legacy /signup free-trial wizard - #3568

Merged
baktun14 merged 2 commits into
mainfrom
refactor/onboarding-remove-legacy-signup-wizard
Aug 7, 2026
Merged

refactor(onboarding): remove the legacy /signup free-trial wizard#3568
baktun14 merged 2 commits into
mainfrom
refactor/onboarding-remove-legacy-signup-wizard

Conversation

@baktun14

@baktun14 baktun14 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Why

The multi-step "Free Trial" onboarding wizard served at /signup (and its /user/verify-email redirect helper) has been fully replaced by the onboarding picker at /onboarding, reached through the RequireOnboarding gate. The picker auto-starts the trial (useEnsureTrialStarted) and routes first deploys through /new-deployment/configure, and email verification is now owned by the auth EmailCodeVerify component on /login. The old wizard was dead weight — its only remaining in-app entry point was VerifyEmailPage.

Stacked on #3567 (managed-only wallet context + boot gate), which stripped the trial buttons and flags this wizard depended on.

Part of the onboarding redesign cleanup.

What

Removes the legacy /signup free-trial wizard end-to-end (net −3.4k LOC):

  • Deleted: OnboardingPage, OnboardingContainer, OnboardingView, OnboardingStepper, all steps/* (FreeTrial, EmailVerification, PaymentMethod, Welcome, TrialStartButton, …), VerifyEmailPage, and the /signup + /user/verify-email route files (deleted outright — no redirect stubs).
  • Relocated the still-shared VerificationCodeInput (+ spec) into components/auth/EmailCodeVerify/, its sole remaining consumer.
  • Reference cleanup: dropped the orphaned UrlService.onboarding() builder, deleted services/storage/keys.ts (ONBOARDING_STEP_KEY), and removed the dead localStorage logout cleanup + unused constructor param from AuthService.
  • E2E: removed the obsolete startFreeTrial() step from registerWithEmailPassword and slimmed the OnboardingPage page-object to the isCurrentPage() check still used by passwordless-login.spec.ts.

Kept (out of scope): the /onboarding picker, RequireOnboarding gate, onboarding hooks, newSignup() (→ /login?tab=signup), and the separate /get-started tutorial.

Verification

  • tsc: no new errors (verified by delta against the existing spec-typing baseline).
  • npm run test:unit: 36 pass across the relocated VerificationCodeInput/EmailCodeVerify and auth.service specs.
  • eslint: 0 errors on touched files.

Note

The email/password E2E flow (registerWithEmailPassword) now relies on the new EmailCodeVerify verify screen rendering on /login right after signup (mirroring the passwordless path). That path runs against a live env rather than in pre-push checks — worth a real run before merge.

Summary by CodeRabbit

  • New Features
    • Added a six-digit email verification code input with paste support, automatic focus movement, numeric validation, OTP autofill, reset, and disabled states.
  • Changes
    • Retired the previous signup and onboarding experience, including trial setup, payment collection, welcome deployment, and email verification pages.
    • Registration now waits for successful account creation and navigation away from the login page.
  • Bug Fixes
    • Improved verification-code input focus behavior when returning to the page or window.

@baktun14
baktun14 requested a review from a team as a code owner August 6, 2026 18:42
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 958dee4a-a472-4461-9761-c6cf253ea28c

📥 Commits

Reviewing files that changed from the base of the PR and between e7bf443 and b0cb3fd.

📒 Files selected for processing (4)
  • apps/deploy-web/src/components/shared/PaymentMethodsList/PaymentMethodsList.tsx
  • apps/deploy-web/src/components/shared/PaymentMethodsList/index.ts
  • apps/deploy-web/src/hooks/useReturnTo/index.ts
  • apps/deploy-web/src/hooks/useTrialBalance.ts
💤 Files with no reviewable changes (4)
  • apps/deploy-web/src/components/shared/PaymentMethodsList/index.ts
  • apps/deploy-web/src/hooks/useReturnTo/index.ts
  • apps/deploy-web/src/components/shared/PaymentMethodsList/PaymentMethodsList.tsx
  • apps/deploy-web/src/hooks/useTrialBalance.ts

📝 Walkthrough

Walkthrough

Changes

The authentication flow now uses a local six-digit VerificationCodeInput with OTP, paste, focus, reset, disabled-state, and completion handling. The legacy onboarding flow, signup and email-verification pages, onboarding state storage, route helper, and related tests are removed. Signup UI tests now wait for a successful password-signup response.

Authentication flow

Layer / File(s) Summary
Verification code input implementation and validation
apps/deploy-web/src/components/auth/EmailCodeVerify/VerificationCodeInput.tsx, apps/deploy-web/src/components/auth/EmailCodeVerify/VerificationCodeInput.spec.tsx
Adds six-digit numeric entry, paste handling, OTP autofill, focus management, reset and focus refs, disabled state, and completion callbacks. Tests cover these behaviors.
Authentication wiring and signup test flow
apps/deploy-web/src/components/auth/EmailCodeVerify/EmailCodeVerify.tsx, apps/deploy-web/src/components/auth/EmailCodeVerify/EmailCodeVerify.spec.tsx, apps/deploy-web/tests/ui/actions/auth.ts
Updates imports to the local verification component. Signup tests wait for a successful password-signup response and navigation away from /login.
Legacy onboarding removal and auth cleanup
apps/deploy-web/src/components/onboarding/**, apps/deploy-web/src/pages/signup/index.tsx, apps/deploy-web/src/pages/user/verify-email/index.tsx, apps/deploy-web/src/services/auth/auth/*, apps/deploy-web/src/services/storage/keys.ts, apps/deploy-web/src/utils/urlUtils.ts, apps/deploy-web/tests/ui/pages/OnboardingPage.ts
Removes onboarding pages, components, payment and trial flows, related tests, onboarding storage, logout cleanup, the /signup URL helper, and obsolete page-object methods.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: stalniy

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/onboarding-remove-legacy-signup-wizard

Comment @coderabbitai help to get the list of available commands.

Comment thread apps/deploy-web/tests/ui/actions/auth.ts

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not re-flagging anything new. The registerWithEmailPassword issue I raised in my prior review (waiting on a verification-code screen that PasswordAuth never renders) has been fixed by commit 8e17bb8, which drops the verify() call and documents why password-signup needs no OTP step — I confirmed PasswordAuth's signup mutation indeed just does signup() -> checkSession() -> navigateBack() with no verify screen. Given the size of this refactor (35 files, ~3.4k LOC removed) and that it touches auth-adjacent code, I'd still like a human to give it a final pass rather than rely solely on automated review.

Extended reasoning...

This run's bug hunter found no new issues. My own check confirms the fix commit (8e17bb8) correctly resolves the previously-flagged E2E bug: PasswordAuth.tsx's signInOrSignUp mutation for the signup case only calls authService.signup(), checkSession(), and navigateBack() — there is no verify-code UI in that path, so removing the emailVerification.verify() wait (and the dead startFreeTrial() call) is correct. The rest of the PR is a large, mostly mechanical deletion of the legacy /signup wizard (OnboardingContainer/View/Stepper, step components, VerifyEmailPage, associated routes and specs) plus a straightforward relocation of VerificationCodeInput and small reference cleanups (UrlService.onboarding(), ONBOARDING_STEP_KEY, AuthService constructor param). No new security-sensitive logic is introduced; it is net deletion of an already-superseded flow. Given the XL size and that it touches auth service/tests even though changes there are now correct, I'm deferring to a human for final sign-off rather than auto-approving, mainly out of caution around the size/scope rather than a specific unresolved concern.

@baktun14
baktun14 force-pushed the refactor/wallet-managed-only-context-boot-gate branch from b33b72d to 963b86c Compare August 7, 2026 10:29
Base automatically changed from refactor/wallet-managed-only-context-boot-gate to main August 7, 2026 12:01
@baktun14
baktun14 force-pushed the refactor/onboarding-remove-legacy-signup-wizard branch from 8e17bb8 to e7bf443 Compare August 7, 2026 12:10
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.52%. Comparing base (2ffacdc) to head (b0cb3fd).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3568      +/-   ##
==========================================
- Coverage   76.13%   75.52%   -0.62%     
==========================================
  Files        1157     1044     -113     
  Lines       30057    27248    -2809     
  Branches     7440     6896     -544     
==========================================
- Hits        22885    20579    -2306     
+ Misses       6338     5872     -466     
+ Partials      834      797      -37     
Flag Coverage Δ *Carryforward flag
api 88.89% <ø> (ø) Carriedforward from 2ffacdc
deploy-web 66.19% <100.00%> (+0.04%) ⬆️
log-collector ?
notifications 93.84% <ø> (ø) Carriedforward from 2ffacdc
provider-console 81.38% <ø> (ø) Carriedforward from 2ffacdc
provider-inventory ?
provider-proxy 88.17% <ø> (ø) Carriedforward from 2ffacdc
tx-signer ?

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...omponents/auth/EmailCodeVerify/EmailCodeVerify.tsx 100.00% <ø> (ø)
...nts/auth/EmailCodeVerify/VerificationCodeInput.tsx 83.54% <ø> (ø)
.../deploy-web/src/services/auth/auth/auth.service.ts 72.72% <100.00%> (-2.28%) ⬇️
apps/deploy-web/src/utils/urlUtils.ts 53.75% <ø> (-1.81%) ⬇️

... and 93 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The multi-step Free Trial onboarding wizard served at /signup (and its
/user/verify-email redirect) has been fully replaced by the onboarding
picker at /onboarding, reached through the RequireOnboarding gate, which
auto-starts the trial and routes first deploys through the configure page.

Delete the wizard end-to-end: OnboardingPage/Container/View/Stepper, all
step components, VerifyEmailPage, and the /signup and /user/verify-email
routes. Relocate the still-shared VerificationCodeInput to the auth
EmailCodeVerify component that now owns email verification, and drop the
now-orphaned UrlService.onboarding() builder and ONBOARDING_STEP_KEY.
…signup

registerWithEmailPassword drove the PasswordAuth signup form and then waited for
the passwordless "Verification code digit N" screen, which PasswordAuth never
renders: password-signup sets the session server-side and PasswordAuth redirects
straight off /login. Remove the verify() call so the helper matches the actual
password flow.
@baktun14
baktun14 force-pushed the refactor/onboarding-remove-legacy-signup-wizard branch from e7bf443 to b0cb3fd Compare August 7, 2026 12:23
@baktun14
baktun14 added this pull request to the merge queue Aug 7, 2026
Merged via the queue into main with commit c8899c1 Aug 7, 2026
58 checks passed
@baktun14
baktun14 deleted the refactor/onboarding-remove-legacy-signup-wizard branch August 7, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants