[WIP] [Performance] Fix global create scan misidentifying Search context via fallback chain#93718
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5d36203e2
ℹ️ 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 |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bbe24fcfa8
ℹ️ 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".
|
|
||
| const tabScreenParam = getTabScreenParam(topmostTabNavigatorRoute); | ||
| if (tabScreenParam) { | ||
| return {name: tabScreenParam}; |
There was a problem hiding this comment.
Read nested Search params before trusting params.screen
When the live and preserved tab state are both missing but the tab route still carries nested Search params (for example an unmounted/lazy Search invoice route), this stub makes isSearchTopmostFullScreenRoute() return true while getCurrentSearchQueryJSON() still falls back to the default expense query because it cannot read those params. In the global-create confirmation flow, submitting an expense over an invoice Search route is then treated as same-type and only dismisses the modal instead of navigating/pre-inserting the expense Search route, leaving the new expense off-screen. Either carry/read the nested Search params or avoid the Search fast path when only this stub is available.
Useful? React with 👍 / 👎.
Explanation of Change
Fixes a
submit-to-destination-visiblespan failure identified from 3 Sentry traces on iOS HybridApp.Global create scan from Spend misidentifies Search context (traces
d0c23d02,2a89ae3d,9789e05e, iOS HybridApp, 44.5–50.6s):isSearchTopmostFullScreenRoute()returns false because live tab state is sliced. Fix:getTopmostFullScreenRoutenow falls back through live state → preserved state →params.screenhint.navigateAfterExpenseCreateno longer infers Search root from missing navigator state.Fixed Issues
$ #93725
PROPOSAL: N/A
Tests
ManualSubmitToDestinationVisiblespan end log thatfast_path_handlerissearch_dismiss, notdefaultOffline tests
N/A
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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