Skip to content

fix(explore-dash): list two-way ATMs under Buy and Sell, sell-only under Sell - #1395

Merged
ross-dash merged 3 commits into
developfrom
fix/atm-segment-types
Nov 13, 2026
Merged

ross-dash merged 3 commits into
developfrom
fix/atm-segment-types

Conversation

@ross-dash

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

Copy link
Copy Markdown
Contributor

Summary

The ATM list's segments filtered on one machine type each, so what you could buy or sell at depended on the tab in odd ways:

Segment Before After
All all all (unchanged)
Buy Buy Only Buy Only + Buy and Sell
Sell Buy and Sell (a duplicate of Buy/Sell) Sell Only + Buy and Sell
Buy/Sell Buy and Sell Buy and Sell (unchanged)

So two-way machines were missing from Buy, and Sell Only machines appeared only under All.

  • BuyAtmsDataProvider now asks for [.buy, .buySell]; a new SellAtmsDataProvider asks for [.sell, .buySell]. The DAO already filters with IN.
  • AtmItemCell showed the Sell tag only for two-way machines, so a Sell Only ATM had no tag at all. It now shows for .sell and .buySell; an ATM with no type keeps the Buy tag alone, as before.
  • AtmSegmentTypesTests pins the type set of each segment.

Decided with the product owner as part of the #1382 plan (step 5, done early because it is independent).

Screenshots

Same simulator state, develop build vs this branch. Mississauga has 235 buy-only and 6 two-way ATMs; Greensboro has the only sell-only ATM in the current database.

atm-buy-mississauga atm-sell-greensboro

Test plan

  • AtmSegmentTypesTests (4 tests) pass
  • dashpay Debug builds
  • Simulator, Mississauga → Buy: the two-way Coin Nerds ATM (600 m) is now first; before, the list started at 1.5 km
  • Simulator, Greensboro → Sell: the sell-only ATM is listed with a Sell tag; before, "No Results Found", and under All it had no tag

🤖 Generated with Claude Code

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes
    • Buy and sell filters now include ATMs that support both transactions, while the buy-and-sell filter shows only those ATMs.
    • The sell filter now includes sell-only ATMs, and sell-capable ATMs display a sell tag in the listing.

ross-dash and others added 2 commits November 12, 2026 17:33
…der Sell

The ATM segments filtered on one machine type each: Buy showed only
"Buy Only" machines, and Sell used the Buy/Sell provider, so it duplicated
the Buy/Sell tab and "Sell Only" machines appeared only under All. Buy now
lists buy-only and two-way machines, Sell lists sell-only and two-way
machines; All and Buy/Sell are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Sell tag was shown only for two-way machines, so a "Sell Only" ATM
rendered with no tag at all. It now shows for sell-only and two-way
machines; an ATM with no type keeps the Buy tag alone, as before.

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

ATM buy and sell segments now include the matching one-way and two-way ATM types. Sell ATMs display the sell tag, and tests cover segment provider type sets.

Changes: ATM segment filtering and labels

Layer / File(s) Summary
Segment filtering, display, and tests
DashWallet/Sources/UI/Explore Dash/Merchants & ATMs/List/Model/AtmDataProvider.swift, DashWallet/Sources/UI/Explore Dash/Merchants & ATMs/List/AtmListViewController.swift, DashWallet/Sources/UI/Explore Dash/Merchants & ATMs/List/Cells/AtmItemCell.swift, DashWalletTests/AtmSegmentTypesTests.swift, DashWallet.xcodeproj/project.pbxproj
Buy and sell providers include two-way ATMs, and the sell segment uses its dedicated provider. The sell tag appears for sell-only and two-way ATMs. Tests check the expected ATM type sets for all segments.

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

Change: Bug fix

Merge Risk: Minimal · up to 47a51

Buy and Sell tabs now list two-way ATMs, and sell-only ATMs show their Sell tag. No merge-blocking risk is apparent.

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 main behavior change: two-way ATMs now appear under both Buy and Sell, and sell-only ATMs appear under Sell. The raw summary confirms the segment data provider, type-set, and Sell-…
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 main behavior change: two-way ATMs now appear under both Buy and Sell, and sell-only ATMs appear under Sell. The raw summary confirms the segment data provider, type-set, and Sell-tag changes that match this title. The title is specific and conventional, and it follows the fix(scope) style.

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: 21e56eaa-7afe-4c33-a1ed-0b1121ff1e87
Commits

Reviewing files that changed from the base of the PR and between 72f6c40 and 47a51d6.

Files selected for processing: 1

  • 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 47a51d6) · triage: low

@ross-dash
ross-dash requested a review from romchornyi November 12, 2026 17:19

@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 change is correct and focused: Buy now includes buy-only and two-way ATMs, Sell includes sell-only and two-way ATMs, and the list badges match those capabilities. The exact reviewed head has passing simulator tests, target-membership, accessibility, workflow, and CodeRabbit checks; no in-scope defects were found.

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.1-sol (effort low) — The diff makes small, contained corrections to ATM segment type filters and Sell badge visibility, with focused tests and test-target registration.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 75% left, weekly 61% left; passed over gemini-3.8-flash-high (antigravity quota lookup failed)
  • 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
Out-of-scope follow-up suggestions (1)

These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.

  • ATM details screen always offers Buy Dash — The pre-existing ATM details view always renders a Buy Dash button, including for sell-only ATMs. This becomes more visible now that sell-only machines are listed in the Sell segment, but the defect is outside the changed code and is already a natural follow-up for the Explore screens rework.
    • Follow-up: Address this in the #1382 Explore screens rework by showing the Buy Dash button only when the ATM type supports buying.

@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 head 47a51d6 against the stated base: the segment mappings, provider type sets, and Sell badge predicate implement the intended behavior without an identified functional defect. One non-blocking regression-coverage suggestion remains for the badge fix, plus a verified pre-existing details-screen issue for follow-up. Current CI shows membership, workflow lint, and accessibility checks passing, with simulator tests still pending; no local builds or tests were run in this static review.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.

Follow-up candidates (optional) (1)

New non-blocking observations on code unchanged since the last full review. No inline threads are opened for them and later reviews do not repeat them: fix forward or track separately if they are worth it.

🟡 Suggestion: Add regression coverage for ATM badge visibility
DashWallet/Sources/UI/Explore Dash/Merchants & ATMs/List/Cells/AtmItemCell.swift:46-47

AtmSegmentTypesTests covers provider selection but never exercises these badge predicates. Restoring the old Sell predicate would therefore leave all four new tests passing while reintroducing the sell-only ATM's missing badge. Add a main-actor cell test covering buy-only, sell-only, two-way, and nil types, including successive updates on the same cell to verify reuse. Supply valid coordinates and a source in the fixture so the test does not depend on location authorization, and assert badge visibility through the view hierarchy or a narrow test seam.

source: glm-5.3-flash (phase1-reviewer: general)

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.1-sol (effort low) — This is a small, well-contained UI filtering and labeling fix with focused tests and no critical-surface changes.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 94% left, weekly 59% left; passed over gemini-3.8-flash-high (antigravity quota lookup failed)
  • Code unchanged since the last final review (72f6c40c): 1 new suggestion(s) listed as follow-up candidates, not posted inline
  • 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
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.
Out-of-scope follow-up suggestions (1)

These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.

  • ATM details advertises buying at sell-only machines — POIDetailsView.swift renders the Buy Dash button unconditionally in atmButtonsView, while correctly restricting Sell Dash to sell-capable machines. A sell-only ATM therefore advertises an unsupported action. The same code exists in the base and was already reachable through All; this PR does not introduce the incorrect details action.
    • Follow-up: A separate follow-up PR should restrict the Buy Dash action to buy-capable ATM types and cover the details-screen capability combinations.

@romchornyi-pitcrew romchornyi-pitcrew left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: ready to merge

No blockers or majors. Reviewed at 47a51d6.

Level Verdict
1 · Idea ✅ Each segment lists every machine that supports its action. Agreed with the product owner (#1382 plan, step 5)
2 · Architecture ✅ Uses the existing provider pattern. The DAO already matches the type list (AtmDAO.swift:54-55), so no query change was needed
3 · Completeness ✅ Tests pin each segment's type set. The simulator checks in the description cover both directions
4 · Code ✅ Clean

Checked

  • Cell tags: the Sell tag now shows for .sell and .buySell, and the Buy tag hides only for .sell. An ATM with no type keeps the Buy tag alone, as before.
  • The list cell now agrees with the details screen, which already offered "Sell Dash" for .sell and .buySell (POIDetailsView.swift:561-562).
  • AtmSegmentTypesTests is in the test target (pbxproj).

Gap (outside this diff, worth a follow-up in #1382)

  • The details screen always shows "Buy Dash", even for a Sell Only ATM (POIDetailsView.swift:553-559). The list no longer gives a sell-only machine a Buy tag, so its details screen now contradicts the list. This is pre-existing, and sell-only machines were already reachable under All.

🤖 Reviewed with Claude Code

@ross-dash
ross-dash merged commit 179938a into develop Nov 13, 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.

3 participants