Skip to content

feat(ui): rebuild Reset wallet info in SwiftUI - #1250

Merged
ross-dash merged 2 commits into
developfrom
feat/reset-wallet-info-swiftui
Nov 4, 2026
Merged

ross-dash merged 2 commits into
developfrom
feat/reset-wallet-info-swiftui

Conversation

@ross-dash

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

Copy link
Copy Markdown
Contributor

Summary

First screen of the UIKit / Objective-C → SwiftUI migration (Security / Settings group).

  • Reset wallet info (the "Wipe Wallet" warning) is now a SwiftUI screen, ResetWalletInfoScreen, with the DashUIKit NavigationBar (back circle + title) and DashButtons (Continue filledBlue, Cancel plainBlue).
  • Same copy and behavior as before:
    • Continue opens DWRecoverViewController in wipe mode.
    • A completed wipe goes to the caller's DWWipeDelegate.
    • Back, Cancel and swipe-back pop.
  • ResetWalletInfoHostingController is a thin UIHostingController that pushes the recovery-phrase screen and acts as its delegate.
  • Both entry points use it: More → Security → Reset Wallet, and removing the last wallet in Wallets.
  • Removed DWResetWalletInfoViewController.h/.m, ResetWalletInfo.storyboard and their bridging-header / project entries.

The recovery-phrase screen it opens (DWRecoverViewController) is still Objective-C. It's part of the later Wallet setup group.

Test plan

  • dashpay Debug simulator build; scripts/a11y_audit.py --check clean
  • Simulator: Security → Reset Wallet shows the new screen; back, Cancel and swipe-back return to Security
  • Continue opens "Enter Recovery Phrase" in wipe mode; going back returns to the warning
  • Manual check by @ross-dash
  • Full wipe from both entry points (Security, last wallet in Wallets): app returns to onboarding
  • ResetWalletInfoWipeForwardingTests

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Updates
    • The wallet reset confirmation flow now presents a warning before proceeding to recovery-phrase entry for a full wallet reset.
    • Choosing Continue opens recovery-phrase entry; choosing Cancel returns to the previous screen.
    • The reset confirmation flow is available from both the security menu and wallet management.

The wipe warning (More → Security → Reset wallet, and removing the last
wallet in Wallets) is now a SwiftUI screen with the DashUIKit nav bar
and buttons, replacing the Objective-C controller and its storyboard.
Same copy and behavior: Continue opens the recovery-phrase check in
wipe mode, and a completed wipe still goes to the caller's
DWWipeDelegate.

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

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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 28 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: ade58540-4852-4781-a183-d0b0f14023aa
Commits

Reviewing files that changed from the base of the PR and between 5688726 and 5023377.

Files selected for processing: 3
  • DashWallet.xcodeproj/project.pbxproj
  • DashWallet/Sources/UI/Menu/Security/ResetWalletInfo/ResetWalletInfoScreen.swift
  • DashWalletTests/ResetWalletInfoWipeForwardingTests.swift

No actionable comments were generated in the recent review.

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: 3e85c300-6f6a-4a33-b980-4b323bbe64b5
Commits

Reviewing files that changed from the base of the PR and between 1495329 and 5688726.

Files selected for processing: 8
  • DashWallet.xcodeproj/project.pbxproj
  • DashWallet/Sources/UI/Menu/Security/ResetWalletInfo/DWResetWalletInfoViewController.h
  • DashWallet/Sources/UI/Menu/Security/ResetWalletInfo/DWResetWalletInfoViewController.m
  • DashWallet/Sources/UI/Menu/Security/ResetWalletInfo/ResetWalletInfo.storyboard
  • DashWallet/Sources/UI/Menu/Security/ResetWalletInfo/ResetWalletInfoScreen.swift
  • DashWallet/Sources/UI/Menu/Security/SecurityMenuScreen.swift
  • DashWallet/Sources/UI/Menu/Security/Wallets/WalletsScreen.swift
  • DashWallet/dashwallet-Bridging-Header.h
Files with no reviewable changes: 4
  • DashWallet/Sources/UI/Menu/Security/ResetWalletInfo/ResetWalletInfo.storyboard
  • DashWallet/Sources/UI/Menu/Security/ResetWalletInfo/DWResetWalletInfoViewController.m
  • DashWallet/Sources/UI/Menu/Security/ResetWalletInfo/DWResetWalletInfoViewController.h
  • DashWallet/dashwallet-Bridging-Header.h

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The wallet-reset warning screen moves from an Objective-C controller and storyboard to a SwiftUI screen and hosting controller. Both reset entry points now use the hosting controller, and both app targets include the new Swift file.

Changes: Reset wallet flow

Layer / File(s) Summary
Replace the reset warning screen
DashWallet/Sources/UI/Menu/Security/ResetWalletInfo/*
The SwiftUI screen displays the wipe warning and provides Continue and Cancel actions. Its hosting controller opens recovery in .wipe mode, pops on Cancel, forwards a completed wipe to its delegate, and asserts on an unexpected recovery callback. The Objective-C controller and storyboard are removed.
Wire reset routes and app targets
DashWallet/Sources/UI/Menu/Security/SecurityMenuScreen.swift, DashWallet/Sources/UI/Menu/Security/Wallets/WalletsScreen.swift, DashWallet.xcodeproj/project.pbxproj, DashWallet/dashwallet-Bridging-Header.h
Both reset entry points use ResetWalletInfoHostingController. The project includes the Swift file in both app targets and removes the legacy source, storyboard, and bridging-header references.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: llbartekll

Merge Risk: Minimal · up to 56887

No actionable merge-blocking issue remains in the reviewed reset-wallet migration. Normal checks can proceed before merge.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(ui): rebuild Reset wallet info in SwiftUI" matches the main change. The PR replaces the Objective-C DWResetWalletInfoViewController and its storyboard with a SwiftUI ResetWalletInfoScr…
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 "feat(ui): rebuild Reset wallet info in SwiftUI" matches the main change. The PR replaces the Objective-C DWResetWalletInfoViewController and its storyboard with a SwiftUI ResetWalletInfoScreen, and both reset entry points (Security menu and removing the last wallet) now use it. The title is specific and concise, and it names the UI area and the technology. No search was needed because the check relies only on the provided context.

Full details: Docstring Coverage

Explanation

Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 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

Comment @coderabbitai help to get the list of available commands.

@ross-dash ross-dash self-assigned this Oct 26, 2026
@ross-dash
ross-dash requested a review from romchornyi October 26, 2026 12:05
@thepastaclaw

thepastaclaw commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

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

@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 blockers · 5 non-blocking recommendations · 2 requests before approval — reviewed at 5688726e40

Level Verdict
1 · Idea ✅ valid First screen of the Security / Settings SwiftUI migration; same copy and behaviour
2 · Architecture ✅ right layer App UI only; DWRecoverViewController stays Obj-C as stated
3 · Completeness ✅ complete Both entry points (Security → Reset Wallet, last wallet in Wallets) switched; no references to the old controller remain
4 · Code ✅ clean Recommendations below, none blocking

Before approval, please:

  • Add Before / After screenshots to the description — light and dark, old screen next to new. The visuals do change: the background goes from SecondaryBackgroundColor (#141519 in dark) to dash.primaryBackground (#000000), and the spacing differs (icon → title was 26, title → description 10, now 16 for both; bottom inset was ~4, now 20). A one-row table with <img width="260" …/> per cell keeps it readable.
  • Run the full wipe on a test wallet (the open test-plan item), from both entry points — that is the one path this screen exists for, and the DWWipeDelegate hand-off is the part a UI port can break silently.
5 non-blocking recommendations
  1. Declare NavigationBarDisplayable on the hosting controller — ResetWalletInfoScreen.swift#L87 — BaseNavigationController.willShow shows the UIKit bar and adds its own back button on every push/pop unless the controller says otherwise; this is how the two back buttons appeared before (CreateUsernameViewController.swift#L132-L136, InternalTransferHostingController.swift#L110-L116). The other DashUIKit-bar hosting controllers declare isNavigationBarHidden { true }; doing the same here removes the dependency on SwiftUI re-applying .navigationBarHidden(true) after popping back from the recovery screen. (not reproduced at runtime)
  2. Dynamic Type no longer scales — ResetWalletInfoScreen.swift#L47-L53 — the old labels used preferredFontForTextStyle with adjustsFontForContentSizeCategory; dashFont is a fixed .system(size:). Same as the sibling SwiftUI screens, so not for this PR — but if scaling is added later, this fixed VStack + Spacers layout will need a ScrollView.
  3. Header trait on the title — ResetWalletInfoScreen.swift#L35-L37 — the old UIKit title was announced as the screen heading; .accessibilityAddTraits(.isHeader) restores VoiceOver rotor navigation on this destructive flow.
  4. Doc comments name only the Security menu — ResetWalletInfoScreen.swift#L21, #L84 — the controller is also pushed from WalletsScreen.beginRemove when removing the last wallet.
  5. rootView is built twice in init — ResetWalletInfoScreen.swift#L93-L97 — placeholder closures, then the real ones. Works, but if the reassignment is ever dropped the buttons silently do nothing; a small actions object captured before super.init would build it once.
Review details

Layered review: idea → architecture → completeness → code. Level 4 ran a general correctness pass and a UI lane (navigation, localization, accessibility, dark mode, parity with the deleted storyboard). Localization: same five keys, no new ones, no format strings. Recommendation 2 was checked against UIFont+DWFont.m and DashUIKit DashTextStyle.swift.

🤖 Reviewed with Claude Code

@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

The SwiftUI migration preserves the reset flow and delegate routing, and the changed entry points correctly use the new hosting controller. Two non-blocking concerns remain: the replacement drops the legacy screen's explicit light status-bar style, and the asynchronous wipe-to-app delegate path has no focused regression or end-to-end coverage. The DashWalletTests simulator check was still in progress at the captured CI state.

🟡 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 contained but behavior-changing UI and navigation migration affecting two wallet-reset entry points, delegation, and project integration, so it warrants ordinary review.
  • 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/Menu/Security/ResetWalletInfo/ResetWalletInfoScreen.swift`:
- [SUGGESTION] DashWallet/Sources/UI/Menu/Security/ResetWalletInfo/ResetWalletInfoScreen.swift:87-90: Preserve the reset screen's light status-bar style
  The deleted `DWResetWalletInfoViewController` explicitly returned `UIStatusBarStyleLightContent`, while `ResetWalletInfoHostingController` does not override `preferredStatusBarStyle`. With `UIViewControllerBasedStatusBarAppearance` enabled, the replacement uses the hosting controller's default status-bar style, changing the status-bar icons when this screen is pushed. Even if the new light background makes the default style arguably more legible, this is an unannounced visual behavior change from the parity described by the PR. Add an explicit override matching the previous controller or document the intentional design change.
- [SUGGESTION] DashWallet/Sources/UI/Menu/Security/ResetWalletInfo/ResetWalletInfoScreen.swift:121-123: Cover successful asynchronous wipe forwarding
  This migration makes `recoverViewControllerDidWipe` the only bridge from the Objective-C recovery-phrase flow to the caller's app-level `DWWipeDelegate`. The listed simulator checks cover navigation into wipe mode but do not exercise a completed wipe, so they would not catch a broken delegate connection or a failure to transition out of the wallet UI. Add a focused test that invokes the hosting controller's wipe callback with a mock delegate and asserts forwarding, or run the full flow with a disposable test wallet.

Comment on lines +87 to +90
final class ResetWalletInfoHostingController: UIHostingController<ResetWalletInfoScreen>,
DWRecoverViewControllerDelegate {

private weak var wipeDelegate: DWWipeDelegate?

@thepastaclaw thepastaclaw Oct 26, 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.

✅ Withdrawn at 50233773; see the replies below.

🟡 Suggestion: Preserve the reset screen's light status-bar style

The deleted DWResetWalletInfoViewController explicitly returned UIStatusBarStyleLightContent, while ResetWalletInfoHostingController does not override preferredStatusBarStyle. With UIViewControllerBasedStatusBarAppearance enabled, the replacement uses the hosting controller's default status-bar style, changing the status-bar icons when this screen is pushed. Even if the new light background makes the default style arguably more legible, this is an unannounced visual behavior change from the parity described by the PR. Add an explicit override matching the previous controller or document the intentional design change.

Suggested change
final class ResetWalletInfoHostingController: UIHostingController<ResetWalletInfoScreen>,
DWRecoverViewControllerDelegate {
private weak var wipeDelegate: DWWipeDelegate?
final class ResetWalletInfoHostingController: UIHostingController<ResetWalletInfoScreen>,
DWRecoverViewControllerDelegate {
override var preferredStatusBarStyle: UIStatusBarStyle { .lightContent }
private weak var wipeDelegate: DWWipeDelegate?

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.

Keeping the default here on purpose. .lightContent is left over from the old dark-blue header design. On the current light background it makes the clock and status icons white on near-white, so effectively invisible. In dark mode the default style is already light. Edit Profile had the same leftover and dropped it when it moved to the DashUIKit bar. The before/after screenshots in the description show the result.

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.

Withdrawn (re-reviewed at 50233773): The old light-content status-bar style belonged to the former dark header, while this replacement uses an adaptive light background where white status icons would be unreadable. The hosting controller's default style is therefore intentional for the new design, so the parity concern does not apply.

Comment on lines +121 to +123
func recoverViewControllerDidWipe(_ controller: DWRecoverViewController) {
wipeDelegate?.didWipeWallet()
}

@thepastaclaw thepastaclaw Oct 26, 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 50233773; see the replies below.

🟡 Suggestion: Cover successful asynchronous wipe forwarding

This migration makes recoverViewControllerDidWipe the only bridge from the Objective-C recovery-phrase flow to the caller's app-level DWWipeDelegate. The listed simulator checks cover navigation into wipe mode but do not exercise a completed wipe, so they would not catch a broken delegate connection or a failure to transition out of the wallet UI. Add a focused test that invokes the hosting controller's wipe callback with a mock delegate and asserts forwarding, or run the full flow with a disposable test wallet.

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.

Covered both ways in 5023377: ResetWalletInfoWipeForwardingTests checks that recoverViewControllerDidWipe reaches the DWWipeDelegate (held weakly). A full wipe was also run with a real wallet from both entry points; each time the app returned to onboarding.

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 50233773): The added ResetWalletInfoWipeForwardingTests construct the hosting controller with a spy, invoke recoverViewControllerDidWipe, and verify that the caller delegate receives the callback; they also verify the delegate remains weak. This directly covers the forwarding gap identified in the original finding.

- "Wipe Wallet" carries the header trait for VoiceOver.
- Doc comments name both entry points (Security, and removing the last
  wallet in Wallets).
- The hosting controller builds its root view once; the buttons reach it
  through a small target object instead of placeholder closures.
- ResetWalletInfoWipeForwardingTests: a completed wipe reaches the
  DWWipeDelegate, which is held weakly.

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

ross-dash commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

@romchornyi thanks for the review! Addressed in 5023377:

Before approval

  • Before / After screenshots: light and dark are being added to the description. The visual differences you spotted are intentional. The background matches the Security menu it's pushed from (so there's no colour jump in dark mode), and the spacing and buttons follow the standard DashUIKit values. Design (@ross-dash) reviewed the side-by-side and is keeping them.
  • Full wipe on a test wallet: done from both entry points, Security → Reset Wallet and removing the last wallet in Wallets. Each time the app went back to onboarding and the wallet was gone, and it was restored afterwards. I also added ResetWalletInfoWipeForwardingTests: a completed wipe reaches the DWWipeDelegate, and the delegate is held weakly.

Recommendations

  1. NavigationBarDisplayable: every UIHostingController in the app already conforms with isNavigationBarHidden { true } (POIDetailsViewController.swift, extension UIHostingController: NavigationBarDisplayable). Declaring it on the subclass is a compile error ("redundant conformance" / "cannot be overridden"). So BaseNavigationController already hides the UIKit bar here, and in the simulator the pop back from the recovery screen shows no second bar.
  2. Dynamic Type: agreed, and left for the sibling-screen pass as you suggested.
  3. Header trait: added .accessibilityAddTraits(.isHeader) on "Wipe Wallet".
  4. Doc comments: both now name both entry points.
  5. rootView built twice: built once now. The buttons go through a small ActionTarget (weak controller) created before super.init.

@ross-dash
ross-dash requested a review from romchornyi October 26, 2026 17:24
@ross-dash

Copy link
Copy Markdown
Contributor Author
image-1793035750389

@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 SwiftUI replacement preserves both reset entry points, recovery-phrase wipe mode, weak delegate ownership, and completed-wipe forwarding. One non-blocking architecture issue remains: the new SwiftUI screen is closure-only and does not use the required @mainactor ObservableObject ViewModel boundary. The simulator test check is still queued, with the target-membership and accessibility checks successful.

🟡 1 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); 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 contained but behavior-changing UI and navigation migration affecting wallet reset entry points, delegate forwarding, and project configuration, so it warrants ordinary review.
  • 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. Verify each finding against the current code and only fix it if needed.

In `DashWallet/Sources/UI/Menu/Security/ResetWalletInfo/ResetWalletInfoScreen.swift`:
- [SUGGESTION] DashWallet/Sources/UI/Menu/Security/ResetWalletInfo/ResetWalletInfoScreen.swift:24-26: Add the required ViewModel for the new SwiftUI screen
  This new SwiftUI screen is implemented as a closure-only View with no @MainActor ObservableObject ViewModel. The project architecture requires all new UI to use a ViewModel, with the View limited to rendering state and routing intent. Introduce a ResetWalletInfoViewModel for the screen's actions/state and have the hosting controller inject or own it, rather than making raw closures the screen's behavior boundary.

Comment on lines +24 to +26
struct ResetWalletInfoScreen: View {
let onContinue: () -> Void
let onCancel: () -> Void

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.

🟡 Suggestion: Add the required ViewModel for the new SwiftUI screen

This new SwiftUI screen is implemented as a closure-only View with no @mainactor ObservableObject ViewModel. The project architecture requires all new UI to use a ViewModel, with the View limited to rendering state and routing intent. Introduce a ResetWalletInfoViewModel for the screen's actions/state and have the hosting controller inject or own it, rather than making raw closures the screen's behavior boundary.

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

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

✅ Approve · no blockers · 1 tracked follow-up — re-reviewed at 50233773d2

Level Verdict
1 · Idea ✅ valid unchanged
2 · Architecture ✅ right layer unchanged
3 · Completeness ✅ complete both entry points wiped end to end; forwarding now covered by a test
4 · Code ✅ clean the incremental diff (5688726e40..50233773d2) is small and correct; DashWalletTests on simulator green

Closed since the last review

  • Before / After — light and dark, old vs new, posted in this comment. Please also move the image into the description under a Before / After heading, so it stays with the PR when it is squash-merged and linked from release notes.
  • Full wipe from both entry points — done (Security → Reset Wallet, last wallet in Wallets), plus ResetWalletInfoWipeForwardingTests for the hand-off and the weak delegate.
  • .isHeader on the title — ResetWalletInfoScreen.swift#L38.
  • Doc comments name both entry points.
  • rootView built once — the ActionTarget with a weak controller avoids both the placeholder and a retain cycle (#L94-L108).
  • NavigationBarDisplayable — withdrawn, you are right: extension UIHostingController: NavigationBarDisplayable already covers every hosting controller, so the explicit conformance was redundant.

Deferred: Dynamic Type (dashFont is a fixed size) goes to the pass over the sibling screens, as agreed.

🤖 Reviewed with Claude Code

@ross-dash
ross-dash merged commit 3201192 into develop Nov 4, 2026
6 checks passed
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