Skip to content

refactor(explore-dash): cut the details nav-stack lookup, weak map delegate - #1393

Merged
ross-dash merged 1 commit into
developfrom
refactor/explore-list-step0
Nov 12, 2026
Merged

ross-dash merged 1 commit into
developfrom
refactor/explore-list-step0

Conversation

@ross-dash

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

Copy link
Copy Markdown
Contributor

Summary

Step 0 of the plan for #1382 (Explore map and sheet lists to SwiftUI): remove the hidden dependencies that would break silently once the list controllers are replaced.

  • POIDetailsViewController no longer reads the list from the navigation stack. It cast viewControllers.dropLast().last to ExplorePointOfUseListViewController twice: for the current radius and to detect the All tab (tag == 2). Both values are already passed in: the base list passes filters?.currentRadius ?? kDefaultRadius, the merchant list passes the infinite radius on its All tab. "Show all locations" is visible only for physical merchants opened from Where to Spend (ATMs and the all-locations screen pass isShowAllHidden = true), so "from the All tab" is exactly "radius is infinite", and the radius from the stack equals the one passed.
  • ExploreMapViewDelegate is class-bound and held weakly, breaking the controller → map view → controller cycle (both conformers are view controllers that own the map view).
  • ExploreViewController is removed. It was never instantiated (only the type of an unused weak property in MainTabbarController); no ObjC, storyboard or XIB references. Its kMerchantTypesShown key moves, private, into ExploreMenuScreen, its only user.

No behaviour change intended.

Test plan

  • dashpay Debug builds; project.pbxproj passes plutil -lint
  • Simulator: Where to Spend opens, Nearby / All switch, details open from All
  • "Show all locations" from Nearby (list radius) and from All (every location) — not run: no physical multi-location merchant was reachable from the simulator's location

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Merchant and ATM detail views now use the selected search radius when showing nearby locations, with a default radius applied when none is specified. Opening all merchant locations no longer automatically switches to an unlimited search.
  • Updates
    • The merchant-types explainer is tracked so it can be shown before the Where to Spend menu action.

…legate

Groundwork for moving the Explore lists to SwiftUI (#1382):

- POIDetailsViewController no longer casts the previous controller on the
  navigation stack to ExplorePointOfUseListViewController to read the radius
  and the All tab. The opener already passes both: the list's current radius,
  or the infinite radius from the merchant list's All tab, which is the only
  place "Show all locations" can be reached from.
- ExploreMapViewDelegate is class-bound and ExploreMapView holds it weakly,
  breaking the controller -> map view -> controller cycle.
- ExploreViewController was never instantiated; it is removed with the
  unused MainTabbarController property. Its kMerchantTypesShown key moves,
  private, into ExploreMenuScreen, its only user.

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

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PR removes the Explore screen controller and its project references. It also changes how merchant-location searches select a radius and makes the map view’s delegate reference weak.

Changes: Explore screen and map updates

Layer / File(s) Summary
Remove the Explore screen controller
DashWallet/Sources/UI/Explore Dash/ExploreViewController.swift, DashWallet.xcodeproj/project.pbxproj, DashWallet/Sources/UI/Explore Dash/ExploreMenuScreen.swift, DashWallet/Sources/UI/Main/MainTabbarController.swift
The Explore screen controller and its delegate are removed, along with its project entries and the tab-bar controller’s navigation reference. The menu screen declares the kMerchantTypesShown preference key.
Pass the effective radius to locations
DashWallet/Sources/UI/Explore Dash/Merchants & ATMs/Details/POIDetailsViewController.swift
The details controller uses its searchRadius, or kDefaultRadius when absent. The locations controller receives that radius without an All-tab override.
Make map delegate ownership weak
DashWallet/Sources/UI/Explore Dash/Merchants & ATMs/List/Views/ExploreMapView.swift
ExploreMapViewDelegate now requires class conformers, and ExploreMapView.delegate is weak.

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

Change: Refactor

Possibly related issues

  • Issue 1382 requests moving the Explore map and ATM and Where to Spend lists to SwiftUI. This PR makes related groundwork changes but does not complete that migration.

Suggested reviewers: jeanpierreroma, thepastaclaw

Merge Risk: Minimal · up to 01420

This is a cleanup refactor with no actionable merge-blocking risk identified. The delegate change and the radius handling were checked against the supplied callers and showed no problem. The author notes that "Show all locations" from Nearby and All was not tested, which is normal validation uncertainty.

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 two main changes in the PR: removing the navigation-stack lookup from the details screen, and making the map delegate weak. The summary covers those changes, plus the removal of th…
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 two main changes in the PR: removing the navigation-stack lookup from the details screen, and making the map delegate weak. The summary covers those changes, plus the removal of the unused ExploreViewController and the class-bound delegate. The title is specific and uses the conventional commit format. It does not cover the ExploreViewController deletion, which is a secondary part of the change.

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: 86f6fba3-d00f-435a-953b-e1eb7541f6c8
Commits

Reviewing files that changed from the base of the PR and between 0c6bb7a and 014207f.

Files selected for processing: 6

  • DashWallet.xcodeproj/project.pbxproj
  • DashWallet/Sources/UI/Explore Dash/ExploreMenuScreen.swift
  • DashWallet/Sources/UI/Explore Dash/ExploreViewController.swift
  • DashWallet/Sources/UI/Explore Dash/Merchants & ATMs/Details/POIDetailsViewController.swift
  • DashWallet/Sources/UI/Explore Dash/Merchants & ATMs/List/Views/ExploreMapView.swift
  • DashWallet/Sources/UI/Main/MainTabbarController.swift
Files with no reviewable changes: 3

  • DashWallet/Sources/UI/Explore Dash/ExploreViewController.swift
  • DashWallet/Sources/UI/Main/MainTabbarController.swift
  • DashWallet.xcodeproj/project.pbxproj

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 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ Final review complete — no blockers (commit 014207f) · triage: low · Phase 2 only (queue backlog)

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

Verified the complete base-to-head diff at 014207f and confirmed the Phase-2 assessment: callers preserve radius propagation, both weak delegate conformers are controller-owned, and the deleted controller has no remaining runtime references. No actionable findings remain. Current CI reports passing simulator tests, target-membership checks, workflow lint, and accessibility auditing; only the automated review is pending, and the multi-location merchant smoke remains unperformed.

Review provenance

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

  • Triage: low by gpt-6.1-sol (effort low) — This is a small, well-contained UIKit refactor that removes obsolete navigation-stack coupling, weakens a delegate reference, and deletes an unused controller without changing critical logic.
  • Phase 1 reviewers: not run (skipped for throughput: 12 PRs queued, above the 10 limit)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer

@ross-dash
ross-dash merged commit 023114d into develop Nov 12, 2026
8 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.

2 participants