CCCT-2535 Show Payment Unit Cards On The Delivery Visits Tab - #3883
Conversation
The Visits tab was empty. Restore the previous card layout, its adapter and the view model behind it as Kotlin, and drive them from the worker's own per-unit progress. Tapping a card opens that unit's visit list. The detail screen identifies the unit by UUID rather than name, since two payment units can carry the same name; it filters deliveries on slugUUID, the key the dashboard's per-unit counts already use. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lc2WGfedqbxgBasYvpUJy4
Drives the tab end to end against the real Connect database and a mock server, through to the tap that opens a single unit's visit list. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lc2WGfedqbxgBasYvpUJy4
Suggested Review Order
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe delivery visits screen now displays payment-unit progress cards with approved counts, earnings, pending counts, percentages, and remaining-status text. Selecting a card opens unit-specific visit details. Detail filtering uses payment-unit UUIDs, while the action-bar title uses the matching unit name. Robolectric tests cover progress calculations, rendering, synchronization, navigation, and filtering. Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to This PR adds payment-unit cards to the Delivery Visits tab and filters the detail view by payment-unit UUID; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant ConnectDeliveryVisitsFragment
participant ConnectDeliveryProgressReportAdapter
participant RecyclerView
participant ConnectDeliveryVisitsDetailFragment
ConnectDeliveryVisitsFragment->>ConnectDeliveryVisitsFragment: calculate payment-unit progress
ConnectDeliveryVisitsFragment->>ConnectDeliveryProgressReportAdapter: updateData(progress details)
RecyclerView->>ConnectDeliveryProgressReportAdapter: bind delivery card
ConnectDeliveryProgressReportAdapter-->>RecyclerView: render progress and status
ConnectDeliveryProgressReportAdapter->>ConnectDeliveryVisitsFragment: report selected unit UUID
ConnectDeliveryVisitsFragment->>ConnectDeliveryVisitsDetailFragment: navigate with unit UUID
ConnectDeliveryVisitsDetailFragment-->>ConnectDeliveryVisitsFragment: display filtered unit visits
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description is complete and directly related to the change. It covers the product impact, technical design, safety considerations, testing, and ticket reference. The Labels and Review checklist is not included, but the required change rationale and validation details are present. Full details: Docstring CoverageExplanation Docstring coverage is 17.02% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 47 functions across 5 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3883 +/- ##
============================================
+ Coverage 33.04% 33.42% +0.37%
- Complexity 5864 5944 +80
============================================
Files 999 1002 +3
Lines 59398 59598 +200
Branches 7093 7121 +28
============================================
+ Hits 19628 19918 +290
+ Misses 37528 37404 -124
- Partials 2242 2276 +34 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
conroy-ricketts
left a comment
There was a problem hiding this comment.
The UI looks fantastic! The Delivery page is really coming together
CCCT-2535
Screen_recording_20260826_112258.mp4
Please ignore the bottom spacing for the CTA bar—it will be fixed in a follow-up task.
Product Description
The Visits tab of a delivery opportunity was empty. It now lists a card per payment
unit with that unit's approved visits, amount earned and visits remaining, and tapping
a card opens the visit list filtered to that unit.
Technical Summary
Restores the previous card layout design.
The identity handed to the detail screen is the payment unit's UUID rather than its
name — two payment units can carry the same name by mistake, a UUID cannot — so that
screen now filters deliveries on
slugUUID, which is also what the dashboard's ownper-unit counts key on.
Safety Assurance
Safety story
What gives confidence:
ConnectDeliveryHomeFragmentTestsuite; bothpass. I also confirmed the new tests fail when the unit filter and the approved-only
filter are broken, so they are not vacuous.
Automated test coverage
ConnectDeliveryVisitsFragmentTestadds nine Robolectric tests driving the tab end toend — the job seeded through the real Connect database, deliveries arriving over the real
networking stack from a mock server. They lock down the per-unit figures, that only
approved visits count, each phrasing of the remaining-visits line, and the tap-through
that opens the detail screen listing that unit's visits and no others.