Skip to content

refactor(ui): drop tab-bar flags BaseNavigationController already sets - #1394

Merged
ross-dash merged 2 commits into
developfrom
refactor/drop-redundant-tabbar-flags
Nov 13, 2026
Merged

ross-dash merged 2 commits into
developfrom
refactor/drop-redundant-tabbar-flags

Conversation

@ross-dash

@ross-dash ross-dash commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Since #1333, BaseNavigationController sets hidesBottomBarWhenPushed = true on every controller pushed above a stack's root (pushViewController and setViewControllers). This removes 46 per-call-site assignments that duplicated it. Behaviour-neutral.

A line was removed only where the push provably goes through a BaseNavigationController and the controller is not the stack's root: Home, Payments landing, Explore, More (Settings, Tools, Security, Wallets, Identities, Sync info, Dash Connect), Buy/Sell portal and the Coinbase/Uphold flows it opens. ResetWalletInfoHostingController's own flag is removed too — both of its pushes go onto a BaseNavigationController.

SettingsScreen is also hosted by the DWSettingsRowsUITestFixture in a plain UINavigationController, but that is a window root with no tab bar, so the flag had no effect there.

Kept on purpose

  • Modal roots: Coinbase/Uphold shortcuts in HomeViewController+Shortcuts, SwapKitPortalViewController, IdentityCreditBalance top-up, RecoveryPhraseNavigation helpers (also used as modal roots)
  • AdvancedSecurityHostingController self-flag — has an ObjC (onboarding) caller
  • CustodialSwapsViewController — never instantiated, origin unclear
  • PaymentController — anchors include many ObjC DWBasePayViewController subclasses
  • DWPreviewSeedPhraseViewController.m — ObjC, push path not clear

Test plan

  • dashpay scheme builds (Debug, iOS Simulator)
  • scripts/a11y_audit.py --check — no new findings
  • Spot-check: tab bar hidden on pushed screens from each tab

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • The bottom navigation bar remains visible while navigating through buy and sell, payment, wallet, security, settings, and other app sections.
    • Integration, account, identity, and tools screens continue to open as before, without hiding the bottom navigation bar.
    • Navigation through multi-step flows, including scanned payments and wallet recovery, continues while preserving the existing tab bar visibility.

BaseNavigationController sets hidesBottomBarWhenPushed on every controller
pushed above a stack's root, so the per-call-site assignments before a push
onto it are redundant. Removed only where the push provably goes through a
BaseNavigationController and the controller is not the stack's root.

Kept: modal roots (Coinbase/Uphold/DashDEX shortcuts, identity top-up,
recovery phrase helpers), AdvancedSecurity's self-flag (ObjC caller),
CustodialSwaps (never instantiated), PaymentController (ObjC anchors) and
DWPreviewSeedPhraseViewController.m.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The changes remove hidesBottomBarWhenPushed assignments from destination controllers across commerce, wallet, menu, and payment navigation. The affected navigation pushes remain in place.

Changes: Navigation behavior

Layer / File(s) Summary
Buy, sell, and integration navigation
DashWallet/Sources/UI/Buy Sell/*, DashWallet/Sources/UI/Coinbase/*, DashWallet/Sources/UI/Uphold/Portal/IntegrationViewController+Uphold.swift
Removed bottom-bar hiding assignments from Buy/Sell, Coinbase, and Uphold destinations. The described push calls remain.
Home, wallet, and menu navigation
DashWallet/Sources/UI/Explore Dash/ExploreMenuScreen.swift, DashWallet/Sources/UI/Home/*, DashWallet/Sources/UI/Main/MainTabbarController.swift, DashWallet/Sources/UI/Menu/*
Removed bottom-bar hiding assignments from destinations reached through Home, Explore, tab-bar, wallet, security, settings, sync, and tools navigation.
Payment navigation
DashWallet/Sources/UI/Payments/Landing/PaymentsLandingHostingController.swift, DashWallet/Sources/UI/Payments/Pay/SendScreenViewController.swift
Removed bottom-bar hiding assignments from scanned-send, payment-flow, and source-step destinations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: thepastaclaw

Merge Risk: Minimal · up to 48d9c

This change removes redundant per-screen flags that the shared navigation controller already applies when screens are pushed. No behavior change is expected. The planned manual check that the tab bar hides from each tab is still unchecked, so run it before merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: removing tab-bar flags (hidesBottomBarWhenPushed) that BaseNavigationController already sets. The raw summary shows the removals across many UI files, all consistent w…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: removing tab-bar flags (hidesBottomBarWhenPushed) that BaseNavigationController already sets. The raw summary shows the removals across many UI files, all consistent with this title. The title is specific and uses the 'refactor(ui):' convention, so a teammate scanning history can identify the primary change.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 86aacb84-7e23-4bee-a285-22fd176e6c11
Commits

Reviewing files that changed from the base of the PR and between 0cfeb51 and 48d9c3d.

Files selected for processing: 11

  • DashWallet/Sources/UI/Explore Dash/ExploreMenuScreen.swift
  • DashWallet/Sources/UI/Main/MainTabbarController.swift
  • DashWallet/Sources/UI/Menu/Main/MainMenuViewController.swift
  • DashWallet/Sources/UI/Menu/Security/SecurityMenuScreen.swift
  • DashWallet/Sources/UI/Menu/Security/Wallets/IdentitiesScreen.swift
  • DashWallet/Sources/UI/Menu/Security/Wallets/WalletAccountsScreen.swift
  • DashWallet/Sources/UI/Menu/Security/Wallets/WalletsScreen.swift
  • DashWallet/Sources/UI/Menu/Settings/SettingsScreen.swift
  • DashWallet/Sources/UI/Menu/SyncInfo/SyncInfoMenuScreen.swift
  • DashWallet/Sources/UI/Menu/Tools/Masternode Keys/Overview/KeysOverviewView.swift
  • DashWallet/Sources/UI/Menu/Tools/ToolsMenuScreen.swift
Files with no reviewable changes: 11

  • DashWallet/Sources/UI/Explore Dash/ExploreMenuScreen.swift
  • DashWallet/Sources/UI/Main/MainTabbarController.swift
  • DashWallet/Sources/UI/Menu/Main/MainMenuViewController.swift
  • DashWallet/Sources/UI/Menu/Security/SecurityMenuScreen.swift
  • DashWallet/Sources/UI/Menu/Security/Wallets/IdentitiesScreen.swift
  • DashWallet/Sources/UI/Menu/Security/Wallets/WalletAccountsScreen.swift
  • DashWallet/Sources/UI/Menu/Security/Wallets/WalletsScreen.swift
  • DashWallet/Sources/UI/Menu/Settings/SettingsScreen.swift
  • DashWallet/Sources/UI/Menu/SyncInfo/SyncInfoMenuScreen.swift
  • DashWallet/Sources/UI/Menu/Tools/Masternode Keys/Overview/KeysOverviewView.swift
  • DashWallet/Sources/UI/Menu/Tools/ToolsMenuScreen.swift

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@thepastaclaw

thepastaclaw commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ Final review complete — no blockers (commit 48d9c3d) · triage: low

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Phase 1 + Phase 2

At head 0cfeb51, the removed assignments are covered by BaseNavigationController's existing push and stack-replacement policy; no behavioral defect was confirmed. One comment now incorrectly attributes that policy to the pushed screens themselves. Current CI reports simulator tests, target membership, accessibility, and workflow lint passing; validation here was static, and the author's manual tab-bar spot-check remains unchecked.

💬 1 nitpick(s)

Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.

1 finding(s) not shown inline (the lines are not part of this PR's diff)

💬 Nitpick: Attribute tab-bar hiding to BaseNavigationController
DashWallet/Sources/UI/Main/MainTabbarController.swift:308-309

This comment says the pushed screens set hidesBottomBarWhenPushed, but this PR removes those assignments from the payments flow. The behavior remains intact because BaseNavigationController sets the property in its push and stack-replacement overrides. Update the attribution so the comment describes the surviving implementation, consistent with the project's comment-accuracy guardrail.

        // `BaseNavigationController` hides the bar on screens pushed above
        // the landing, so it is gone from the first step that asks for an amount.

source: glm-5.3-flash (phase1-reviewer: general)

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.1-sol (effort low) — This is a straightforward, behavior-preserving removal of duplicated navigation-bar assignments across UI call sites, with correctness readily confirmed by the existing BaseNavigationController implementation and call paths.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 77% left, weekly 61% left; passed over gemini-3.8-flash-high (antigravity quota lookup failed)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.

In `DashWallet/Sources/UI/Main/MainTabbarController.swift`:
- [NITPICK] DashWallet/Sources/UI/Main/MainTabbarController.swift:308-309: Attribute tab-bar hiding to BaseNavigationController
  This comment says the pushed screens set `hidesBottomBarWhenPushed`, but this PR removes those assignments from the payments flow. The behavior remains intact because BaseNavigationController sets the property in its push and stack-replacement overrides. Update the attribution so the comment describes the surviving implementation, consistent with the project's comment-accuracy guardrail.

@romchornyi-pitcrew romchornyi-pitcrew left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: ready to merge

No blockers or majors. Reviewed at 0cfeb51. Static read only, nothing built.

Level Verdict
1 · Idea ✅ Since #1333, BaseNavigationController sets the flag on every non-root push and on every setViewControllers entry after the first, so these 46 lines are redundant
2 · Architecture ✅ One rule, in the stack that owns the tab bar
3 · Completeness ✅ The kept cases are listed with reasons (modal roots, ObjC callers, PaymentController)
4 · Code ✅ Deletions only

Checked: every removed line still gets the flag

  • Every navigation controller the app creates is a BaseNavigationController / DWNavigationController, including the four tab stacks in MainTabbarController, the ObjC modal stacks and the storyboards. The only exception is the DWSettingsRowsUITestFixture window root, which has no tab bar. No removed controller is hosted through a UIViewControllerRepresentable, so none of them sits in a SwiftUI-owned navigation controller.
  • None of the removed controllers is a stack root.
    • makeSourceStep() is the second element of an explicit setViewControllers in both callers: PaymentsLandingHostingController and DWBasePayViewController.m L223. The override's dropFirst() covers it.
    • ResetWalletInfoHostingController is pushed from SecurityMenuScreen and WalletsScreen, both onto the More tab's stack.
    • DerivationPathKeysViewController, the Storage Explorer pages and MasternodesScreen are pushed onto the vc that Tools passes in.
  • The Coinbase and Uphold status screens are pushed onto the portal's own stack: a tab stack, or a modal BaseNavigationController that shows no tab bar either way.

Recommendations (non-blocking)

  1. Misleading CodeRabbit summary. The summary at the end of the description says "The bottom navigation bar now remains visible …", which is the opposite of this PR: nothing visible changes. Please delete or correct it so the release notes don't pick it up.
  2. Unchecked test-plan item. "Spot-check: tab bar hidden on pushed screens from each tab" is still unchecked. A minute in the simulator per tab would close it.
  3. Merge order with #1392. The two PRs conflict in 9 files. The fix is mechanical: drop the flag and keep vc?..

🤖 Reviewed with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — Final validation — Phase 1 + Phase 2

The refactor correctly centralizes tab-bar hiding through BaseNavigationController, and no behavioral regression is evident in the reviewed changes. One documentation nit remains: MainMenuViewController still says the CreateUsername push sets the flag directly, although that assignment was removed; the simulator test check is still queued, while completed policy and audit checks are green.

💬 1 nitpick(s)

Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.

1 finding(s) not shown inline (the lines are not part of this PR's diff)

💬 Nitpick: Tab-bar restore comment still attributes the flag to the CreateUsername push call site
DashWallet/Sources/UI/Menu/Main/MainMenuViewController.swift:84-87

The comment says the Join DashPay → CreateUsername push uses hidesBottomBarWhenPushed = true, but this PR removed that assignment from the CreateUsername push sites. The behavior remains correct because BaseNavigationController.pushViewController sets the flag for screens pushed above the stack root, but the comment now attributes the behavior to code that no longer exists.

        // Restore the tab bar when returning to this root screen. The
        // BaseNavigationController sets hidesBottomBarWhenPushed on every
        // screen pushed above the stack root; if the PIN modal sits on top
        // of the tab bar controller and the CreateUsername VC pops out
        // from underneath it (the known early-dismiss bug), UIKit never
        // restores the tab bar on the pop. Forcing it visible here is a
        // no-op when the bar is already showing.

source: glm-5.3-flash (phase1-reviewer: general)

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.1-sol (effort low) — This is a small, contained deletion-only UI navigation refactor whose correctness can be verified by checking each remaining push path and the shared BaseNavigationController behavior, with no critical surface involved.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 99% left, weekly 57% left; passed over gemini-3.8-flash-high (antigravity quota lookup failed)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.

In `DashWallet/Sources/UI/Menu/Main/MainMenuViewController.swift`:
- [NITPICK] DashWallet/Sources/UI/Menu/Main/MainMenuViewController.swift:84-87: Tab-bar restore comment still attributes the flag to the CreateUsername push call site
  The comment says the Join DashPay → CreateUsername push uses `hidesBottomBarWhenPushed = true`, but this PR removed that assignment from the CreateUsername push sites. The behavior remains correct because `BaseNavigationController.pushViewController` sets the flag for screens pushed above the stack root, but the comment now attributes the behavior to code that no longer exists.

@ross-dash
ross-dash merged commit d5f92c6 into develop Nov 13, 2026
8 checks passed
Sign up for free to 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.

3 participants