Skip to content

fix(ui): DashUIKit bar on transaction details, fee info and backup info - #1478

Open
ross-dash wants to merge 2 commits into
developfrom
fix/remaining-nav-bar-buttons
Open

ross-dash wants to merge 2 commits into
developfrom
fix/remaining-nav-bar-buttons

Conversation

@ross-dash

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

Copy link
Copy Markdown
Contributor

Summary

Second step of moving the remaining UIKit screens to DashUIKit's navigation bar (follows #1477, independent of it).

Shared helper in BaseNavigationController.swift:

  • installNavigationBar(_:background:) hosts DashUIKit's NavigationBar at the top of a UIKit screen and adds the bar's height to additionalSafeAreaInsets.top. Content laid out against the safe area (storyboards, scroll views with automatic insets) starts below the bar without new constraints, and the bar can grow with the text size.
  • NavigationBarModel holds the title and the leading/trailing elements; changing it redraws the bar.
  • The hosted bar ignores safe areas (safeAreaRegions = []); otherwise it would grow by the inset it adds on every layout pass.

Screens (system bar hidden, system Close replaced by DashUIKit's close circle, per the earlier decision that Close/Cancel become the X element):

  • Transaction details, when it is the root of a modal stack: the Receive receipt and the one-time detail after reclassify. Embedded in a SwiftUI sheet or the reclassify snapshot it has no bar, as before. The success screen keeps its own bottom Close.
  • Coinbase fee info (BasicInfoController).
  • Backup Info: close from Home, back on the screenshot-info variant, an empty bar during onboarding (as before).

Not in this PR: the lock-screen Cancel items (they sit on the ObjC Recover/Set PIN screens, which move with the setup and security flows) and installExploreNavigationBar (Explore files have open PRs; it can move to this helper with the SwiftUI rewrite).

Screenshots

image

Test plan

  • dashwallet-dashpay builds
  • Backup Info from Home: DashUIKit close circle, content below the bar, close dismisses
  • Transaction details from the Receive receipt (needs an incoming payment while Receive is open)
  • Coinbase fee info (needs a Coinbase login)
  • CI unit tests

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a custom navigation bar to wallet information, backup, and transaction detail screens, with titles and relevant back or close actions.
    • Adjusted navigation bar visibility on transaction success screens to retain the existing bottom close button.

Adds installNavigationBar(_:), which hosts DashUIKit's NavigationBar at
the top of a UIKit screen and adds its height to the safe area, so
content laid out against the safe area (storyboards, scroll views) sits
below the bar without new constraints. NavigationBarModel holds the
title and the leading and trailing elements; changing it redraws the bar.

The three Swift screens that still showed a system Close in a system bar
now hide it and draw the bar instead:
- transaction details, when opened as the root of a modal stack (the
  Receive receipt, the one-time detail after reclassify); embedded in a
  SwiftUI sheet or a snapshot it has no bar, as before
- Coinbase fee info
- Backup Info: close from Home, back on the screenshot-info variant, an
  empty bar during onboarding, as before

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

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds a SwiftUI-backed navigation bar for UIKit screens. Three controllers install and configure the bar. A test checks its size and hit-testing, and the project registers that test in two targets.

Changes: Navigation bar integration

Layer / File(s) Summary
Navigation bar model and hosting
DashWallet/Sources/UI/Views/Navigation/BaseNavigationController.swift
Adds a published model for the title and leading and trailing actions. Hosts the SwiftUI bar above the safe area and updates the owning controller’s top inset when the container height changes.
Controller navigation bar setup
DashWallet/Sources/UI/Basic Info/BasicInfoController.swift, DashWallet/Sources/UI/Setup/SecureWallet/BackupInfo/BackupInfoViewController.swift, DashWallet/Sources/UI/Tx/Details/TxDetailViewController.swift
The controllers use the custom bar for close and back actions. Transaction-detail screens install it only when first in the navigation stack; success screens suppress it.
Hit-test validation
DashWalletTests/InstalledNavigationBarHitTests.swift, DashWallet.xcodeproj/project.pbxproj
Adds a test for bar height and hit-testing near the trailing close control. Registers the test source in the DashWallet and DashPay test targets.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant BasicInfoController
  participant installNavigationBar
  participant UIHostingController
  participant NavigationBarContainerView
  participant SwiftUIBar
  BasicInfoController->>installNavigationBar: install hosted navigation bar
  installNavigationBar->>UIHostingController: host SwiftUI bar
  installNavigationBar->>NavigationBarContainerView: add constrained container
  NavigationBarContainerView->>BasicInfoController: update top safe-area inset
  UIHostingController->>SwiftUIBar: render title and optional action items
Loading

Suggested reviewers: tikhop

Merge Risk: Minimal · up to 0b2a2

The change moves three screens to the new close bar, and no concrete merge-blocking problem was found. Close behavior on transaction details and Coinbase fee info is still untested in the PR, so a quick manual check before release is worthwhile.

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 DashUIKit navigation bar and three screens: transaction details, fee info, and backup info. The changeset matches these areas. It adds installNavigationBar and NavigationBarModel, …
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 DashUIKit navigation bar and three screens: transaction details, fee info, and backup info. The changeset matches these areas. It adds installNavigationBar and NavigationBarModel, updates BasicInfoController (Coinbase fee info), BackupInfoViewController, and TxDetailViewController. The title is specific and accurate. It uses the conventional commit prefix 'fix(ui):', which fits a UI fix.

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: 8538e360-fee5-40e6-afa8-fa3cff64d765
Commits

Reviewing files that changed from the base of the PR and between ee68513 and 0b2a216.

Files selected for processing: 6

  • DashWallet.xcodeproj/project.pbxproj
  • DashWallet/Sources/UI/Basic Info/BasicInfoController.swift
  • DashWallet/Sources/UI/Setup/SecureWallet/BackupInfo/BackupInfoViewController.swift
  • DashWallet/Sources/UI/Tx/Details/TxDetailViewController.swift
  • DashWallet/Sources/UI/Views/Navigation/BaseNavigationController.swift
  • DashWalletTests/InstalledNavigationBarHitTests.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 23, 2026 •

Copy link
Copy Markdown
Contributor

⛔ Final review complete — 1 blocking finding(s) (commit 0b2a216) · triage: normal

@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 2 only (queue backlog)

Changes requested: 2 blockers

  • VoiceOver announces the new Close buttons in English when the wallet is set to French — DashWallet/Sources/UI/Views/Navigation/BaseNavigationController.swift:409-412 (new)
    Impact: VoiceOver users in French and other translated locales hear the English label on the new Close controls in modal transaction details, Coinbase fee info, and Backup Info.
  • Tapping the visible Close button leaves the Coinbase fee sheet open — DashWallet/Sources/UI/Basic Info/BasicInfoController.swift:81-87 (new; not shown inline, see below)
    Impact: Coinbase buyers who tap the fee info icon on the Buy Dash order preview cannot return to the preview by tapping the sheet’s Close button.

This PR adds a shared DashUIKit navigation bar host and adopts it for modal transaction details, Coinbase fee info, and Backup Info. On the reviewed head, simulator unit tests, test-target membership, workflow lint, and the VoiceOver / Dynamic Type audit passed; the automated review check is still pending.

🔴 2 blocking

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

🔴 Blocking: Tapping the visible Close button leaves the Coinbase fee sheet open
Impact: Coinbase buyers who tap the fee info icon on the Buy Dash order preview cannot return to the preview by tapping the sheet’s Close button.
DashWallet/Sources/UI/Basic Info/BasicInfoController.swift:81-87

The X is visible, but the tap does not reach its dismissal action. feeInfoAction() presents BasicInfoController in a BaseNavigationController, and the new hosted bar replaces the system Close item. configureHierarchy() adds the scroll view after the bar, and the scroll view’s frame covers the entire controller. layer.zPosition draws the bar above the scroll view, but UIKit hit-tests the later-added sibling first. The safe-area inset shifts scroll content, not the scroll view’s hit region. Install the bar after adding the scroll view and document that the shared helper must run after overlapping content is added. A tap-and-dismiss check can present BasicInfoController with fixture text without signing in to Coinbase.

        scrollView = UIScrollView(frame: .zero)
        scrollView.translatesAutoresizingMaskIntoConstraints = false
        view.addSubview(scrollView)

        installNavigationBar(NavigationBarModel(trailing: .init(element: .close) { [weak self] in
            self?.closeAction()
        }), background: .dw_background())

source: gpt-6.2-sol (phase2-reviewer: general)

Review provenance

Source: reviewer 1: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.2-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.2-sol (effort low) — The shared SwiftUI hosting helper changes safe-area layout, Dynamic Type sizing, and navigation behavior across three UIKit screens, but does not touch a critical wallet surface.
  • Phase 1 reviewers: not run (skipped for throughput: 25 PRs queued, above the 10 limit)
  • Second Phase-2 pass: on this first full review every Phase-2 reviewer also ran a second, independent time, and the verifier weighed both sets
  • Fresh verifier: gpt-6.2-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.2-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.2-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/Basic Info/BasicInfoController.swift`:
- [BLOCKING] DashWallet/Sources/UI/Basic Info/BasicInfoController.swift:81-87: Tapping the visible Close button leaves the Coinbase fee sheet open
  Impact: Coinbase buyers who tap the fee info icon on the Buy Dash order preview cannot return to the preview by tapping the sheet’s Close button.
  The X is visible, but the tap does not reach its dismissal action. `feeInfoAction()` presents `BasicInfoController` in a `BaseNavigationController`, and the new hosted bar replaces the system Close item. `configureHierarchy()` adds the scroll view after the bar, and the scroll view’s frame covers the entire controller. `layer.zPosition` draws the bar above the scroll view, but UIKit hit-tests the later-added sibling first. The safe-area inset shifts scroll content, not the scroll view’s hit region. Install the bar after adding the scroll view and document that the shared helper must run after overlapping content is added. A tap-and-dismiss check can present `BasicInfoController` with fixture text without signing in to Coinbase.

In `DashWallet/Sources/UI/Views/Navigation/BaseNavigationController.swift`:
- [BLOCKING] DashWallet/Sources/UI/Views/Navigation/BaseNavigationController.swift:409-412: VoiceOver announces the new Close buttons in English when the wallet is set to French
  Impact: VoiceOver users in French and other translated locales hear the English label on the new Close controls in modal transaction details, Coinbase fee info, and Backup Info.
  The migration replaces UIKit’s localized system Close item with a button whose spoken label falls back to English. At the pinned DashUIKit revision `66b21a9`, `NavigationBarElement.close.button` resolves `Close` with `NSLocalizedString` in the package’s `.module` bundle, which contains no localized string tables. The wallet’s French catalog already maps `Close` to `Fermer`, but this lookup never reads it. This is a new unlocalized accessibility label under A11Y009. Supply the wallet’s localized Close label through the shared host, or ship the built-in labels in DashUIKit and update the pin. Keep `navigationbar-close` as the stable test identifier, separate from the spoken label.

Comment on lines +409 to +412
trailing: {
if let item = model.trailing {
item.element.button(action: item.action)
}

@thepastaclaw thepastaclaw Nov 23, 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 0b2a2167; see the replies below.

🔴 Blocking: VoiceOver announces the new Close buttons in English when the wallet is set to French
Impact: VoiceOver users in French and other translated locales hear the English label on the new Close controls in modal transaction details, Coinbase fee info, and Backup Info.

The migration replaces UIKit’s localized system Close item with a button whose spoken label falls back to English. At the pinned DashUIKit revision 66b21a9, NavigationBarElement.close.button resolves Close with NSLocalizedString in the package’s .module bundle, which contains no localized string tables. The wallet’s French catalog already maps Close to Fermer, but this lookup never reads it. This is a new unlocalized accessibility label under A11Y009. Supply the wallet’s localized Close label through the shared host, or ship the built-in labels in DashUIKit and update the pin. Keep navigationbar-close as the stable test identifier, separate from the spoken label.

source: gpt-6.2-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.

Deferring this one: it is not specific to this PR. Every DashUIKit bar button in the app (about 60 files in develop) gets its label from the package bundle, which has no localizations, so the fix belongs in one place for all screens rather than in this PR. Tracked in MO-1180.

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 0b2a2167): 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.

BasicInfoController installed the bar before its full-screen scroll view,
which then took the touches on the bar: zPosition only draws the bar on
top. Install the bar last, say so on installNavigationBar, and test that
a tap on Close reaches the bar.

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

@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

Changes requested: 1 blocker

  • VoiceOver announces the new Close buttons in English when the wallet is set to French — DashWallet/Sources/UI/Views/Navigation/BaseNavigationController.swift:409-412 (thread, carried; accepted as a deferral; lifts when a tracking issue is linked on its thread)
    Impact: VoiceOver users in French and other translated locales hear the English label on the new Close controls in modal transaction details, Coinbase fee info, and Backup Info.

New on this head: This head moves Coinbase fee-info navigation-bar installation after the full-screen scroll view and adds an in-target hit-testing regression test. The simulator test suite, target-membership check, accessibility audit, workflow lint, and CodeRabbit checks succeeded; the PastaClaw review check remains queued.

🔴 1 blocking

⏸️ Awaiting tracking link (1): VoiceOver announces the new Close buttons in English when the wallet is set to French (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.2-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.2-sol (effort low) — This is a contained but cross-screen UIKit/SwiftUI navigation and safe-area behavior change affecting multiple controllers and a shared navigation helper, so it warrants ordinary review despite not touching a critical surface.
  • 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.2-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.2-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/Views/Navigation/BaseNavigationController.swift`:
- [BLOCKING] DashWallet/Sources/UI/Views/Navigation/BaseNavigationController.swift:409-412: VoiceOver announces the new Close buttons in English when the wallet is set to French
  (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/1478#discussion_r4670427884)

Comment on lines +409 to +412
trailing: {
if let item = model.trailing {
item.element.button(action: item.action)
}

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 0b2a2167): 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.

This branch has not been deployed

No deployments
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.

2 participants