Skip to content

fix(ui): hide the tab bar on every screen pushed over a tab's root - #1333

Merged
ross-dash merged 2 commits into
developfrom
fix/hide-tab-bar-on-pushed-screens
Nov 11, 2026
Merged

ross-dash merged 2 commits into
developfrom
fix/hide-tab-bar-on-pushed-screens

Conversation

@ross-dash

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

Copy link
Copy Markdown
Contributor

Summary

Only a tab's root screen (Home, Contacts, Payments, Explore, More) shows the tab bar. Every screen pushed above it hides the bar.

Until now each pushed screen opted in with hidesBottomBarWhenPushed, and those that forgot kept the bar, for example ATMs, Where to Spend, merchant details and all locations in Explore. BaseNavigationController now sets the flag on every controller pushed onto a non-empty stack, and on all but the first in setViewControllers, so new screens get it by default.

The existing per-screen hidesBottomBarWhenPushed = true lines are now redundant but harmless; they are left in place to keep this diff to one file.

Screenshots

image-1794317146638

Test plan

  • dashpay Debug simulator build
  • scripts/a11y_audit.py --check: no new findings
  • Explore → ATMs:
    • no tab bar;
    • back to Explore shows it again.
  • More → Tools: no tab bar; back to More shows it again.
  • Spot-check the Home, Contacts and Payments tabs' pushed screens

🤖 Generated with Claude Code

Only a tab's root screen shows the tab bar. BaseNavigationController sets
hidesBottomBarWhenPushed on everything pushed (or set) above the root, so
screens that never set it themselves, like the Explore lists, no longer
keep the bar.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

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: d1212801-588d-4d75-b9d9-2547960dab1a
Commits

Reviewing files that changed from the base of the PR and between f896b98 and 655df85.

Files selected for processing: 3

  • DashWallet.xcodeproj/project.pbxproj
  • DashWallet/Sources/UI/Views/Navigation/BaseNavigationController.swift
  • DashWalletTests/BaseNavigationControllerTabBarTests.swift
  • 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

@thepastaclaw

thepastaclaw commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ Final review complete — no blockers (commit 655df85) · 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 25005f5, the centralized policy covers the affected Explore pushes and existing stack-replacement callers without a confirmed behavioral defect. A focused regression test would protect the new root-versus-child invariant. Current CI shows simulator tests pending, with test-target membership and accessibility checks passing; no builds or tests were run in this static review.

🟡 1 suggestion(s)

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) — The change is a small, straightforward update confined to BaseNavigationController that consistently hides the tab bar for non-root screens without touching critical surfaces.
  • 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 99% 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. Verify each finding against the current code and only fix it if needed.

In `DashWallet/Sources/UI/Views/Navigation/BaseNavigationController.swift`:
- [SUGGESTION] DashWallet/Sources/UI/Views/Navigation/BaseNavigationController.swift:115-127: Add regression coverage for the centralized tab-bar policy
  Neither BaseNavigationController nor hidesBottomBarWhenPushed is referenced by the existing unit tests. This change makes two small invariants responsible for navigation chrome across the app: pushing onto an empty stack must leave the root unmodified, and pushing or installing subsequent controllers must set their hiding flag. Add a focused @MainActor host-app XCTest using plain UIViewControllers to cover an empty-stack push, subsequent pushes, and setViewControllers with multiple controllers. Assert that fresh roots remain false and every child becomes true. These tests would catch a regression in the shared policy independently of the manual Explore and More checks.

Comment on lines 115 to +127
override func pushViewController(_ viewController: UIViewController, animated: Bool) {
isPushAnimationInProgress = true

if !viewControllers.isEmpty {
hideTabBar(on: viewController)
}
super.pushViewController(viewController, animated: animated)
}

override func setViewControllers(_ viewControllers: [UIViewController], animated: Bool) {
viewControllers.dropFirst().forEach(hideTabBar(on:))
super.setViewControllers(viewControllers, animated: animated)
}

@thepastaclaw thepastaclaw Nov 9, 2026 •

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.

✅ Resolved at 655df853; see the replies below.

🟡 Suggestion: Add regression coverage for the centralized tab-bar policy

Neither BaseNavigationController nor hidesBottomBarWhenPushed is referenced by the existing unit tests. This change makes two small invariants responsible for navigation chrome across the app: pushing onto an empty stack must leave the root unmodified, and pushing or installing subsequent controllers must set their hiding flag. Add a focused @mainactor host-app XCTest using plain UIViewControllers to cover an empty-stack push, subsequent pushes, and setViewControllers with multiple controllers. Assert that fresh roots remain false and every child becomes true. These tests would catch a regression in the shared policy independently of the manual Explore and More checks.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added in 655df85: BaseNavigationControllerTabBarTests, a @MainActor host-app XCTest with plain UIViewControllers. It covers a root from init(rootViewController:), a first push onto an empty stack (both stay false), two pushes above the root, and setViewControllers with three controllers (everything after the first becomes true). All four pass.

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.

Resolved (re-reviewed at 655df853): The new BaseNavigationControllerTabBarTests.swift now covers root preservation, a first push onto an empty stack, multiple pushes above a root, and setViewControllers with multiple controllers. The file is included in the DashWalletTests target, and exact-head CI reports the simulator test and target-membership checks passing.

A root keeps the tab bar, including the first push onto an empty stack;
every controller pushed or set above it hides the bar.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ross-dash
ross-dash requested a review from romchornyi November 10, 2026 13:36

@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 PR correctly centralizes tab-bar hiding for pushes onto non-empty navigation stacks and for bulk stack replacement. The added host-app XCTest covers root initialization, first pushes, subsequent pushes, and setViewControllers behavior; exact-head CI reports the simulator tests and target-membership checks passing. No in-scope correctness issues remain.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

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, well-contained UIKit navigation behavior change in BaseNavigationController with focused tests and no critical security or financial logic 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 98% left, weekly 90% 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. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

@romchornyi romchornyi 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.

✅ no major · 3 non-blocking recommendations · no blockers — reviewed at 655df8538c

Level Verdict
1 · Idea ✅ valid One rule in BaseNavigationController instead of a per-screen opt-in that screens forgot.
2 · Architecture ✅ right layer Home, Payments, Explore and More are all BaseNavigationControllers; Contacts is a SwiftUI root that only presents sheets, so it has no pushes to cover.
3 · Completeness ✅ complete All stack writers checked (push, setViewControllers, viewControllers =, replaceLast). The test plan still leaves the Home / Payments pushed screens unchecked; worth a spot-check before merge.
4 · Code ✅ clean No defect found.
3 non-blocking recommendations
  1. The tab bar may stay hidden after a pop from under a modal —
    tabBarController?.tabBar.isHidden = false
    — MainMenuViewController already forces tabBar.isHidden = false in viewWillAppear because UIKit does not restore the bar when a flagged screen is popped while a modal sits on the tab bar controller. Every Home and Explore push is now flagged too, and their roots have no such fallback (e.g. Explore's onGiftCardPurchased → popToRootViewController). Restoring the bar for the root in didShow here would cover all tabs at once. (not verified: the pop-under-modal sequence was not reproduced on these paths)
  2. A screen can no longer keep the tab bar — — the flag is forced to true before every push, so a caller's hidesBottomBarWhenPushed = false is silently overwritten. No caller does this today; a line in the doc comment would save the next person a surprise.
  3. Comments still describe the opt-in as required —
    // The screens it pushes set `hidesBottomBarWhenPushed`, so the bar is
    ,
    /// The landing keeps the tab bar; everything it pushes is a step in a
    .
Review details

Layered review: idea → architecture → completeness → code. Level 4 ran the general correctness lane; findings 1–2 were checked against the code, and a suspected "pushed controller promoted to root keeps the flag" case was dropped because no code path reuses a pushed instance as the new root.

🤖 Reviewed with Claude Code

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