Repository navigation
fix(ui): hide the tab bar on every screen pushed over a tab's root - #1333
Conversation
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]>
|
Warning Review limit reachedYou'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. View limit details
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. |
|
✅ Final review complete — no blockers (commit 655df85) · triage: low |
thepastaclaw
left a comment
There was a problem hiding this comment.
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:
lowbygpt-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); agentphase1-reviewer - Phase 1 model:
glm-5.3-flash— zai quota: 5h 99% left, weekly 99% left; passed overgemini-3.8-flash-high(antigravity quota lookup failed) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort medium); agentphase2-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.
| 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) | ||
| } |
There was a problem hiding this comment.
✅ 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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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]>
thepastaclaw
left a comment
There was a problem hiding this comment.
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:
lowbygpt-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); agentphase1-reviewer - Phase 1 model:
glm-5.3-flash— zai quota: 5h 98% left, weekly 90% left; passed overgemini-3.8-flash-high(antigravity quota lookup failed) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort medium); agentphase2-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
left a comment
There was a problem hiding this comment.
✅ 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
- The tab bar may stay hidden after a pop from under a modal —
—
MainMenuViewControlleralready forcestabBar.isHidden = falseinviewWillAppearbecause 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'sonGiftCardPurchased→popToRootViewController). Restoring the bar for the root indidShowhere would cover all tabs at once. (not verified: the pop-under-modal sequence was not reproduced on these paths) - A screen can no longer keep the tab bar — — the flag is forced to
truebefore every push, so a caller'shidesBottomBarWhenPushed = falseis silently overwritten. No caller does this today; a line in the doc comment would save the next person a surprise. - Comments still describe the opt-in as required — , .
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
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.BaseNavigationControllernow sets the flag on every controller pushed onto a non-empty stack, and on all but the first insetViewControllers, so new screens get it by default.The existing per-screen
hidesBottomBarWhenPushed = truelines are now redundant but harmless; they are left in place to keep this diff to one file.Screenshots
Test plan
dashpayDebug simulator buildscripts/a11y_audit.py --check: no new findings🤖 Generated with Claude Code