Skip to content

feat(onboarding): gate the app behind onboarding and route deploys through configure - #3400

Merged
ygrishajev merged 1 commit into
mainfrom
yaroslavgrishajev/con-317-onboarding-gate
Jul 9, 2026
Merged

feat(onboarding): gate the app behind onboarding and route deploys through configure#3400
ygrishajev merged 1 commit into
mainfrom
yaroslavgrishajev/con-317-onboarding-gate

Conversation

@ygrishajev

@ygrishajev ygrishajev commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Why

With the onboarding redesign we want a single, enforced first-run path: a brand-new user is guided through onboarding and their first deployment, and can't wander into the rest of the app until they've actually deployed something. Before this PR the redesign was split across two flags and had no real gate — a not-onboarded user could reach any page, and the old wallet-based OnboardingRedirectEffect only covered part of it. New-deployment entry points also bypassed the new configure screen, and on a fresh trial the deployment could be created before the trial wallet was ready to sign it.

Fixes CON-317

What

Flag consolidation

  • Merged console_onboarding_redesign + bid_screening into a single onboarding_redesign_v1 flag across the FE flag type and the API FeatureFlags (including bid-screening's gate).

Onboarding gate (RequireOnboarding)

  • A blocking wrapper in _app — nothing renders until the user's onboarding state is known (no flash of gated content).
  • "Onboarded" = the user has ever created a lease (read client-side via useAllLeases); a user whose deployments are all closed still counts.
  • Not-onboarded users are confined to the onboarding + first-deploy path — the onboarding picker, /new-deployment/configure*, and a single deployment's detail (/deployments/{dseq}) — and are bounced to /onboarding from everywhere else (including the /deployments list).
  • Onboarded users are free everywhere and are sent into the console if they land on /onboarding.
  • Flag-off preserves the legacy wallet-based behavior; public pages are never gated.
  • Removed the legacy OnboardingRedirectEffect and useIsOnboarded in favor of the single gate.

Deploy-entry routing

  • The classic /new-deployment deployment-type/template picker stays the deploy entry: a bare Deploy opens the picker; a chosen template or an edit-deployment intent opens the configure screen; git, redeploy, and VM (deploy-linux) intents keep the classic builder. Wired via useNewDeploymentUrl (in-app links) and RedirectMappableBuilderToConfigure (inbound /new-deployment?... links).

Deployment creation waits for the trial wallet

  • The start-trial request now survives navigation (a stable mutation key + a global in-flight check in useEnsureTrialStarted), so navigating onboarding → configure no longer fires duplicate start-trial calls.
  • Create-deployment is gated in one place (useCreateDeployment): it holds the broadcast until the trial wallet can sign, instead of firing prematurely and failing. Both the manual configure flow and the auto-deploy flow funnel through it.
  • The gate no longer waits on the leases query for allow-list pages, so the trial wallet arriving mid-deploy doesn't remount an in-progress configure/auto flow (which previously stalled the deploy and forced a re-click).

Tests

  • New e2e: onboarding-gate (the routing/gate contract) and onboarding-journey (new-user template auto-deploy + bring-your-own-image). Registration goes through passwordless email OTP; existing-user login uses email + password.
  • Skip strategy revisited: legacy classic-deploy specs skip under the flag; the flag-agnostic SDL-builder and VM (deploy-linux) specs run under both; deploy-from-a-template and managed-wallet-alerts are migrated to the redesign flow.
  • Unit coverage for RequireOnboarding, useNewDeploymentUrl, useCreateDeployment, useEnsureTrialStarted, and RedirectMappableBuilderToConfigure.

Summary by CodeRabbit

  • New Features
    • Added onboarding redesign V1 flag support to drive the new onboarding and “mappable to configure” redirect behavior.
    • Improved trial retry handling: retries now trigger before re-requesting quotes and starting deployment creation.
    • Enhanced “Deploy” link routing using a centralized destination resolver for consistent navigation.
  • Bug Fixes
    • Fixed onboarding gating and redirects for logged-in and public pages.
    • Updated bid-screening behavior to return an empty provider list when onboarding redesign V1 is disabled.
  • Tests
    • Added/updated unit and UI coverage for onboarding gating and trial retry flows.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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: 3bbf66cd-705b-4be9-9f61-28fcc10b543d

📥 Commits

Reviewing files that changed from the base of the PR and between fd9feea and 91755c2.

📒 Files selected for processing (62)
  • apps/api/src/bid-screening/routes/bid-screening.router.ts
  • apps/api/src/billing/services/wallet-initializer/wallet-initializer.service.spec.ts
  • apps/api/src/billing/services/wallet-initializer/wallet-initializer.service.ts
  • apps/api/src/core/services/feature-flags/feature-flags.ts
  • apps/deploy-web/src/components/auth/PasswordAuth/PasswordAuth.spec.tsx
  • apps/deploy-web/src/components/auth/PasswordAuth/PasswordAuth.tsx
  • apps/deploy-web/src/components/auth/PasswordlessAuth/PasswordlessAuth.spec.tsx
  • apps/deploy-web/src/components/auth/PasswordlessAuth/PasswordlessAuth.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/AutoDeployFlow/AutoDeployFlow.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/AutoDeployFlow/AutoDeployFlow.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/useCreateDeployment/useCreateDeployment.spec.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/useCreateDeployment/useCreateDeployment.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/useDeploymentFlow/useDeploymentFlow.ts
  • apps/deploy-web/src/components/deployments/DeploymentList.tsx
  • apps/deploy-web/src/components/deployments/ReclamationCard/ReclamationCard.spec.tsx
  • apps/deploy-web/src/components/deployments/ReclamationCard/ReclamationCard.tsx
  • apps/deploy-web/src/components/home/AccountHeader.tsx
  • apps/deploy-web/src/components/home/NoDeploymentsState.tsx
  • apps/deploy-web/src/components/layout/Sidebar.tsx
  • apps/deploy-web/src/components/new-deployment/RedirectMappableBuilderToConfigure/RedirectMappableBuilderToConfigure.spec.tsx
  • apps/deploy-web/src/components/new-deployment/RedirectMappableBuilderToConfigure/RedirectMappableBuilderToConfigure.tsx
  • apps/deploy-web/src/components/new-deployment/TemplateList.spec.tsx
  • apps/deploy-web/src/components/new-deployment/TemplateList.tsx
  • apps/deploy-web/src/components/onboarding-picker/OnboardingPickerPage.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingRedirect/OnboardingRedirect.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingRedirectEffect/OnboardingRedirectEffect.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingRedirectEffect/OnboardingRedirectEffect.tsx
  • apps/deploy-web/src/components/onboarding/RequireOnboarding/RequireOnboarding.spec.tsx
  • apps/deploy-web/src/components/onboarding/RequireOnboarding/RequireOnboarding.tsx
  • apps/deploy-web/src/hooks/useAutoDeploymentFlow/useAutoDeploymentFlow.ts
  • apps/deploy-web/src/hooks/useEnsureTrialStarted.spec.ts
  • apps/deploy-web/src/hooks/useEnsureTrialStarted.ts
  • apps/deploy-web/src/hooks/useIsOnboarded.ts
  • apps/deploy-web/src/hooks/useManagedWallet.ts
  • apps/deploy-web/src/hooks/useNewDeploymentUrl/useNewDeploymentUrl.spec.ts
  • apps/deploy-web/src/hooks/useNewDeploymentUrl/useNewDeploymentUrl.ts
  • apps/deploy-web/src/pages/_app.tsx
  • apps/deploy-web/src/pages/deployments/[dseq]/index.tsx
  • apps/deploy-web/src/pages/deployments/index.tsx
  • apps/deploy-web/src/pages/new-deployment/configure/[[...dseq]].tsx
  • apps/deploy-web/src/pages/new-deployment/index.tsx
  • apps/deploy-web/src/pages/onboarding/index.tsx
  • apps/deploy-web/src/types/feature-flags.ts
  • apps/deploy-web/tests/ui/actions/auth.ts
  • apps/deploy-web/tests/ui/actions/feature-flags.ts
  • apps/deploy-web/tests/ui/configure-deployment-flow.spec.ts
  • apps/deploy-web/tests/ui/deploy-from-a-template.spec.ts
  • apps/deploy-web/tests/ui/fixture/base-test.ts
  • apps/deploy-web/tests/ui/fixture/test-env.config.ts
  • apps/deploy-web/tests/ui/managed-wallet-alerts.spec.ts
  • apps/deploy-web/tests/ui/managed-wallet-deployment.spec.ts
  • apps/deploy-web/tests/ui/managed-wallet-onboarding.spec.ts
  • apps/deploy-web/tests/ui/onboarding-gate.spec.ts
  • apps/deploy-web/tests/ui/onboarding-journey.spec.ts
  • apps/deploy-web/tests/ui/onboarding-picker-unlock-trial.spec.ts
  • apps/deploy-web/tests/ui/onboarding-quick-deploy.spec.ts
  • apps/deploy-web/tests/ui/pages/ConfigureDeploymentPage.ts
  • apps/deploy-web/tests/ui/pages/OnboardingPickerPage.ts
  • apps/deploy-web/tests/ui/services/email-verification/auth0-ticket.strategy.ts
  • apps/deploy-web/tests/ui/services/email-verification/index.ts
💤 Files with no reviewable changes (7)
  • apps/deploy-web/src/components/onboarding/OnboardingRedirectEffect/OnboardingRedirectEffect.tsx
  • apps/deploy-web/tests/ui/fixture/test-env.config.ts
  • apps/deploy-web/src/components/onboarding/OnboardingRedirectEffect/OnboardingRedirectEffect.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingRedirect/OnboardingRedirect.tsx
  • apps/deploy-web/tests/ui/services/email-verification/auth0-ticket.strategy.ts
  • apps/deploy-web/src/hooks/useIsOnboarded.ts
  • apps/deploy-web/tests/ui/onboarding-quick-deploy.spec.ts
✅ Files skipped from review due to trivial changes (5)
  • apps/api/src/billing/services/wallet-initializer/wallet-initializer.service.ts
  • apps/api/src/bid-screening/routes/bid-screening.router.ts
  • apps/deploy-web/src/components/auth/PasswordlessAuth/PasswordlessAuth.tsx
  • apps/deploy-web/src/components/auth/PasswordAuth/PasswordAuth.spec.tsx
  • apps/deploy-web/src/hooks/useManagedWallet.ts
🚧 Files skipped from review as they are similar to previous changes (48)
  • apps/deploy-web/tests/ui/managed-wallet-deployment.spec.ts
  • apps/deploy-web/src/components/new-deployment/TemplateList.spec.tsx
  • apps/deploy-web/src/components/auth/PasswordAuth/PasswordAuth.tsx
  • apps/deploy-web/tests/ui/deploy-from-a-template.spec.ts
  • apps/deploy-web/src/types/feature-flags.ts
  • apps/deploy-web/src/components/new-deployment/RedirectMappableBuilderToConfigure/RedirectMappableBuilderToConfigure.spec.tsx
  • apps/deploy-web/src/hooks/useAutoDeploymentFlow/useAutoDeploymentFlow.ts
  • apps/deploy-web/src/pages/onboarding/index.tsx
  • apps/api/src/billing/services/wallet-initializer/wallet-initializer.service.spec.ts
  • apps/deploy-web/src/pages/new-deployment/configure/[[...dseq]].tsx
  • apps/deploy-web/tests/ui/actions/feature-flags.ts
  • apps/deploy-web/tests/ui/managed-wallet-onboarding.spec.ts
  • apps/deploy-web/src/components/home/AccountHeader.tsx
  • apps/deploy-web/src/components/new-deployment/RedirectMappableBuilderToConfigure/RedirectMappableBuilderToConfigure.tsx
  • apps/deploy-web/src/pages/deployments/index.tsx
  • apps/deploy-web/tests/ui/pages/OnboardingPickerPage.ts
  • apps/deploy-web/src/components/deployments/DeploymentList.tsx
  • apps/deploy-web/src/pages/new-deployment/index.tsx
  • apps/deploy-web/tests/ui/pages/ConfigureDeploymentPage.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/AutoDeployFlow/AutoDeployFlow.spec.tsx
  • apps/deploy-web/src/components/onboarding-picker/OnboardingPickerPage.spec.tsx
  • apps/deploy-web/src/hooks/useNewDeploymentUrl/useNewDeploymentUrl.ts
  • apps/deploy-web/src/hooks/useNewDeploymentUrl/useNewDeploymentUrl.spec.ts
  • apps/deploy-web/tests/ui/managed-wallet-alerts.spec.ts
  • apps/deploy-web/src/components/deployments/ReclamationCard/ReclamationCard.spec.tsx
  • apps/api/src/core/services/feature-flags/feature-flags.ts
  • apps/deploy-web/src/components/deployments/ReclamationCard/ReclamationCard.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/useCreateDeployment/useCreateDeployment.spec.ts
  • apps/deploy-web/src/components/auth/PasswordlessAuth/PasswordlessAuth.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/AutoDeployFlow/AutoDeployFlow.tsx
  • apps/deploy-web/src/components/layout/Sidebar.tsx
  • apps/deploy-web/tests/ui/configure-deployment-flow.spec.ts
  • apps/deploy-web/src/hooks/useEnsureTrialStarted.spec.ts
  • apps/deploy-web/src/pages/_app.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.spec.tsx
  • apps/deploy-web/tests/ui/fixture/base-test.ts
  • apps/deploy-web/src/pages/deployments/[dseq]/index.tsx
  • apps/deploy-web/src/components/new-deployment/TemplateList.tsx
  • apps/deploy-web/src/hooks/useEnsureTrialStarted.ts
  • apps/deploy-web/tests/ui/services/email-verification/index.ts
  • apps/deploy-web/src/components/onboarding/RequireOnboarding/RequireOnboarding.tsx
  • apps/deploy-web/tests/ui/onboarding-gate.spec.ts
  • apps/deploy-web/src/components/onboarding/RequireOnboarding/RequireOnboarding.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/useCreateDeployment/useCreateDeployment.ts
  • apps/deploy-web/src/components/home/NoDeploymentsState.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/useDeploymentFlow/useDeploymentFlow.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsx
  • apps/deploy-web/tests/ui/actions/auth.ts

📝 Walkthrough

Walkthrough

This PR switches onboarding-related feature-flag checks to onboarding_redesign_v1, adds retry-aware trial and deployment gating, introduces new deployment URL resolution and redirect handling, and updates onboarding pages plus UI test helpers and specs for the redesign flow.

Changes

Onboarding redesign rollout

Layer / File(s) Summary
Flag rename and consumers
apps/api/src/core/services/feature-flags/feature-flags.ts, apps/api/src/bid-screening/routes/bid-screening.router.ts, apps/api/src/billing/services/wallet-initializer/*, apps/deploy-web/src/components/auth/PasswordAuth/*, apps/deploy-web/src/components/auth/PasswordlessAuth/*, apps/deploy-web/src/pages/new-deployment/configure/[[...dseq]].tsx, apps/deploy-web/src/pages/onboarding/index.tsx, apps/deploy-web/src/types/feature-flags.ts
BID_SCREENING and CONSOLE_ONBOARDING_REDESIGN are replaced by ONBOARDING_REDESIGN_V1, and the affected API/web checks move to the new flag name.
Trial retry and deployment gating
apps/deploy-web/src/hooks/useManagedWallet.ts, useEnsureTrialStarted.ts, useCreateDeployment.ts, useDeploymentFlow.ts, useAutoDeploymentFlow.ts, AutoDeployFlow.tsx, ConfigureDeploymentForm.tsx, and related specs
useManagedWallet exposes resetCreate; useEnsureTrialStarted adds retryTrial and in-flight gating; useCreateDeployment buffers creates until wallet readiness and trial state allow them; deployment and quote flows pass the new state through.
New deployment URL routing
useNewDeploymentUrl.ts, RedirectMappableBuilderToConfigure.tsx, DeploymentList.tsx, Sidebar.tsx, AccountHeader.tsx, NoDeploymentsState.tsx, ReclamationCard.tsx, TemplateList.tsx, and specs
A new hook resolves builder and classic URLs based on the redesign flag, and deploy-entry components use it instead of UrlService.newDeployment().
RequireOnboarding gate
RequireOnboarding.tsx, _app.tsx, pages/deployments/*, and specs
_app.tsx wraps pages with RequireOnboarding, which selects lease-based or wallet-based gating and redirects around /onboarding; deployment pages drop the older guard wrappers.

Estimated code review effort: 4 (Complex) | ~60 minutes

E2E Test Infrastructure and Onboarding Specs

Layer / File(s) Summary
Feature-flag skip helpers
apps/deploy-web/tests/ui/actions/feature-flags.ts
isOnboardingRedesignAvailable now probes /new-deployment/configure by HTTP status, and new skip helpers gate redesign-only tests.
Onboarding redesign specs and page objects
onboarding-gate.spec.ts, onboarding-journey.spec.ts, configure-deployment-flow.spec.ts, deploy-from-a-template.spec.ts, managed-wallet-*.spec.ts, onboarding-picker-unlock-trial.spec.ts, ConfigureDeploymentPage.ts, OnboardingPickerPage.ts
New and updated specs/page objects exercise the redesigned onboarding, configure, and managed-wallet flows with flag-aware gating.
Auth and email-verification test simplification
tests/ui/actions/auth.ts, fixture/base-test.ts, fixture/test-env.config.ts, services/email-verification/*
Auth detection timing is increased, login uses password flow directly, and email verification is simplified to Mailsac-only setup.

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

Possibly related PRs

Suggested labels: size: XL

Suggested reviewers: stalniy, baktun14

✨ 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 yaroslavgrishajev/con-317-onboarding-gate

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/deploy-web/src/components/new-deployment/TemplateList.tsx (1)

90-110: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Route uploaded SDL through newDeploymentUrl(...)
apps/deploy-web/src/components/new-deployment/TemplateList.tsx:106 still pushes UrlService.newDeployment({ step: RouteStep.editDeployment }) directly. The redesign hook sends edit-deployment intents to /new-deployment/configure, so this upload path will skip the new screen while the other builder flows do not.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/deploy-web/src/components/new-deployment/TemplateList.tsx` around lines
90 - 110, The file upload flow in onFileSelect still navigates directly with
UrlService.newDeployment, bypassing the redesigned configure screen. Update the
router.push call in TemplateList so uploaded SDL uses newDeploymentUrl(...) for
the edit-deployment intent, matching the other builder flows and routing to
/new-deployment/configure instead of going straight to editDeployment.
🧹 Nitpick comments (1)
apps/deploy-web/src/hooks/useEnsureTrialStarted.ts (1)

42-53: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

isStartingTrial duplicates a check useManagedWallet.isLoading already makes.

useManagedWallet's isLoading already folds in isCreatingManagedWallet = useIsMutating({ mutationKey: ...createMutationKey }) > 0 — the exact same global-mutation-cache check the docstring justifies adding here. Since isLoading already gates the effect (line 49: if (isLoading) return;), the second useIsMutating subscription and isStartingTrial check are dead weight: they can never be true while isLoading is false. Harmless today, but a second independent computation of the same condition — using a different code path — risks silently diverging if either implementation changes.

Consider dropping the duplicate subscription and relying solely on isLoading from useManagedWallet, or centralizing the mutation-in-flight logic so both sites derive from one source.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/deploy-web/src/hooks/useEnsureTrialStarted.ts` around lines 42 - 53, The
hook in useEnsureTrialStarted redundantly derives the in-flight create state
with useIsMutating via isStartingTrial, but useManagedWallet already exposes the
same condition through isLoading. Remove the duplicate subscription and the
isStartingTrial guard from useEffect, and rely on useManagedWallet’s isLoading
(or centralize the shared mutation state in useManagedWallet) so the effect uses
a single source of truth.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@apps/deploy-web/src/components/new-deployment/RedirectMappableBuilderToConfigure/RedirectMappableBuilderToConfigure.tsx`:
- Around line 23-29: The redirect logic in RedirectMappableBuilderToConfigure is
still treating the CI/CD template as mappable, which causes direct
new-deployment links with templateId to be redirected too early. Update the
isMappable/shouldRedirect check to reuse the same git-intent predicate used
elsewhere, or explicitly exclude CI_CD_TEMPLATE_ID so NewDeploymentContainer can
handle that case correctly.

---

Outside diff comments:
In `@apps/deploy-web/src/components/new-deployment/TemplateList.tsx`:
- Around line 90-110: The file upload flow in onFileSelect still navigates
directly with UrlService.newDeployment, bypassing the redesigned configure
screen. Update the router.push call in TemplateList so uploaded SDL uses
newDeploymentUrl(...) for the edit-deployment intent, matching the other builder
flows and routing to /new-deployment/configure instead of going straight to
editDeployment.

---

Nitpick comments:
In `@apps/deploy-web/src/hooks/useEnsureTrialStarted.ts`:
- Around line 42-53: The hook in useEnsureTrialStarted redundantly derives the
in-flight create state with useIsMutating via isStartingTrial, but
useManagedWallet already exposes the same condition through isLoading. Remove
the duplicate subscription and the isStartingTrial guard from useEffect, and
rely on useManagedWallet’s isLoading (or centralize the shared mutation state in
useManagedWallet) so the effect uses a single source of truth.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4a522be9-833e-4c04-95f8-c77104656861

📥 Commits

Reviewing files that changed from the base of the PR and between 886fe7b and fd9feea.

📒 Files selected for processing (62)
  • apps/api/src/bid-screening/routes/bid-screening.router.ts
  • apps/api/src/billing/services/wallet-initializer/wallet-initializer.service.spec.ts
  • apps/api/src/billing/services/wallet-initializer/wallet-initializer.service.ts
  • apps/api/src/core/services/feature-flags/feature-flags.ts
  • apps/deploy-web/src/components/auth/PasswordAuth/PasswordAuth.spec.tsx
  • apps/deploy-web/src/components/auth/PasswordAuth/PasswordAuth.tsx
  • apps/deploy-web/src/components/auth/PasswordlessAuth/PasswordlessAuth.spec.tsx
  • apps/deploy-web/src/components/auth/PasswordlessAuth/PasswordlessAuth.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/AutoDeployFlow/AutoDeployFlow.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/AutoDeployFlow/AutoDeployFlow.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.spec.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/ConfigureDeploymentForm/ConfigureDeploymentForm.tsx
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/useCreateDeployment/useCreateDeployment.spec.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/useCreateDeployment/useCreateDeployment.ts
  • apps/deploy-web/src/components/deployments/ConfigureDeployment/useDeploymentFlow/useDeploymentFlow.ts
  • apps/deploy-web/src/components/deployments/DeploymentList.tsx
  • apps/deploy-web/src/components/deployments/ReclamationCard/ReclamationCard.spec.tsx
  • apps/deploy-web/src/components/deployments/ReclamationCard/ReclamationCard.tsx
  • apps/deploy-web/src/components/home/AccountHeader.tsx
  • apps/deploy-web/src/components/home/NoDeploymentsState.tsx
  • apps/deploy-web/src/components/layout/Sidebar.tsx
  • apps/deploy-web/src/components/new-deployment/RedirectMappableBuilderToConfigure/RedirectMappableBuilderToConfigure.spec.tsx
  • apps/deploy-web/src/components/new-deployment/RedirectMappableBuilderToConfigure/RedirectMappableBuilderToConfigure.tsx
  • apps/deploy-web/src/components/new-deployment/TemplateList.spec.tsx
  • apps/deploy-web/src/components/new-deployment/TemplateList.tsx
  • apps/deploy-web/src/components/onboarding-picker/OnboardingPickerPage.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingRedirect/OnboardingRedirect.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingRedirectEffect/OnboardingRedirectEffect.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingRedirectEffect/OnboardingRedirectEffect.tsx
  • apps/deploy-web/src/components/onboarding/RequireOnboarding/RequireOnboarding.spec.tsx
  • apps/deploy-web/src/components/onboarding/RequireOnboarding/RequireOnboarding.tsx
  • apps/deploy-web/src/hooks/useAutoDeploymentFlow/useAutoDeploymentFlow.ts
  • apps/deploy-web/src/hooks/useEnsureTrialStarted.spec.ts
  • apps/deploy-web/src/hooks/useEnsureTrialStarted.ts
  • apps/deploy-web/src/hooks/useIsOnboarded.ts
  • apps/deploy-web/src/hooks/useManagedWallet.ts
  • apps/deploy-web/src/hooks/useNewDeploymentUrl/useNewDeploymentUrl.spec.ts
  • apps/deploy-web/src/hooks/useNewDeploymentUrl/useNewDeploymentUrl.ts
  • apps/deploy-web/src/pages/_app.tsx
  • apps/deploy-web/src/pages/deployments/[dseq]/index.tsx
  • apps/deploy-web/src/pages/deployments/index.tsx
  • apps/deploy-web/src/pages/new-deployment/configure/[[...dseq]].tsx
  • apps/deploy-web/src/pages/new-deployment/index.tsx
  • apps/deploy-web/src/pages/onboarding/index.tsx
  • apps/deploy-web/src/types/feature-flags.ts
  • apps/deploy-web/tests/ui/actions/auth.ts
  • apps/deploy-web/tests/ui/actions/feature-flags.ts
  • apps/deploy-web/tests/ui/configure-deployment-flow.spec.ts
  • apps/deploy-web/tests/ui/deploy-from-a-template.spec.ts
  • apps/deploy-web/tests/ui/fixture/base-test.ts
  • apps/deploy-web/tests/ui/fixture/test-env.config.ts
  • apps/deploy-web/tests/ui/managed-wallet-alerts.spec.ts
  • apps/deploy-web/tests/ui/managed-wallet-deployment.spec.ts
  • apps/deploy-web/tests/ui/managed-wallet-onboarding.spec.ts
  • apps/deploy-web/tests/ui/onboarding-gate.spec.ts
  • apps/deploy-web/tests/ui/onboarding-journey.spec.ts
  • apps/deploy-web/tests/ui/onboarding-picker-unlock-trial.spec.ts
  • apps/deploy-web/tests/ui/onboarding-quick-deploy.spec.ts
  • apps/deploy-web/tests/ui/pages/ConfigureDeploymentPage.ts
  • apps/deploy-web/tests/ui/pages/OnboardingPickerPage.ts
  • apps/deploy-web/tests/ui/services/email-verification/auth0-ticket.strategy.ts
  • apps/deploy-web/tests/ui/services/email-verification/index.ts
💤 Files with no reviewable changes (7)
  • apps/deploy-web/src/hooks/useIsOnboarded.ts
  • apps/deploy-web/tests/ui/services/email-verification/auth0-ticket.strategy.ts
  • apps/deploy-web/src/components/onboarding/OnboardingRedirectEffect/OnboardingRedirectEffect.spec.tsx
  • apps/deploy-web/tests/ui/onboarding-quick-deploy.spec.ts
  • apps/deploy-web/src/components/onboarding/OnboardingRedirectEffect/OnboardingRedirectEffect.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingRedirect/OnboardingRedirect.tsx
  • apps/deploy-web/tests/ui/fixture/test-env.config.ts

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.96774% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.80%. Comparing base (886fe7b) to head (91755c2).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/deploy-web/src/pages/new-deployment/index.tsx 0.00% 3 Missing ⚠️
...loyment/useCreateDeployment/useCreateDeployment.ts 92.00% 2 Missing ⚠️
...onfigureDeploymentForm/ConfigureDeploymentForm.tsx 90.00% 1 Missing ⚠️
...-web/src/components/deployments/DeploymentList.tsx 0.00% 1 Missing ⚠️
...s/deploy-web/src/components/home/AccountHeader.tsx 0.00% 1 Missing ⚠️
...loy-web/src/components/home/NoDeploymentsState.tsx 0.00% 1 Missing ⚠️
apps/deploy-web/src/components/layout/Sidebar.tsx 0.00% 1 Missing ⚠️
...web/src/components/new-deployment/TemplateList.tsx 66.66% 1 Missing ⚠️
apps/deploy-web/src/pages/deployments/index.tsx 0.00% 1 Missing ⚠️
...src/pages/new-deployment/configure/[[...dseq]].tsx 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3400      +/-   ##
==========================================
- Coverage   71.75%   70.80%   -0.95%     
==========================================
  Files        1149     1060      -89     
  Lines       28978    26753    -2225     
  Branches     7114     6693     -421     
==========================================
- Hits        20792    18942    -1850     
+ Misses       7195     6852     -343     
+ Partials      991      959      -32     
Flag Coverage Δ *Carryforward flag
api 85.60% <100.00%> (ø)
deploy-web 60.29% <90.90%> (+0.30%) ⬆️
log-collector ?
notifications 91.44% <ø> (ø) Carriedforward from 886fe7b
provider-console 81.38% <ø> (ø) Carriedforward from 886fe7b
provider-inventory ?
provider-proxy 86.42% <ø> (ø) Carriedforward from 886fe7b
tx-signer ?

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

Files with missing lines Coverage Δ
...s/wallet-initializer/wallet-initializer.service.ts 88.88% <100.00%> (ø)
...i/src/core/services/feature-flags/feature-flags.ts 100.00% <ø> (ø)
.../src/components/auth/PasswordAuth/PasswordAuth.tsx 96.42% <100.00%> (ø)
...ponents/auth/PasswordlessAuth/PasswordlessAuth.tsx 93.75% <100.00%> (ø)
...figureDeployment/AutoDeployFlow/AutoDeployFlow.tsx 100.00% <100.00%> (ø)
...eDeployment/useDeploymentFlow/useDeploymentFlow.ts 86.48% <100.00%> (+1.35%) ⬆️
...ts/deployments/ReclamationCard/ReclamationCard.tsx 100.00% <100.00%> (ø)
...ToConfigure/RedirectMappableBuilderToConfigure.tsx 100.00% <100.00%> (ø)
...onboarding/RequireOnboarding/RequireOnboarding.tsx 100.00% <100.00%> (ø)
...oks/useAutoDeploymentFlow/useAutoDeploymentFlow.ts 95.00% <100.00%> (ø)
... and 15 more

... and 91 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.

…rough configure

Consolidate the onboarding-redesign and bid-screening flags into a single
onboarding_redesign_v1 flag (FE + API) and add a blocking onboarding gate:
a not-onboarded user is confined to the onboarding + first-deploy path
(the onboarding picker, /new-deployment/configure, a single deployment's
detail), while onboarded users roam the app freely. "Onboarded" is read
client-side from whether the user has ever created a lease. The legacy
OnboardingRedirectEffect and useIsOnboarded are removed in favour of the gate.

Route deploy entry points through the classic picker: a bare "new deployment"
opens the picker, a chosen template or an edit-deployment intent opens the
configure screen, and git/redeploy/VM intents keep the classic builder.

Make deployment creation wait for the trial wallet: the start-trial request
survives navigation (a stable mutation key plus a global in-flight check), and
the create is held until the wallet can broadcast rather than firing early. The
gate no longer waits on the leases query for allow-list pages, so the trial
wallet arriving mid-deploy never remounts an in-progress configure/auto flow.
@ygrishajev
ygrishajev force-pushed the yaroslavgrishajev/con-317-onboarding-gate branch from fd9feea to 91755c2 Compare July 9, 2026 13:38
Comment thread apps/deploy-web/src/types/feature-flags.ts
@ygrishajev
ygrishajev added this pull request to the merge queue Jul 9, 2026
Merged via the queue into main with commit a8f1c67 Jul 9, 2026
57 checks passed
@ygrishajev
ygrishajev deleted the yaroslavgrishajev/con-317-onboarding-gate branch July 9, 2026 14:25
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.

3 participants