feat(desktop): re-enable v2 onboarding as non-blocking; drop worktree step
Closed
KI
4mo ago+169+169+012345678901234567890123456789-615-615-012345678901234567890123456789
Summary
Re-enables the v2 onboarding flow for fresh v2 users (PR #4177 had removed the hard-gate redirect because it was trapping users). New behavior treats the redirect as advisory:
- On first authenticated render:
isV2CloudEnabled && v2Workspaces.length === 0 && !requiredCompleteusers land on/setup/<firstIncompleteStep>. - New onboarding-store fields:
skippedThisLaunch— in-memory only (omitted frompartialize), set by Skip for now in the chrome dropdown or by navigating out of/setupvia sidebar / cmd-K. Gate doesn't re-trap them this launch; they see onboarding again next launch.dismissedForever— persisted, set by Don't show again. Cleared only by Settings → Experimental → Restart onboarding (reset()).
- V1 isolation:
V2OnboardingGateouter wrapper short-circuits when!isV2, so v1 users never instantiate the inner component (no live-queries onv2Workspaces, no store writes). Skip pill inOnboardingProgressis also wrapped inisV2 &&as defense-in-depth for v1 users who URL-navigate to/setup/*.
Also drops the adopt-worktrees step from the onboarding flow entirely. project is now the terminal step and routes to /v2-workspaces on complete/skip, carrying the onboarding_finished telemetry the worktree step used to own. The whole /setup/adopt-worktrees route folder is deleted.
Test plan
- Fresh v2 user (no workspaces, fresh onboarding state) → lands on
/setup/providerson first authenticated render - Click Skip for now → lands on
/workspace, gate doesn't re-fire this session; restart app → gate fires again - Click Don't show again → lands on
/workspace, gate never re-fires; Settings → Experimental → Restart onboarding clears it - Navigate away from
/setupvia sidebar / cmd-K → implicit Skip for now (same as button), no ping-pong back to/setup - V1 user (no opt-in, pre-cutoff) → no redirect, no Skip pill in
/setupif URL-accessed - V2 user completes project step (continue / select repo / skip) → lands on
/v2-workspaces,onboarding_finishedevent fires with correct outcome - OnboardingProgress chrome shows 4 steps (no Worktrees pill)
Summary by cubic
Re-enabled the v2 onboarding as a non-blocking gate and removed the Worktrees step. Fresh v2 users get a one-time redirect per launch to the next incomplete step, with options to skip or dismiss onboarding.
-
New Features
- Advisory redirect: If v2 is enabled, there are no v2 workspaces, and required steps are incomplete, redirect to
/setup/<firstIncompleteStep>. Leaving/setupcounts as “Skip for now” for this launch. - Skip menu in onboarding chrome: “Skip for now” (session-only) and “Don’t show again” (persisted; reset via Settings → Experimental → Restart onboarding).
- V1 isolation: Gate short-circuits for v1 users; no v2 live-queries/store writes; Skip pill hidden.
- Advisory redirect: If v2 is enabled, there are no v2 workspaces, and required steps are incomplete, redirect to
-
Refactors
- Removed
/setup/adopt-worktrees; Project is now the final step. On complete/skip, navigate to/v2-workspacesand emitonboarding_finished. - Onboarding store: added
skippedThisLaunch(in-memory) anddismissedForever(persisted). - OnboardingProgress shows 4 steps (Worktrees removed).
- Removed
Summary by CodeRabbit
-
New Features
- Added skip options during onboarding: "Skip for now" to defer and "Don't show again" to permanently dismiss.
- Implemented onboarding enforcement gate preventing progression until required steps are complete.
-
Refactor
- Simplified onboarding flow by removing the worktrees adoption step.