feat(onboarding): unify login into a single OnboardingFlow with linear FlowHost API#778
Open
bmc08gt wants to merge 2 commits into
Open
feat(onboarding): unify login into a single OnboardingFlow with linear FlowHost API#778bmc08gt wants to merge 2 commits into
bmc08gt wants to merge 2 commits into
Conversation
…r FlowHost API Replace the fragmented login routing (LoginRouter, standalone screens, and scattered verification logic in MainRoot) with a single OnboardingFlowScreen backed by two FlowHost phases: Account and Permissions. FlowHost API changes: - Add linear flow overload with `steps`, `resumeAt`, and `completedResult` parameters for ordered step-by-step flows - Add `FlowNavigator.proceed()` to advance through the step list, exit with completedResult at the end, or delegate to `onProceed` for custom behavior - Rename the existing overload as the non-linear variant for flows that manage their own navigation via navigateTo/exitWithResult - Extract shared logic into FlowHostImpl; support re-seeding when initialStack changes before user navigation (async flag settling) Onboarding routing: - All AuthState.Registered cases now route to AppRoute.OnboardingFlow with a ResumePoint (Login, AccessKey, AccessKeyThenPurchase, or PostAccessKey) — MainRoot no longer routes directly to Verification - PostAccessKeyRedirect checks UserProfile.verifiedPhoneNumber to skip verification when phone is already linked - Seed restore (LoggedIn) skips verification and goes straight to permissions — existing users encounter phone verification in-app via the send flow - Permissions phase uses the linear FlowHost with resumeAt to skip already-granted permissions Login module restructuring: - Delete LoginRouter, AccessKeyScreen, SeedInputScreen (standalone wrappers) — all step content is now composed inline by OnboardingFlowScreen via the entryProvider - Move ViewModels to internal package, screen content to internal/screens - Add OnboardingStep sealed interface and OnboardingResult for flow step/result modeling Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
a595b08 to
a01d8b8
Compare
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.
Replace the fragmented login routing (LoginRouter, standalone screens, and scattered verification logic in MainRoot) with a single OnboardingFlowScreen backed by two FlowHost phases: Account and Permissions.
FlowHost API changes:
steps,resumeAt, andcompletedResultparameters for ordered step-by-step flowsFlowNavigator.proceed()to advance through the step list, exit with completedResult at the end, or delegate toonProceedfor custom behaviorOnboarding routing:
Login module restructuring: