Skip to content

refactor(nav): move the nav bar homes into AppRoute.Tabs - #1539

Merged
bmc08gt merged 2 commits into
code/cashfrom
refactor/nav-tab-routes
Sep 23, 2026
Merged

bmc08gt merged 2 commits into
code/cashfrom
refactor/nav-tab-routes

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

The Chats tab's home was AppRoute.Sheets.Tips. It isn't a sheet, and it doesn't show tips anymore. Sheets.Wallet and Sheets.Menu were mislabelled the same way. resolveRoutes had to call asNavBarTab() on every Sheets route to keep these three out of Main.Sheet.

Routes

AppRoute.Tabs holds the four nav bar homes: Scanner (was Main.Scanner), Wallet, Chats and Menu.

  • Everything left under Sheets is a real sheet, so resolveRoutes wraps any Sheets route and no longer needs the tab special case.
  • The tab-home checks in navigateAll, AppContent and NavTabBarInsetEntryDecorator are now is AppRoute.Tabs.
  • asNavBarTab() is still there because the nav bar and BillOverlay need to know which button a route maps to.

Dead tipping flow

Tabs.Chats is a data object. It renders ChatsScreen (renamed from TipsScreen) with its own ChatsViewModel instead of going through a FlowHost.

The flow had stopped doing anything:

  • TipFlowViewModel only ever set its steps to listOf(TipStep.Tips), so TipStep.Intro never ran and TipInfoScreen was never shown.
  • TipInfoScreen was the only place that built Tips(resumed = true), the only way to reach TipStep.TipCard.
  • Nothing ever sent the ShareTipCard event.

Deleted: TippingFlowScreen, TipCardScreen, TipInfoScreen, TipStep, TipResult, ic_tipping_hand_large. The tip card and its share flow are still on the You tab (MenuScreenViewModel), which this PR doesn't touch.

Test tags

annotatedEntry builds each screen's root tag from the route's class name, so tips_screen is now chats_screen. That's updated in blocking.yaml, tipping_setup.yaml, subflows/open_tip_chat.yaml and BaselineProfileGenerator. The other three tabs keep their tags.

subflows/login.yaml now waits for chats_screen. Since #1529 a seed login opens on Chats, so its wallet_screen check timed out and every seed-login flow failed before reaching its own steps.

The back stack lives in remember, not saved state, so the renamed @Serializable routes don't break anything on restore.

The Chats tab's home was AppRoute.Sheets.Tips. It is not a sheet and no
longer shows tips, and Wallet and Menu had the same problem under Sheets.
resolveRoutes had to check asNavBarTab() on every Sheets route so that
these three were not wrapped in Main.Sheet.

AppRoute.Tabs now holds Scanner, Wallet, Chats and Menu. Everything left
under Sheets is a real sheet, so resolveRoutes wraps any Sheets route and
the special case is gone. The tab-home checks in navigateAll, AppContent
and NavTabBarInsetEntryDecorator become `is AppRoute.Tabs`.

Chats also drops the tipping flow it was hosted in. TipFlowViewModel only
ever set its steps to listOf(TipStep.Tips), so TipStep.Intro never ran,
TipInfoScreen was never shown, and nothing built Tips(resumed = true), the
only way to reach TipStep.TipCard. The ShareTipCard event was never sent.
Tabs.Chats is a data object that renders ChatsScreen (was TipsScreen)
backed by ChatsViewModel, which keeps only the chat-feed mapping.
TippingFlowScreen, TipCardScreen, TipInfoScreen, TipStep, TipResult and
ic_tipping_hand_large are deleted.

The screen-root tag follows the route name, so tips_screen becomes
chats_screen in the Maestro flows and BaselineProfileGenerator. The other
tabs keep their tags. The back stack is held in remember, not saved
state, so the renamed serializable routes have nothing to restore from.
@bmc08gt bmc08gt self-assigned this Sep 23, 2026
@github-actions github-actions Bot added type: refactor Code restructuring, no behavior change area: payments Payments, transfers, intents, billing area: onramp Deposit, purchase, Coinbase, fiat on-ramp area: scanner QR/Kikcode scanning, camera area: notifications Push notifications, in-app messaging area: deeplinks Deep link handling, URL routing, and link parsing area: onboarding and removed type: refactor Code restructuring, no behavior change labels Sep 23, 2026
Since #1529 a signed-in launch with no deeplink opens on Chats, but
subflows/login.yaml still waited for wallet_screen. Every flow that logs
in by seed timed out on that check before reaching its own steps. Flows
that need the wallet after login already go through navigate_to_wallet.
@github-actions github-actions Bot added the type: refactor Code restructuring, no behavior change label Sep 23, 2026
@bmc08gt
bmc08gt merged commit a12cf89 into code/cash Sep 23, 2026
2 of 3 checks passed
bmc08gt added a commit that referenced this pull request Sep 23, 2026
#1539 replaced AppRoute.Sheets.Tips with AppRoute.Tabs.Chats, and #1537
added the scanner's GroupChatInvite branch against the old route in
parallel, so :features:scanner no longer compiles on code/cash.

Use the back stack AppRouter builds for a tapped /chat/{uuid} link:
Tabs.Chats, then the chat.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: deeplinks Deep link handling, URL routing, and link parsing area: notifications Push notifications, in-app messaging area: onboarding area: onramp Deposit, purchase, Coinbase, fiat on-ramp area: payments Payments, transfers, intents, billing area: scanner QR/Kikcode scanning, camera type: refactor Code restructuring, no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant