Navigate to expense detail page after adding a receipt#71818
Conversation
|
@dukenv0307 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Hey @rafecolton I created a potential fix but I have some problem with building the app on my phone. Could you run the ad hoc builds so I could verify? |
Codecov Report❌ Patch coverage is
... and 21 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Triggered the build |
|
🚧 @rafecolton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
It doesn't work on my side @kubabutkiewicz Screen.Recording.2025-10-06.at.11.42.42.mov |
|
thanks for checking will be digging further |
|
Hey @dukenv0307 is there is something I am doing wrong ? ScreenRecording_10-06-2025.11-49-45_1.MP4 |
|
@kubabutkiewicz Can you please merge main? then I'll check again |
|
@kubabutkiewicz Can you test on 1 transaction thread? It also works on my side when there are 2 transactions in the expense report, but it doesn't work on 1 transaction thread |
|
I am still not able to reproduce that for me its working properly, I think, I am doing everything as described no? ScreenRecording_10-07-2025.17-13-31_1.MP4 |
|
hmm maybe its android only , let me check that |
|
Same on android, looking good 😅 |
|
@kubabutkiewicz After digging deeper, I found out that we can reproduce this issue by using the following steps:
Screen.Recording.2025-10-09.at.09.24.13.mov |
|
@kubabutkiewicz The RCA is in The first route
I think we should use |
|
@dukenv0307 I dont know whats going on but I am doing exactly same steps as you and stil working for me, I will just apply the fix you suggest and we can run new ad hoc build to check ScreenRecording_10-09-2025.17-04-35_1.MP4 |
…ndLast for ReportsSplitNavigator
|
I pushed this change @dukenv0307. Could you @rafecolton run again the ad hoc builds 🙏 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-10-09.at.23.26.23.movAndroid: mWeb ChromeScreen.Recording.2025-10-09.at.23.33.25.moviOS: HybridAppiOS: mWeb SafariScreen.Recording.2025-10-09.at.23.34.14.movMacOS: Chrome / SafariScreen.Recording.2025-10-09.at.23.35.24.movMacOS: DesktopScreen.Recording.2025-10-09.at.23.42.27.mov |
|
Thank you @kubabutkiewicz. This issue works well on my side. @mountiny @rafecolton Can you please trigger an ad-hoc build? We need to verify it on the real iOS device |
|
🚧 @rafecolton has triggered a test Expensify/App build. You can view the workflow run here. |
HelpDot Documentation ReviewAssessment SummaryAfter thorough analysis of PR #71818, this PR does not contain any HelpDot documentation changes. This is a code-only pull request that implements a navigation fix for expense receipt scanning functionality. PR AnalysisPR Title: Navigate to expense detail page after adding a receipt Files Modified (Code Only)
RecommendationThis PR should not be reviewed using HelpDot documentation criteria as it contains no documentation changes. The changes are purely functional code improvements for the expense scanning user flow. For future reference, HelpDot documentation reviews should only be requested for PRs that modify files in the docs/ directory or other markdown documentation files. Next StepsPlease direct this PR to appropriate code reviewers rather than documentation reviewers, as it implements a navigation enhancement rather than documentation updates. |
mountiny
left a comment
There was a problem hiding this comment.
Looks good to me, but I would love a review from navigation team before merging
|
Bumped @adamgrzybowski and @WojtekBoman for a review, I think they both were ooo |
| AppState.addEventListener('change', (nextAppState) => { | ||
| if (nextAppState.match(/inactive|background/) && appState === 'active') { | ||
| Log.info('Flushing logs as app is going inactive', true, {}, true); | ||
| saveCurrentPathBeforeBackground(); |
There was a problem hiding this comment.
Hey, I'd like to make sure about this part :)
Why do we need to save it here? Can't we save it when we open this page like it's done in parseAndLogRoute?
There was a problem hiding this comment.
Its added because we are trying to fix the issue when you are going to change some permissions in the OS settings then app navigation state is reset and user is navigated to Inbox. this is for saving the navigation state before doing that to be able then to navigate to the screen which user was before.
There was a problem hiding this comment.
OK, I understand that part. I'm just wondering if we can save this information earlier. Now, saveCurrentPathBeforeBackground will be called every time the app goes to the background. Is the navigation state different when we go to the background and when we're on the scanned receipt screen?
There was a problem hiding this comment.
I see CONST.EXCLUDE_FROM_LAST_VISITED_PATH has been modified, so updateLastVisitedPath won't be called in parseAndLogRoute when we're on this page
mountiny
left a comment
There was a problem hiding this comment.
@dukenv0307 could you retest now after the changes too please?
Screen.Recording.2025-10-16.at.11.53.02.mov |
|
LGTM |
…l/Expensify-App into fix-70920
|
@mountiny could you take a look here? |
|
@mountiny @rafecolton Can we merge this PR 😄 ? |
mountiny
left a comment
There was a problem hiding this comment.
Ok I will go ahead and merge to avoid more conflicts
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.2.37-1 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.2.37-8 🚀
|

Explanation of Change
Fixed Issues
$#70920
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
same as tests
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop