Repository navigation
refactor(ui): drop tab-bar flags BaseNavigationController already sets - #1394
Conversation
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>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
✅ Final review complete — no blockers (commit 48d9c3d) · triage: low |
thepastaclaw
left a comment
There was a problem hiding this comment.
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:
lowbygpt-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); agentphase1-reviewer - Phase 1 model:
glm-5.3-flash— zai quota: 5h 77% left, weekly 61% 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 (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
left a comment
There was a problem hiding this comment.
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 inMainTabbarController, the ObjC modal stacks and the storyboards. The only exception is theDWSettingsRowsUITestFixturewindow root, which has no tab bar. No removed controller is hosted through aUIViewControllerRepresentable, 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 explicitsetViewControllersin both callers:PaymentsLandingHostingControllerandDWBasePayViewController.mL223. The override'sdropFirst()covers it.ResetWalletInfoHostingControlleris pushed fromSecurityMenuScreenandWalletsScreen, both onto the More tab's stack.DerivationPathKeysViewController, the Storage Explorer pages andMasternodesScreenare pushed onto thevcthat Tools passes in.
- The Coinbase and Uphold status screens are pushed onto the portal's own stack: a tab stack, or a modal
BaseNavigationControllerthat shows no tab bar either way.
Recommendations (non-blocking)
- 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.
- 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.
- 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
left a comment
There was a problem hiding this comment.
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:
lowbygpt-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); agentphase1-reviewer - Phase 1 model:
glm-5.3-flash— zai quota: 5h 99% left, weekly 57% 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 (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.
Summary
Since #1333,
BaseNavigationControllersetshidesBottomBarWhenPushed = trueon every controller pushed above a stack's root (pushViewControllerandsetViewControllers). This removes 46 per-call-site assignments that duplicated it. Behaviour-neutral.A line was removed only where the push provably goes through a
BaseNavigationControllerand 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 aBaseNavigationController.SettingsScreenis also hosted by theDWSettingsRowsUITestFixturein a plainUINavigationController, but that is a window root with no tab bar, so the flag had no effect there.Kept on purpose
HomeViewController+Shortcuts,SwapKitPortalViewController,IdentityCreditBalancetop-up,RecoveryPhraseNavigationhelpers (also used as modal roots)AdvancedSecurityHostingControllerself-flag — has an ObjC (onboarding) callerCustodialSwapsViewController— never instantiated, origin unclearPaymentController— anchors include many ObjCDWBasePayViewControllersubclassesDWPreviewSeedPhraseViewController.m— ObjC, push path not clearTest plan
dashpayscheme builds (Debug, iOS Simulator)scripts/a11y_audit.py --check— no new findings🤖 Generated with Claude Code
Summary by CodeRabbit