Skip to content

chore(ui): remove the newUI beta flag and delete the v1 shell - #619

Open
bmc08gt wants to merge 2 commits into
mainfrom
chore/remove-newui-beta-flag
Open

chore(ui): remove the newUI beta flag and delete the v1 shell#619
bmc08gt wants to merge 2 commits into
mainfrom
chore/remove-newui-beta-flag

Conversation

@bmc08gt

Copy link
Copy Markdown
Collaborator

The tab-bar UI shipped to everyone in #613, so BetaFlags.Option.newUI had no readers left that could return false. This collapses every branch it gated and deletes the v1 surfaces it was the last route to. Mirrors the decisions in the Android teardown (code-payments/code-android-app#1290).

Availability stays as-is — it's the mechanism for the next rollout, not part of this flag. BetaFlags.Option is down to .vibrateOnScan and .enableCoinbase; the now-empty .publicBeta list renders its ContentUnavailableView and needed no change.

Deleted

  • BalanceScreen — the v1 wallet, superseded by WalletScreen in the Wallet tab
  • ScanTopBar / ScanBottomBar — the scanner-first chrome the tab bar replaces
  • The Currency Sell flow (CurrencySellAmountScreen, CurrencySellConfirmationScreen, and their view models). Convert replaces it and calls the same Session.sell machinery underneath, so nothing below the UI layer went away.
  • CurrencyInfoHeaderSection / CurrencyInfoFooter — the v1 Currency Info header and Buy/Sell footer, replaced by CurrencyInfoContentV2's tiles
  • CurrencyCreationPromoCard

Extracted rather than dropped

  • ExchangedBalance and BalanceHeaderButton, out of BalanceScreen
  • RootSheetHost, out of ScanScreen

These account for most of the additions — they're re-homed code, not new logic.

Router

Stack.isTabHosted replaces the runtime-registered AppRouter.tabStacks set.

The old set was published by HomeTabView's onAppear. A deep link arriving before that view appeared therefore fell through to the sheet lookup and was silently dropped, because .balance has no sheet of its own. Making it a static fact on the stack fixes the cold-start case, and AppRouterCrossStackTests.tabHostedStacks_matchHomeTabs pins it against HomeTab.pushStack so the two can't drift.

SheetPresentation loses .balance and .discover, both of which are now tab-reached.

Stranded symbols

A reference-count sweep against main found three symbols whose last consumer was v1 code:

  • Session.canUseTips — body was true; only caller was the v1 scanner bottom bar. Removed.
  • Image.Symbol.hamburger — only used by ScanTopBar. Removed with its imageset.
  • Analytics.TokenInfoEvent.openedFromWalletrewired, not removed. This is the wallet → token-info funnel step, and the tab-bar shell had quietly stopped emitting it because the v2 wallet expands the card in place rather than pushing a screen. WalletScreen now fires it from openCard. openedFromDeeplink had the same gap, so openCardImmediately — reached only from DeepLinkController — fires that one.

Tests

CurrencySellConfirmationViewModelTests is ported to ConvertConfirmationViewModelTests, keeping the sell money-math coverage on the flow that replaced it. The router suites are rewritten for the new stack shape.

The XCUITests diverge from Android here: Android retargeted its Maestro flows inside the teardown PR, while the affected XCUITests stay behind skipPendingTabBarRewrite with the rewrite planned in .claude/plans/2026-08-20-ui-test-tab-bar-rewrite.md. Two Buy regressions needed a new entry point regardless — an owned currency offers Give / Convert / Withdraw, not Buy.

Open product question

Settings is reachable only from the You tab, which renders only for an account with a tippable profile. An account without one appears to have no route to Settings. Flagging rather than fixing, since the answer is a product call.

The tab-bar UI shipped to everyone in #613, so `BetaFlags.Option.newUI`
had no readers left that could return false. Collapse every branch it
gated and delete the v1 surfaces it was the last route to.
Deleted: `BalanceScreen`, `ScanTopBar`/`ScanBottomBar`, the Currency Sell
flow (Convert replaces it and calls the same `Session.sell` machinery
underneath), `CurrencyInfoHeaderSection`/`CurrencyInfoFooter`, and
`CurrencyCreationPromoCard`.
Extracted rather than dropped: `ExchangedBalance` and `BalanceHeaderButton`
out of `BalanceScreen`, and `RootSheetHost` out of `ScanScreen`.
Router: `Stack.isTabHosted` replaces the runtime-registered
`AppRouter.tabStacks` set. The old set was published by `HomeTabView`'s
`onAppear`, so a deep link arriving before that view appeared fell through
to the sheet lookup and was dropped — `.balance` has no sheet of its own.
Making it a static fact on the stack fixes the cold-start case, and
`AppRouterCrossStackTests` pins it against `HomeTab.pushStack`.
`Availability` stays as-is; it is the mechanism for the next rollout, not
part of this flag.
Also picks up three symbols stranded by the deletions: `Session.canUseTips`
(body was `true`), `Image.Symbol.hamburger` with its imageset, and the
wallet leg of the token-info funnel. The last one is rewired rather than
removed — the tab-bar wallet expands the card in place instead of pushing
a screen, so `WalletScreen` now emits `openedFromWallet` on tap and
`openedFromDeeplink` on a deep-linked open.
Removing the newUI beta flag deleted the Currency Sell flow, which held the
only `swapType: .sell` call site. Convert replaces it and carries its own
case, so nothing constructs a sell any more.
Drop the case from SwapType and the arms it fed in title, subtitle,
navigationTitle, and trackTransaction. Convert keeps reporting through
Analytics.tokenSell — it still disposes of the source token — so only the
unreachable path goes. The tests asserting a fourth case and the "Selling"
title go with it.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@bmc08gt