Repository navigation
Fix infinite loading of Reports Expenses tab after refreshing Split Submit page - #79897
Conversation
|
@mkhutornyi 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ce93df9f8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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.
|
JmillsExpensify
left a comment
There was a problem hiding this comment.
Changes look good. No product review required on this PR.
Please add unit tests |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef33fbeee1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eaa0baf2bf
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| route: 'search/hold/search/:backTo?', | ||
| getRoute: (backTo?: string) => { | ||
| if (!backTo) { | ||
| return 'search/hold/search'; | ||
| } | ||
| return `search/hold/search/${encodeURIComponent(backTo)}`; |
There was a problem hiding this comment.
Preserve Route type safety for new search routes
This getRoute returns a plain string (no as const/template literal type), so ExtractRouteName for this entry becomes string and—combined with the removed RouteIsPlainString check—widens the Route union to string. That means Navigation.navigate/goBack will accept any string and typos or malformed routes will compile but fail at runtime. Consider restoring the literal return typing (or the removed validation) so Route stays a constrained union.
Useful? React with 👍 / 👎.
| @@ -141,8 +140,25 @@ const ROUTES = { | |||
| getRoute: ({reportID}: {reportID: string}) => `search/r/${reportID}/reject` as const, | |||
| }, | |||
| TRANSACTION_HOLD_REASON_RHP: 'search/hold', | |||
| TRANSACTION_HOLD_REASON_SEARCH: { | |||
| route: 'search/hold/search/:backTo?', | |||
There was a problem hiding this comment.
Why another /search path needed?
Can this just be search/hold/:backTo??
There was a problem hiding this comment.
@mkhutornyi, we need a search-specific route so the background search context survives refresh; otherwise, the app can’t restore the expected Reports > Submit screen and falls back to Expenses (the behavior in #78983). Using search/hold/:backTo? would conflate search and non-search flows, and could remap non-search RHP visits into Search on refresh. Keeping /search/hold/search/:backTo? makes the search relationship explicit and safe
| SEARCH_REJECT_REASON_RHP: 'search/reject', | ||
| MOVE_TRANSACTIONS_SEARCH_RHP: 'search/move-transactions', | ||
| MOVE_TRANSACTIONS_SEARCH_RHP: { | ||
| route: 'search/move-transactions/search/:backTo?', |
There was a problem hiding this comment.
Same here. Can this just be search/move-transactions/:backTo??
| function navigateToSearchRHP(route: {route: string; getRoute: (backTo?: string) => string}, fallbackRoute?: string) { | ||
| if (isSearchTopmostFullScreenRoute()) { |
There was a problem hiding this comment.
navigateToSearchRHP is called only on SearchPage.
Are there any cases when isSearchTopmostFullScreenRoute() is false?
There was a problem hiding this comment.
Yes. SearchPage can be preloaded while another full-screen navigator is active, so isSearchTopmostFullScreenRoute() can be false even when the component is mounted. The guard ensures we only attach backTo when Search is truly topmost.
|
@mkhutornyi, thanks for the review. I will address your feedback. thanks. |
|
@mkhutornyi, I addressed your comments and merged the main. Please take another look when you get a chance. thanks. |
|
Please fix conflict |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@mkhutornyi, conflicts fixed. thanks. |
|
@mkhutornyi, kindly bump. thanks. |
|
@mkhutornyi, quick bump. thanks. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safariweb.mov |
|
@marufsharifi I am getting conflicts locally after merging main. |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@mkhutornyi, let me check. |
|
@mkhutornyi, I could merge without any conflicts and pushed. Could you please check again? thanks. |
@mkhutornyi, could you please share a record? Since those numbers come from encoding.
|
Screen.Recording.2026-02-09.at.8.30.46.am.mov |
|
@mkhutornyi, thanks, let me check. |
|
@mkhutornyi, this already existed in the app before our changes. So, this doesn't seem to be related to our changes. I think it would be good to handle this in a follow-up pr since this is not reported in the OP and not caused by our changes. Screencast.from.2026-02-09.16-09-14.webm |
|
🚀 Deployed to staging by https://github.com/cristipaval in version: 9.3.16-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.16-9 🚀
|



Explanation of Change
When we go to
Reports > Submit,and check an expense, then click the dropdown and select the split,If we refresh at the split screen, the Background screen should stay in
Reports > Submit.Fixed Issues
$ #78983
PROPOSAL: #78983 (comment)
Tests
Reports > Submitstill being shown as backgound screen.Offline tests
Same as Tests
QA Steps
Same as Tests
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Not applicable
Android: mWeb Chrome
Screen.Recording.1404-10-29.at.5.46.06.PM.mov
iOS: Native
Not applicable
iOS: mWeb Safari
Screen.Recording.1404-10-29.at.5.43.53.PM.mov
MacOS: Chrome / Safari
Screen.Recording.1404-10-29.at.5.34.58.PM.mov