Fix issue where back button returns to confirm detail page after crea…#77964
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@KocaPepsi Could you please update the test steps like this? 1. Open the Expensify app.
2. Navigate to any workspace chat and create a manual expense.
3. After creating the manual expense, go to the Reports tab.
4. In the filter, choose Type: Expense, then tap the expense created in step 2.
5. In the composer box, tap the + button.
6. Select Create expense and complete creating another manual expense.
7. After the expense is created, tap the Back button in the header.
8. Verify that tapping the Back button in the header returns you to the Reports page. |
|
@KocaPepsi Could you please merge main |
…vigation-after-create-expense-76657
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-12-19.at.10.02.44.mp4Android: mWeb ChromeScreen.Recording.2025-12-19.at.10.04.25.mp4iOS: HybridAppScreen.Recording.2025-12-19.at.10.08.07.mp4iOS: mWeb SafariScreen.Recording.2025-12-19.at.10.09.54.mp4MacOS: Chrome / SafariScreen.Recording.2025-12-19.at.09.55.29.mp4 |
|
@KocaPepsi Overall, it looks good and redirects to the correct route, but on the native app it feels a bit odd. When we create an expense, it briefly shows the Reports page before navigating to the search money request report, as shown in the video. Android: HybridAppScreen.Recording.2025-12-19.at.10.02.44.mp4iOS: HybridAppScreen.Recording.2025-12-19.at.10.08.07.mp4I think the problem is due to our use of Line 998 in 5e46df2 Could you try updating your alternative solution 1 and see if it works well and provides better behavior? Lines 997 to 1003 in 5e46df2 to: if (hasMultipleTransactions && reportID) {
// Find and remove the RightModalNavigator instead of dismissing the entire modal
const rightModalNavigatorRoute = rootState.routes.find((route) => route.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR);
if (rightModalNavigatorRoute?.key) {
Navigation.removeScreenByKey(rightModalNavigatorRoute.key);
Navigation.setNavigationActionToMicrotaskQueue(() => {
Navigation.navigate(ROUTES.SEARCH_MONEY_REQUEST_REPORT.getRoute({reportID}));
});
}
return;
} |
|
Hi @huult, I will update |
|
@KocaPepsi Sorry, please stop updating this. If we use it, we will stay on the confirmation screen for a bit. Screen.Recording.2025-12-19.at.10.57.33.mov |
mountiny
left a comment
There was a problem hiding this comment.
Thank you! Lets be on a look out for any deploy blockers from this please
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.2.85-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.2.85-7 🚀
|
Explanation of Change
We should call use setNavigationActionToMicrotaskQueue to ensure all required operations complete before navigation occurs.
Fixed Issues
$ #76657
PROPOSAL: #76657 (comment)
Tests
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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
6_6.mp4
Android: mWeb Chrome
4_4.mp4
iOS: Native
5_5.mp4
iOS: mWeb Safari
3_3.mp4
MacOS: Chrome / Safari
1_1.mp4
2_2.mp4