Skip to content

feat(ui): move system nav bars and sheet headers to DashUIKit - #1220

Merged
ross-dash merged 9 commits into
developfrom
feat/update-top-nav-system-bars
Nov 12, 2026
Merged

ross-dash merged 9 commits into
developfrom
feat/update-top-nav-system-bars

Conversation

@ross-dash

@ross-dash ross-dash commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #1218. Moves the remaining Apple system navigation bars and hand-built sheet headers onto DashUIKit's NavigationBar / BottomSheet (74pt bar, circle back/close, Subhead Medium title).

Screens that used the system bar

  • Contacts intro, wallet-preparation Help, Create username (recovery opens with a close circle)
  • Explore: Merchant filters (X + Apply), Location picker
  • More → Tools → Masternodes flow (list, evonode status, withdrawal, add/track node); refresh is a circle button
  • More → Voting (username voting with ⋯ menu as a circle, contest and contender detail)
  • Storage Explorer: all pages, via a shared StorageExplorerNavigator + storageExplorerPage modifier
  • Edit Profile (UIKit): the system bar is replaced by an embedded DashUIKit bar

Sub-screens are pushed through the app's UIKit navigation (not a SwiftUI NavigationStack), so swipe-back keeps working while the system bar is hidden.

Sheets now on DashUIKit.BottomSheet

  • DashPay: contact profile (back + "Transaction" when a payment is open), add contact and its preview, pay, my profile, my QR, about DashPay, confirm send to contact
  • Voting: node selection, cast vote, bulk vote (close disabled while casting)
  • DashConnect: approve connection / token purchase (X = deny, swipe blocked while loading)
  • Wallets: add (title follows the step, back returns to the chooser), remove
  • Masternodes: unban, withdraw, add keys

Intentionally unchanged: the Voting keys flow container (its inner navigation needs its own stack; both its screens already draw the new bar) and CrowdNode (hidden this release).

Dependency

Uses dashpay/DashUIKit#22 (NavigationBarCircleIcon / NavigationBarCircleButton / NavigationBarCircleMenu), which is merged; Package.resolved pins the DashUIKit master revision that includes it.

Test plan

  • dashpay Debug simulator build against the pinned DashUIKit master
  • scripts/a11y_audit.py --check: no new findings
  • Simulator check of Step 2 screens and Step 3 sheets on a wallet with a username
  • Storage Explorer: push / swipe back / refresh
  • Edit Profile: close with unsaved changes shows the save prompt

🤖 Generated with Claude Code

Screens that still used Apple's navigation bar, and sheets with
hand-built headers, now draw DashUIKit's NavigationBar / BottomSheet:
74pt bar, circle back/close, Subhead Medium title.

- System-bar screens: Contacts intro, wallet-preparation Help, Create
  username, Merchant filters and Location picker, the Masternodes flow
  and Username voting. Sub-screens push through the app's UIKit
  navigation so swipe-back keeps working with the system bar hidden.
- Sheets: DashPay (contact profile, add contact, pay, my profile, QR,
  about DashPay, confirm send), voting (node selection, cast, bulk),
  DashConnect approvals, Wallets add/remove, masternode unban /
  withdraw / add keys.
- Storage Explorer: every page via a shared StorageExplorerNavigator
  and storageExplorerPage modifier; refresh moves into a bar circle.
- Edit Profile (UIKit): the system bar is replaced by an embedded
  DashUIKit bar.
- Shared ListDisclosureRow for push rows that are no longer
  NavigationLinks.

Needs DashUIKit's NavigationBarCircleIcon / NavigationBarCircleButton.

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

coderabbitai Bot commented Oct 16, 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 44 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: 5189b79f-873a-40ed-8287-d961cc20c196
Commits

Reviewing files that changed from the base of the PR and between d0e58eb and 7ef5494.

Files selected for processing: 35

  • DashWallet.xcodeproj/project.pbxproj
  • DashWallet/Sources/UI/DashConnect/ApproveConnectionSheet.swift
  • DashWallet/Sources/UI/DashConnect/ApproveTokenPurchaseSheet.swift
  • DashWallet/Sources/UI/DashConnect/Components/ApproveSheetPresentation.swift
  • DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift
  • DashWallet/Sources/UI/DashPay/Contacts/SwiftUI/AddContactScreen.swift
  • DashWallet/Sources/UI/DashPay/Contacts/SwiftUI/ContactProfileSheet.swift
  • DashWallet/Sources/UI/DashPay/Contacts/SwiftUI/ContactsScreen.swift
  • DashWallet/Sources/UI/DashPay/Profile/Edit Profile/RootEditProfileViewController.swift
  • DashWallet/Sources/UI/DashPay/Profile/SDKIdentityProfileSheet.swift
  • DashWallet/Sources/UI/DashPay/Setup/CreateUsername/CreateUsernameViewController.swift
  • DashWallet/Sources/UI/DashPay/Voting/BulkVoteSheet.swift
  • DashWallet/Sources/UI/DashPay/Voting/CastVoteSheet.swift
  • DashWallet/Sources/UI/DashPay/Voting/ContestDetailScreen.swift
  • DashWallet/Sources/UI/DashPay/Voting/UsernameVotingScreen.swift
  • DashWallet/Sources/UI/DashPay/Voting/VotingNodeSelectionSheet.swift
  • DashWallet/Sources/UI/Explore Dash/Merchants & ATMs/List/Filters/MerchantFiltersView.swift
  • DashWallet/Sources/UI/Explore Dash/Merchants & ATMs/List/Filters/TerritoryPickerView.swift
  • DashWallet/Sources/UI/Main/WalletPreparationSupport.swift
  • DashWallet/Sources/UI/Menu/Main/MainMenuViewController.swift
  • DashWallet/Sources/UI/Menu/Security/Wallets/WalletsScreen.swift
  • DashWallet/Sources/UI/Menu/Tools/Evonode Status/EvonodeStatusScreen.swift
  • DashWallet/Sources/UI/Menu/Tools/Masternode Withdrawal/EvonodeWithdrawalScreen.swift
  • DashWallet/Sources/UI/Menu/Tools/MasternodesScreen.swift
  • DashWallet/Sources/UI/Menu/Tools/StorageExplorer/StorageExplorerNavigation.swift
  • DashWallet/Sources/UI/Menu/Tools/StorageExplorer/StorageExplorerUnavailableView.swift
  • DashWallet/Sources/UI/Menu/Tools/StorageExplorer/StorageExplorerView.swift
  • DashWallet/Sources/UI/Menu/Tools/StorageExplorer/StorageModelListViews.swift
  • DashWallet/Sources/UI/Menu/Tools/StorageExplorer/StorageRecordDetailViews.swift
  • DashWallet/Sources/UI/Menu/Tools/ToolsMenuScreen.swift
  • DashWallet/Sources/UI/Menu/Tools/Tracked Masternodes/AddMasternodeScreen.swift
  • DashWallet/Sources/UI/Menu/Tools/Tracked Masternodes/TrackedMasternodeDetailScreen.swift
  • DashWallet/Sources/UI/Menu/Tools/Unban/UnbanMasternodeSheet.swift
  • DashWallet/Sources/UI/SwiftUI Components/Extensions.swift
  • DashWallet/Sources/UI/Views/Navigation/BaseNavigationController.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 Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ Final review complete — no blockers (commit 7ef5494) · triage: normal

Refresh circles (Storage Explorer, Evonode status) and the Username
voting overflow menu use NavigationBarCircleButton /
NavigationBarCircleMenu with a DashIconSource icon and a Text label.
While refreshing, the button is disabled and DashUIKit dims it, in
place of the old in-circle spinner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ross-dash and others added 3 commits October 26, 2026 12:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts:
- Package.resolved: keep the DashUIKit pin with the circle button API.
- ContactProfileSheet: keep the DashUIKit BottomSheet header (back +
  "Transaction" while a payment is open, close via closeProfile()) over
  develop's NavigationStack + Done; adopt develop's contactReturn on the
  pushed tx detail. PayContactSheet: develop's ExternalSendAmountScreen.
- SendScreen: develop's ConfirmContactSendSheet (BottomSheet.selfSizing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ross-dash
ross-dash marked this pull request as ready for review November 9, 2026 12:49
@ross-dash
ross-dash requested a review from romchornyi November 9, 2026 12:49
…v-system-bars

# Conflicts:
#	DashWallet.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	DashWallet/Sources/UI/DashConnect/ApproveConnectionSheet.swift
#	DashWallet/Sources/UI/DashConnect/Components/ApproveSheetPresentation.swift
#	DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift
#	DashWallet/Sources/UI/Main/WalletPreparationSupport.swift

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

🟡 2 major (inline, not verified at runtime) · 8 non-blocking recommendations · no blockers — reviewed at d930645b2c

Level Verdict
1 · Idea ✅ valid Follow-up to #1218: the remaining system bars and hand-built sheet headers move onto DashUIKit NavigationBar / BottomSheet.
2 · Architecture ✅ right layer DashUIKit components are reused unchanged. Storage Explorer gets a shared navigator that holds the navigation controller weakly. Masternodes and Voting instead pass a strong vc through 8 initialisers and copy the bar block ~10 times (recommendation 8).
3 · Completeness ✅ complete At the head, the only system navigationTitle left is in a fixture. Voting keys and CrowdNode are out of scope, and the PR body names both.
4 · Code 🟡 2 major Retain cycle through a strong vc, and a pop while a sheet or dialog is still closing.

Before merge: the branch conflicts with develop in Package.resolved, ApproveConnectionSheet.swift, ApproveSheetPresentation.swift, ConnectionsScreen.swift and WalletPreparationSupport.swift (#1210, #1204, #1202 and #1282 landed since). For Package.resolved, take develop's DashUIKit pin 4494a8b. It already contains this PR's pin ab8e423, so the circle button / menu API is in.

Major (inline)

8 non-blocking recommendations
  1. Double tap pushes twice — — rows that were NavigationLinks are now Button → pushViewController with no re-entry guard. The same applies to , the "+" button, the Voting rows, ContenderRow and
    navigationController?.pushViewController(hostingController(for: page), animated: true)
    . A fast double tap stacks two copies of the screen and loads it twice.
  2. No edge swipe on the contact's transaction detail —
    NavigationLink(
    isActive: Binding(
    get: { selectedPaymentId != nil },
    set: { if !$0 { selectedPaymentId = nil } }),
    destination: {
    if let paymentId = detailPaymentId,
    let tx = resolvedByTxid[paymentId] {
    // This contact's row leads back to this profile,
    // not to another one stacked on top.
    TXDetailVCWrapper(
    tx: tx,
    navigateBack: .constant(false),
    contactReturn: .init(identityId: contact.contactIdentityId,
    goBack: { selectedPaymentId = nil }))
    .navigationBarHidden(true)
    — NavigationLink(isActive:) inside BottomSheet's NavigationView, with .navigationBarHidden(true), turns off swipe-back. Before, the visible NavigationStack bar kept it. On iPad (TARGETED_DEVICE_FAMILY 1,2) a NavigationView without .stack style may also open the link as a column.
  3. Bar titles lost the heading trait — the system bar title was a VoiceOver heading, and the new Text titles are not. Adding .accessibilityAddTraits(.isHeader) covers the titles the app builds; the BottomSheet(title:) headers need it in DashUIKit.
  4. Recovery cover lost its title — — "Finish username registration" now shows a bare form that looks the same as the first-time Create Username flow.
  5. Stale doc comment —
    /// SwiftUI list needs its own `NavigationStack` for row drill-downs, so
    — it still describes the NavigationStack this PR removed.
  6. Edit Profile extends a UIKit screen — — embeds a hosting controller for the bar. The repo's CLAUDE.md says to maintain UIKit screens but not extend them.
  7. Duplicate chevron — — copies the new ListDisclosureRow style. The chevron sits outside the tappable area, so it looks tappable but does nothing.
  8. One navigator for the pushed pages — moving Storage Explorer's weak navigator and a shared pushedPage(title:trailing:) modifier into one place would fix the cycle, the double push and the drifting 60/64pt title padding once instead of per screen. UsernameVotingScreen would also lose its second pop path (vc + onClose).
Review details

Layered review: idea → architecture → completeness → code. Level 4 ran a general code-review lane and a UI lane that read base and head of all 35 files against DashUIKit NavigationBar / BottomSheet at the pinned revision. The UI lane found no regression in these areas:

  • back and close pop or dismiss the same thing as before, and swipe-back works on the UIKit pushes;
  • interactiveDismissDisabled and close-while-busy are kept on DashConnect, AddWallet and the profile sheets;
  • Edit Profile still shows the unsaved-changes prompt;
  • Refresh, Apply, the menus and "+" keep their disabled states;
  • every circle button has a VoiceOver label;
  • every new string has an English key.

Both majors were checked against the code at the reviewed head; neither was run on a device.

🤖 Reviewed with Claude Code

}
)
)
let hosting = UIHostingController(rootView: UsernameVotingScreen(vc: vc, onClose: popRoot))

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.

Major: vc is passed into the screen strongly, while this hosting controller sits in vc's own stack. The other pushed screens keep let vc: UINavigationController the same way: Masternodes, Contest detail, Evonode status/withdrawal, Add/Tracked masternode. That makes a retain cycle. The old code only captured [weak navController], and popRoot above still does.

A normal pop breaks the cycle. If the navigation controller is dropped with these pages still on it, for example when the tab hierarchy is rebuilt, the stack and its view models leak. StorageExplorerNavigator in this PR holds the controller weak, and the same pattern here would close it. (cycle verified in code; leak not reproduced)

@ross-dash ross-dash Nov 10, 2026 •

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.

Fixed in 6b6fc36: every page this PR converts (voting, contest/contender, masternodes, Evonode status/withdrawal, Add/Tracked masternode) now holds weak var vc: UINavigationController?, so there is no cycle. Screens already on develop with the same pattern (Settings, Security, etc.) are left for a separate PR.

showConfirmation = false
onWithdrawn(remaining)
dismiss()
vc.popViewController(animated: true)

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.

Major: showConfirmation = false and vc.popViewController(animated:) run in the same turn, while the confirm sheet this screen presented is still on screen. The UIKit pop can start before SwiftUI dismisses the sheet. The result can be a "dismiss while a transition is in progress" warning, a sheet left over after its owner is gone, or a pop that doesn't happen. The same applies to line 113 and to TrackedMasternodeDetailScreen.swift:331, which pops from a confirmationDialog action. ContenderDetailScreen waits on transitionCoordinator for this reason; the sheet's onDismiss would do it here. (not verified at runtime)

@ross-dash ross-dash Nov 10, 2026 •

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.

Fixed in 6b6fc36: the withdrawal now pops in the sheet's onDismiss, i.e. after the sheet is gone. For "Stop tracking" from the confirmationDialog I added UINavigationController.popAfterPresentationEnds(), which waits for whatever is presented on top to finish dismissing.

@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

Static verification of head a0cf4c5 confirms broken contact-payment detail navigation and newly introduced navigation-controller retain cycles; the migrated voting sheets also retain a dismissal-cleanup gap, and the new search field exposes a tracked upstream contrast defect. Target-membership and accessibility checks pass, while simulator tests remain pending; no local builds or tests were run. Develop's newer localization commit does not supersede this migration, but merging it conflicts in WalletPreparationSupport.swift and requires preserving its localization changes.

🔴 2 blocking | 🟡 2 suggestion(s)

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (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: normal by gpt-6.1-sol (effort low) — This is a broad UI navigation and sheet-presentation migration across 34 files, but the changes do not themselves alter funds movement, cryptography, key handling, consensus, network deserialization, or storage migrations.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); 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/DashPay/Contacts/SwiftUI/ContactProfileSheet.swift`:
- [BLOCKING] DashWallet/Sources/UI/DashPay/Contacts/SwiftUI/ContactProfileSheet.swift:105-113: Restore a navigation container for contact transaction details
  This NavigationLink has no navigation container. The PR removes ContactProfileSheet's NavigationStack, and BottomSheet at the pinned DashUIKit revision 4494a8b317af9faf84f40369b9279488b3bc38ce renders content directly inside a VStack, without NavigationStack or NavigationView. ContactsScreen and NotificationsScreen present ContactProfileSheet directly as sheet content, and TxDetailViewController also presents it directly in a hosting controller. Tapping a resolved payment therefore changes selectedPaymentId and the header to “Transaction” without navigating to TXDetailVCWrapper. Render the selected transaction directly inside BottomSheet, or add an explicit app-owned navigation container with its system bar hidden. Cover payment selection and return to the profile with a focused regression check against the pinned dependency.

In `DashWallet/Sources/UI/Menu/Tools/MasternodesScreen.swift`:
- [BLOCKING] DashWallet/Sources/UI/Menu/Tools/MasternodesScreen.swift:225-226: Break the new navigation-stack retain cycles
  MasternodesScreen now stores navigation strongly in its vc property, forming navigation controller → hosting controller → root view → navigation controller. The previous wrapper captured navigation weakly. There is a concrete teardown path: HomeViewController.homeViewShowMasternodes() pushes this host, while MainTabbarController.configureControllers() replaces the Home navigation controller during wallet or identity reconfiguration. Replacing that hierarchy with Masternodes still open leaves the old stack, Home controller, and screen models retained. An ordinary pop breaks the cycle, but hierarchy replacement does not. Use a weak navigation facade or weakly capturing navigation actions, following StorageExplorerNavigator's ownership pattern, and apply that consistently to the newly converted voting, contest/contender, and masternode pages that also store UINavigationController strongly.

In `DashWallet/Sources/UI/DashPay/Voting/CastVoteSheet.swift`:
- [SUGGESTION] DashWallet/Sources/UI/DashPay/Voting/CastVoteSheet.swift:74-82: Handle swipe dismissal as well as the vote sheet's close button
  The migrated CastVoteSheet and BulkVoteSheet disable only BottomSheet's close button while casting. The pinned BottomSheet defaults isDismissalEnabled to true and explicitly calls onClose only for the button, not for interactive dismissal. Neither presenting sheet supplies an onDismiss cleanup callback. A user can therefore swipe away during casting or after a report appears without calling dismissCastResult(); the shared VotingViewModel retains lastCastReport or bulkReports, and a subsequent sheet displays that old result instead of its confirmation form. This migration carries the existing dismissal gap into the new sheet API. Bind isDismissalEnabled to !viewModel.isCasting and clear result state when either sheet actually dismisses, including by swipe.

In `DashWallet/Sources/UI/DashPay/Voting/UsernameVotingScreen.swift`:
- [SUGGESTION] DashWallet/Sources/UI/DashPay/Voting/UsernameVotingScreen.swift:59-62: Consume the upstream fix for the search placeholder's dark-mode contrast
  Replacing the system searchable field with DashUIKit.SearchBar exposes a contrast defect in the pinned dependency. Its prompt uses black1000Alpha30, whose color asset has no dark appearance, so the empty “Search usernames” prompt has very low contrast against the dark field. DashUIKit already provides searchPlaceholder with a white dark-mode variant. The owning-layer correction is tracked at https://github.com/dashpay/DashUIKit/issues/54; fix the component there and consume the corrected revision rather than adding an app-local styling workaround. This remains a non-blocking upstream follow-up.

Comment on lines +105 to +113
.background(
// Reuse the standard tx-detail screen, pushed inside the
// sheet's navigation view. The sheet header owns the back
// button, so the pushed page hides its own bar and the pop
// is driven by clearing `selectedPaymentId`.
NavigationLink(
isActive: Binding(
get: { selectedPaymentId != nil },
set: { if !$0 { selectedPaymentId = nil } }),

@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 c4bf6310; see the replies below.

🔴 Blocking: Restore a navigation container for contact transaction details

This NavigationLink has no navigation container. The PR removes ContactProfileSheet's NavigationStack, and BottomSheet at the pinned DashUIKit revision 4494a8b317af9faf84f40369b9279488b3bc38ce renders content directly inside a VStack, without NavigationStack or NavigationView. ContactsScreen and NotificationsScreen present ContactProfileSheet directly as sheet content, and TxDetailViewController also presents it directly in a hosting controller. Tapping a resolved payment therefore changes selectedPaymentId and the header to “Transaction” without navigating to TXDetailVCWrapper. Render the selected transaction directly inside BottomSheet, or add an explicit app-owned navigation container with its system bar hidden. Cover payment selection and return to the profile with a focused regression check against the pinned dependency.

source: gpt-6.1-sol (phase2-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.

Fixed in 6b6fc36: BottomSheet has no navigation container at the pinned revision, so the tx detail now replaces the profile inside the sheet instead of being pushed; the header's back button returns to the profile.

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 c4bf6310): Verified that resolved payment selection now renders TXDetailVCWrapper directly inside BottomSheet rather than requiring a navigation container. Both the header back action and the transaction's contact-return callback clear the selection and restore the profile.

Comment on lines 225 to +226
static func hostingController(popFrom navigation: UINavigationController) -> UIViewController {
let popRoot: () -> Void = { [weak navigation] in
_ = navigation?.popViewController(animated: true)
}
let hosting = UIHostingController(
rootView: AnyView(
NavigationStack {
MasternodesScreen()
.navigationTitle(NSLocalizedString("Masternodes", comment: "Masternodes"))
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
Button(action: popRoot) {
Image(systemName: "chevron.left")
}
}
}
}
)
)
let hosting = UIHostingController(rootView: MasternodesScreen(vc: navigation))

@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 c4bf6310; see the replies below.

🔴 Blocking: Break the new navigation-stack retain cycles

MasternodesScreen now stores navigation strongly in its vc property, forming navigation controller → hosting controller → root view → navigation controller. The previous wrapper captured navigation weakly. There is a concrete teardown path: HomeViewController.homeViewShowMasternodes() pushes this host, while MainTabbarController.configureControllers() replaces the Home navigation controller during wallet or identity reconfiguration. Replacing that hierarchy with Masternodes still open leaves the old stack, Home controller, and screen models retained. An ordinary pop breaks the cycle, but hierarchy replacement does not. Use a weak navigation facade or weakly capturing navigation actions, following StorageExplorerNavigator's ownership pattern, and apply that consistently to the newly converted voting, contest/contender, and masternode pages that also store UINavigationController strongly.

source: muse-spark-1.3-contributor (phase1-reviewer: general); gpt-6.1-sol (phase2-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.

Fixed in 6b6fc36: every page this PR converts now holds the navigation controller weakly (weak var vc).

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 c4bf6310): Verified weak navigation-controller storage across all converted voting, contest/contender, masternode, status, withdrawal, and add/track pages. The voting root's close closure also captures navigation weakly, removing the ownership cycles identified in this thread.

Comment on lines +74 to +82
DashUIKit.BottomSheet(
title: NSLocalizedString("Cast vote", comment: "Voting"),
showBackButton: .constant(false),
isCloseButtonEnabled: !viewModel.isCasting,
onClose: {
viewModel.dismissCastResult()
dismiss()
},
background: Color(UIColor.systemGroupedBackground)

@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 c4bf6310; see the replies below.

🟡 Suggestion: Handle swipe dismissal as well as the vote sheet's close button

The migrated CastVoteSheet and BulkVoteSheet disable only BottomSheet's close button while casting. The pinned BottomSheet defaults isDismissalEnabled to true and explicitly calls onClose only for the button, not for interactive dismissal. Neither presenting sheet supplies an onDismiss cleanup callback. A user can therefore swipe away during casting or after a report appears without calling dismissCastResult(); the shared VotingViewModel retains lastCastReport or bulkReports, and a subsequent sheet displays that old result instead of its confirmation form. This migration carries the existing dismissal gap into the new sheet API. Bind isDismissalEnabled to !viewModel.isCasting and clear result state when either sheet actually dismisses, including by swipe.

source: muse-spark-1.3-contributor (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.

Fixed in 6b6fc36: both vote sheets disable interactive dismissal while casting, and both presenters clear the cast result in onDismiss, so a swipe-down leaves no stale report.

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 c4bf6310): Verified your fix in both vote sheets: interactive dismissal and close are disabled while casting. Both presenters now call dismissCastResult() from onDismiss, covering swipe dismissal as well as the explicit close action.

Comment on lines +59 to +62
DashUIKit.SearchBar(
text: $viewModel.searchQuery,
placeholder: NSLocalizedString("Search usernames", comment: "Voting"))
.padding(.horizontal, 20)

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

⏸️ Needs a tracking issue (not yet deferred) at 7ef54943; see the replies below.

🟡 Suggestion: Consume the upstream fix for the search placeholder's dark-mode contrast

Replacing the system searchable field with DashUIKit.SearchBar exposes a contrast defect in the pinned dependency. Its prompt uses black1000Alpha30, whose color asset has no dark appearance, so the empty “Search usernames” prompt has very low contrast against the dark field. DashUIKit already provides searchPlaceholder with a white dark-mode variant. The owning-layer correction is tracked at dashpay/DashUIKit#54; fix the component there and consume the corrected revision rather than adding an app-local styling workaround. This remains a non-blocking upstream follow-up.

source: gpt-6.1-sol (phase2-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.

Agreed — left for the upstream fix in DashUIKit#54; we'll consume it with the next DashUIKit bump.

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.

Still applies (re-reviewed at c4bf6310): DashUIKit#54 is the right place to track and implement the correction. However, this diff newly replaces the adaptive system search field with the affected component, and the pinned revision still uses the non-adaptive prompt color, so this remains a non-blocking regression until the corrected dependency is consumed.

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.

Needs a tracking issue (re-reviewed at 7ef54943): Deferring this needs a tracking issue for the follow-up, and none is linked in this thread, the PR description or the PR comments. Link one, or ask here and I'll file it; until then the finding stands.

ross-dash and others added 2 commits November 10, 2026 23:24
- Converted pages hold their navigation controller weakly, so a stack
  dropped with them still on it is released.
- The Evonode withdrawal pops after its confirmation sheet has dismissed;
  "Stop tracking" pops after its confirmation dialog has gone, through the
  new UINavigationController.popAfterPresentationEnds().
- The contact profile shows a payment's tx detail in place inside the
  bottom sheet, which has no navigation container to push into.
- The vote sheets cannot be swiped away while casting, and their
  presenters clear the cast result however the sheet closes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…v-system-bars

# Conflicts:
#	DashWallet/Sources/UI/Main/WalletPreparationSupport.swift

@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

Verified the complete 35-file diff at c4bf631 and found no blocking defect; the proposed tab-bar regression is a false positive. One non-blocking dependency-consumption suggestion remains. Exact-head simulator tests, accessibility, target-membership, and workflow checks pass; this verification was static, with no local builds or tests run.

🟡 1 suggestion(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.

Still open from earlier rounds (1)

  • 🟡 Suggestion: Consume the upstream fix for the search placeholder's dark-mode contrast — DashWallet/Sources/UI/DashPay/Voting/UsernameVotingScreen.swift:60-62 (thread)
Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — This is a large, cross-cutting UI navigation and sheet presentation change, but the changes described do not alter funds movement, cryptography, key handling, consensus, network deserialization, or storage migrations.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort high); 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/DashPay/Voting/UsernameVotingScreen.swift`:
- [SUGGESTION] DashWallet/Sources/UI/DashPay/Voting/UsernameVotingScreen.swift:60-62: Consume the upstream fix for the search placeholder's dark-mode contrast
  (carried; thread: https://github.com/dashpay/dashwallet-ios/pull/1220#discussion_r4513608989)

…v-system-bars

# Conflicts:
#	DashWallet/Sources/UI/DashConnect/ApproveConnectionSheet.swift
#	DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift

@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

Verified the DashUIKit navigation and sheet migration at head 7ef5494 against the source and pinned dependency; no additional in-scope defects were confirmed. Current CI passes target membership, accessibility, and workflow lint, while simulator tests remain pending. Validation was static only; no local builds or tests were run.

🟡 1 suggestion(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.

⏸️ Awaiting tracking link (1): Consume the upstream fix for the search placeholder's dark-mode contrast (thread). Link an issue on its thread, or ask there and PastaClaw files it.

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (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: normal by gpt-6.1-sol (effort low) — This is a broad, cross-cutting UI and navigation refactor spanning many screens and UIKit/SwiftUI presentation paths, but it does not change funds movement, cryptography, key handling, consensus, network deserialization, or storage migrations.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); 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/DashPay/Voting/UsernameVotingScreen.swift`:
- [SUGGESTION] DashWallet/Sources/UI/DashPay/Voting/UsernameVotingScreen.swift:59-62: Consume the upstream fix for the search placeholder's dark-mode contrast
  (awaiting a tracking link: link an issue on its thread, or ask there and PastaClaw files it; no code change needed; thread: https://github.com/dashpay/dashwallet-ios/pull/1220#discussion_r4513608989)

@ross-dash
ross-dash merged commit 491e44c into develop Nov 12, 2026
7 checks passed
romchornyi added a commit that referenced this pull request Nov 12, 2026
…-approve-sheet

Develop (#1220) moved the DashConnect approval sheets to
DashUIKit.BottomSheet. The redesigned sheets of this branch (App Connect
approve, return step, legacy approve, token purchase) now draw inside it
too: its grabber replaces DashConnectSheetGrabber, which is removed, and
its close button denies the request (stays in the wallet on the return
step), as a swipe-down does. Both are blocked while an approval is in
flight, which approveSheetPresentation no longer does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
romchornyi added a commit that referenced this pull request Nov 12, 2026
Rebuilt on develop for the fifth PR review round. The screen keeps its own NavigationStack in the menu's push (#1220 moved other screens to UIKit pushes); the DashUIKit bar arrives with the vote-from-pills stage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SDD-Published-From: 8be3c00648ecd7986c749e06545bf868ac841fbf
ross-dash added a commit that referenced this pull request Nov 13, 2026
* fix(ui): hold the navigation controller weakly in menu pages

SwiftUI pages pushed onto a UIKit navigation controller kept a strong
reference to that controller while their own hosting controller sat in
its stack. A normal pop breaks that cycle, but a stack that is dropped
or rebuilt with the page still on it (for example when
MainTabbarController.configureControllers() replaces a tab's navigation
controller) was never released.

Same fix as the pages converted in #1220: `weak var vc:
UINavigationController?` with optional-chained call sites, and a
`guard let vc` where the controller is handed to an API that needs a
non-optional one. Covers the Settings, Security, Tools, Governance,
Explore, Connections, Identities (3 pages), Wallets, Wallet accounts,
Wallet account detail, Sync info pages, the main menu (root of its
stack) and the Masternode keys overview. UsernameMarketplaceScreen and
DevnetSettingsHostingViewController already stored it weakly; their
initializers now take an optional.

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

* fix(ui): break the two remaining menu closure cycles

- SecurityMenuScreen's onHide captured the init parameter vc strongly,
  not the weak property; it now captures it weakly.
- MainMenuViewController's onContactSupport captured self strongly
  while the screen storing it is hosted by self; it now captures
  [weak self].

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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