Repository navigation
Fix infinite loading of Reports Expenses tab after refreshing Split Submit page #79897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cristipaval
merged 18 commits into
Expensify:main
from
marufsharifi:fix/reports-expenses-tab-infinite-load-on-refresh
Feb 9, 2026
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9ce93df
Fix infinite loading of Reports Expenses tab after refreshing Split S…
marufsharifi e3c0e19
Merge branch 'main' into fix/reports-expenses-tab-infinite-load-on-re…
marufsharifi 837ed27
added comment for our regex
marufsharifi cfc13ce
added navigateToSearchRHP utility and used in search page
marufsharifi a211e3c
removed used type to fix the type failing.
marufsharifi c5339fd
Merge branch 'main' into fix/reports-expenses-tab-infinite-load-on-re…
marufsharifi 42621ab
applied ai feedback.
marufsharifi c2ded44
added unit test
marufsharifi 6e65780
fixe spell:check
marufsharifi ef33fbe
removed unnecessary type assertions.
marufsharifi 5e05f7c
fix/prettier failure.
marufsharifi 4097bed
removed delimiter-based slicing;
marufsharifi 1f3d786
Merge branch 'main' into fix/reports-expenses-tab-infinite-load-on-re…
marufsharifi 384161d
applied ai feedback.
marufsharifi 213a432
fixed type failure.
marufsharifi 3ce2243
Merge branch 'main' into fix/reports-expenses-tab-infinite-load-on-re…
marufsharifi 6e960e3
Merge branch 'main' into fix/reports-expenses-tab-infinite-load-on-re…
marufsharifi d9b9340
Merge branch 'main' into fix/reports-expenses-tab-infinite-load-on-re…
marufsharifi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,6 @@ import type {Screen} from './SCREENS'; | |
| import type {CompanyCardFeedWithDomainID} from './types/onyx'; | ||
| import type {ConnectionName, SageIntacctMappingName} from './types/onyx/Policy'; | ||
| import type {CustomFieldType} from './types/onyx/PolicyEmployee'; | ||
| import type AssertTypesNotEqual from './types/utils/AssertTypesNotEqual'; | ||
|
|
||
| type WorkspaceCompanyCardsAssignCardParams = { | ||
| policyID: string; | ||
|
|
@@ -168,8 +167,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?', | ||
| getRoute: (backTo?: string) => { | ||
| if (!backTo) { | ||
| return 'search/hold/search' as const; | ||
| } | ||
| return `search/hold/search/${encodeURIComponent(backTo)}` as const; | ||
| }, | ||
| }, | ||
| SEARCH_REJECT_REASON_RHP: 'search/reject', | ||
| MOVE_TRANSACTIONS_SEARCH_RHP: 'search/move-transactions', | ||
| MOVE_TRANSACTIONS_SEARCH_RHP: { | ||
| route: 'search/move-transactions/search/:backTo?', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. Can this just be
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same rationale as hold |
||
| getRoute: (backTo?: string) => { | ||
| if (!backTo) { | ||
| return 'search/move-transactions/search' as const; | ||
| } | ||
| return `search/move-transactions/search/${encodeURIComponent(backTo)}` as const; | ||
| }, | ||
| }, | ||
|
|
||
| // This is a utility route used to go to the user's concierge chat, or the sign-in page if the user's not authenticated | ||
| CONCIERGE: 'concierge', | ||
|
|
@@ -3950,15 +3966,4 @@ type Route = { | |
|
|
||
| type DynamicRouteSuffix = (typeof DYNAMIC_ROUTES)[keyof typeof DYNAMIC_ROUTES]['path']; | ||
|
|
||
| type RoutesValidationError = 'Error: One or more routes defined within `ROUTES` have not correctly used `as const` in their `getRoute` function return value.'; | ||
|
|
||
| /** | ||
| * Represents all routes in the app as a union of literal strings. | ||
| * | ||
| * If TS throws on this line, it implies that one or more routes defined within `ROUTES` have not correctly used | ||
| * `as const` in their `getRoute` function return value. | ||
| */ | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| type RouteIsPlainString = AssertTypesNotEqual<string, Route, RoutesValidationError>; | ||
|
|
||
| export type {Route, DynamicRouteSuffix}; | ||
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why another
/searchpath needed?Can this just be
search/hold/:backTo??Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mkhutornyi, we need a search-specific route so the background search context survives refresh; otherwise, the app can’t restore the expected
Reports > Submitscreen and falls back toExpenses(the behavior in #78983). Usingsearch/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