Repository navigation
fix(explore-dash): stop stranding the merchant sheet over the amount screen - #1086
Conversation
…screen Buying a gift card from a physical merchant that needs a login leaves the merchant details sheet on top of the Enter Amount screen, where `isModalInPresentation` means it cannot be swiped away. Leaving the flow and re-entering clears it. The order is what does it. `showDashSpendAuth` dismisses the details sheet before pushing the login screen, and that reset `didPresentDetailsSheet` so the sheet would come back when the user returned. On success the flow pops back here and pushes the amount screen in the same turn — and the push runs first, because `performAfterDismissingDetailsSheetIfNeeded` finds no sheet to dismiss and calls straight through. `viewDidAppear` then arrives after the push, sees the reset flag, and presents the sheet over the screen that was just pushed. Present only while this controller is actually the top of its navigation stack. Returning here still re-presents the sheet, because by then it is.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe POI details sheet now presents only when ChangesPOI details presentation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change prevents the merchant details sheet from covering the payment screen during navigation. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
llbartekll
left a comment
There was a problem hiding this comment.
Reviewed exact head f84fce0. The navigation-stack guard fixes the delayed sheet presentation race without affecting normal return behavior. No blockers found.
Issue being fixed or feature implemented
Buying a gift card from a physical merchant that requires a DashSpend login leaves the merchant details sheet stranded on top of the Enter Amount screen. It sets
isModalInPresentation = true, so it cannot be swiped away — leaving the flow and re-entering is the only way out.Reported from manual testing on an iOS 26.5 simulator.
The cause is ordering, not the sheet itself:
showDashSpendAuthgoes throughperformAfterDismissingDetailsSheetIfNeeded, which dismisses the details sheet and resetsdidPresentDetailsSheet = false— deliberately, so the sheet returns when the user comes back.POIDetailsViewControllerand callsshowDashSpendPayScreenin the same turn.detailsSheetViewControllerisnil, soperformAfterDismissingDetailsSheetIfNeededfinds nothing to dismiss and calls its action straight through, pushing the amount screen.viewDidAppear— from the pop in step 2 — arrives after that push, sees the reset flag and presents the details sheet on top of the screen that was just pushed.What was done?
Gate the presentation on this controller actually being the top of its navigation stack:
Returning to the details screen still re-presents the sheet, because at that point the controller is the top. The modal-presentation case (no navigation controller) is unaffected.
How Has This Been Tested?
dashpaybuild for the arm64 iOS Simulator.The failure is a navigation race that needs the DashSpend login path with a physical merchant to reproduce, so it is worth exercising on a device: buy a gift card from a physical merchant while logged out, complete the login, and confirm the Enter Amount screen comes up clean.
Breaking Changes
None.
Checklist:
Summary by CodeRabbit