fix: per-step skip advances onboarding instead of completing - #991
Merged
robertocarlous merged 1 commit intoOct 1, 2026
Merged
Conversation
|
@Ahassan017 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This change addresses a bug in onboarding where each step's per-step skip button (
WalletConnectStep's "Skip for Now",FirstDepositStep's "Skip for Now",StrategyOverviewStep's "Decide Later") was wired to the samehandleSkipas the bottom "Skip All" button.handleSkipunconditionally setisCompleted = true, so skipping just the first step marked the entire flow complete and dropped the user on the dashboard, hiding the Strategy and Deposit steps for good.The fix gives the per-step skip its own
handleStepSkiphandler that advances to the next step without completing the flow, while the bottom "Skip All" button keepshandleSkipand its existing "complete from anywhere" behavior.Related Issue
Issue: #953 — Fix onboarding's per-step "Skip for Now" completing the entire onboarding flow
Changes
Per-step skip handler
[MODIFY]
src/hooks/useOnboardingFlow.tshandleStepSkip()toOnboardingFlowControls.currentStepto the next step and persists it withcompleted: false, so the flow stays open.isCompleted = true, persistedcompleted: true,onComplete?.()), matchinghandleNext.handleSkip()(Skip All) is unchanged: it completes unconditionally from any step and callsonSkip?.().[MODIFY]
src/components/onboarding/OnboardingFlow.tsxhandleStepSkipfrom the hook.<CurrentStepComponent onSkip={handleStepSkip} …>— the per-step skip now advances.onClick={handleSkip}.[ADD]
src/hooks/useOnboardingFlow.test.tscurrentStep0 → 1 withisCompletedstillfalse.completed: false.onComplete/onSkip.handleSkip(Skip All) still completes unconditionally from step 0.[ADD]
src/components/onboarding/OnboardingFlow.test.tsxWalletConnectStep's "Skip for Now" renders the Strategy step (Choose Your Investment Strategy), never renders the completion screen, and persistscompleted: false.Unchanged:
src/components/onboarding/OnboardingGate.tsx— it already passes a singlehandleDoneas bothonCompleteandonSkip; the gate only needs to react once the flow genuinely completes. No change needed.Verification Results
This change was produced against the repository via the GitHub REST API only — no local clone, install, or build was possible in this environment. Tests were not executed here; they follow the repo's existing
node:test+@testing-library/reactpatterns and thepackage.jsonrunner.Run locally with:
Acceptance criteria mapping:
src/hooks/useOnboardingFlow.ts+src/components/onboarding/OnboardingFlow.tsxonly;OnboardingGate.tsxconfirmed to need no changecurrentStepwithout settingisCompletedhandleStepSkipadvances and persistscompleted: false; covered byuseOnboardingFlow.test.tsandOnboardingFlow.test.tsxhandleSkipunchanged; covered by tests in both new test fileshandleNext/handleBack/handleStepClick/resetFlowuntouched; final-step per-step skip matches previous completion semanticspersist()and storage key; a one-line comment explainshandleStepSkipCloses #953