Skip to content

fix(onboarding): land on the wallet tab, not the camera - #1280

Merged
bmc08gt merged 1 commit into
code/cashfrom
claude/post-onboarding-wallet-default-be3214
Aug 20, 2026
Merged

fix(onboarding): land on the wallet tab, not the camera#1280
bmc08gt merged 1 commit into
code/cashfrom
claude/post-onboarding-wallet-default-be3214

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Problem

After finishing onboarding, the app dropped the user on the camera/scanner instead of the wallet. The wallet only appeared on the next cold launch.

Launch already picked the right home — buildNavGraphForLaunch resolved AppRoute.Sheets.Wallet under FeatureFlag.NewUi and AppRoute.Main.Scanner under v1 — but the end of onboarding hardcoded AppRoute.Main.Scanner on both exit paths of PermissionsPhaseFlowHost:

  • FlowExitReason.Completed — permissions flow finished
  • FlowExitReason.BackedOutOfRoot — all permissions already granted, nothing to show

So the two release points had drifted apart.

Change

  • New homeRoute(isNewUi) helper in :apps:flipcash:core (core/navigation/HomeRoute.kt) — a single definition of "where the app releases to once there's a session".
  • MainRoot.buildNavGraphForLaunch uses it (behavior unchanged).
  • OnboardingFlowScreen's PermissionsPhaseFlowHost observes FeatureFlag.NewUi and releases to home on both exit paths. The flow diagram in its KDoc now says Home³ with a footnote instead of Scanner.

The v2 wallet is a flat tab home rather than a sheet, so navigating to it with PopUpTo.ClearAll is exactly what a nav bar tab tap does (replaceAll in AppNavigationBar). v1 is untouched — it still lands on the scanner.

Tests

HomeRouteTest covers both flag states, plus an assertion that the v2 home maps to a nav bar tab — it's applied with ClearAll, so a non-tab route would leave the hoisted bar with no selection.

Not included

Two other spots still hardcode Main.Scanner after account setup — NotificationPermissionScreen / NotificationPermissionRationaleScreen in :shared:permissions and PurchaseAccountScreen in :features:purchase. Both are dead code: no route registers them, and onboarding renders its own in-file step composables. Left alone rather than widening this change.

The end of onboarding hardcoded AppRoute.Main.Scanner on both exit paths of
PermissionsPhaseFlowHost, so a freshly onboarded v2 user was dropped on the
camera and only saw the wallet on the next cold launch. Launch already picked
the right home (Sheets.Wallet under FeatureFlag.NewUi, Main.Scanner under v1) —
the two just drifted apart.

Extract that choice into a shared homeRoute(isNewUi) helper and use it in both
places. The v2 wallet is a flat tab home, so navigating to it with ClearAll is
exactly what a nav bar tab tap does.
@github-actions github-actions Bot added type: fix Bug fix area: onboarding and removed type: fix Bug fix labels Aug 20, 2026
@bmc08gt
bmc08gt merged commit 77f885d into code/cash Aug 20, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the claude/post-onboarding-wallet-default-be3214 branch August 20, 2026 17: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.

1 participant