Fix: return to recipient list on back during Send to someone flow - #99148
Draft
MelvinBot wants to merge 1 commit into
Draft
Fix: return to recipient list on back during Send to someone flow#99148MelvinBot wants to merge 1 commit into
MelvinBot wants to merge 1 commit into
Conversation
Co-authored-by: Kevin Brian Bader <ikevin127@users.noreply.github.com>
Contributor
Author
|
I created this PR from an upstream branch since you don't have push access to To take ownership of this branch and be able to push updates from your own fork, run: Then you can close this PR and open a new one from your fork. Otherwise, an Expensify engineer with write access can push directly to this upstream branch. |
Open
7 tasks
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Contributor
Author
Contributor
Author
|
🤖 Web test: ✅ PASS — the fix works as intended. I ran the PR's repro flow on Web (dev NewDot). Pressing back on the confirmation page during "Send to someone" now correctly returns to the recipient list, not the report.
No console errors observed. Screenshots: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Explanation of Change
Deploy blocker fix for the "Send to someone" flow on a tracked expense.
When you open a tracked expense → More → Send to someone, pick a recipient, then press the back button on the confirmation page, you were dropped back on the report instead of the recipient list.
Root cause: "Send to someone" creates a converted track-expense draft (so
transaction.isFromGlobalCreateisfalse) and reaches the confirmation page by replacing the recipient picker in the RHP stack. The confirmation page'snavigateBackonly reconstructs the participants route whenisFromGlobalCreateis truthy; for this flow it falls through tonavigateToStartMoneyRequestStep, which for aSUBMITaction runs a bareNavigation.goBack(). Because the picker was already replaced, that pops the whole RHP to the underlying report.Fix: In
useParticipantSubmission.goToNextStep, pass an explicitbackTo(the recipient-picker route, viaNavigation.getActiveRoute()) when building the confirmation route for the converted-trackSUBMITcase. This reuses the exact mechanism already used for theSHAREaction, so the confirmation back button now takes theif (backTo)branch and returns to the recipient list. The change is scoped withaction === SUBMIT && !isFromGlobalCreate, so global-create, categorize, split, and pay flows are untouched. The same fix also covers the Inbox track-expense whisper's "Submit it to someone" flow, which shares this code path.Fixed Issues
$ #99145
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari