Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 366913cc94
ℹ️ 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".
|
Hey @TMisiukiewicz, what do you think about these two cases?
Thank you. |
|
@brunovjk thanks for your comment!
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
…inflight-refetch # Conflicts: # tests/unit/Search/searchSaveRecentSearchFlagTest.ts
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ 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.5.41-0 🚀
|
|
No help site update needed — this PR fixes duplicate search requests and resulting freezes without adding a feature, changing user workflows, or making existing article instructions incorrect. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.5.41-2 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Opening an expense from Spend (or editing it in the RHP) sent two
Searchrequests for the same query: an unflagged refetch, then a copy withshouldSaveRecentSearch: true.The refetch (from
useSearchAutoRefetch,refreshSearchAfterReportActionor the totals retry) marks the snapshot pending. That reopens the guard inuseSearchPageSetup, so the page fires its own flagged request.search()sees the running request and, because only the new one has the save flag, re-sends the whole query once the first one finishes. On large accounts each response blocks the JS thread for seconds, so every edit froze the app twice.useSearchPageSetupnow skips its request when all of these hold:A user arriving on a query that another caller (for example a Home row) is refreshing still sends the flagged request, so it is still saved to recent searches. A not-yet-loaded first page still goes through
search()and claims the page for Search.search()itself is unchanged. The newisFirstPageSearchInFlightmirrors the totals, footer breakdown and trip-rooms checkssearch()uses to decide on a re-fire, and leaves out the save-flag one, which is the duplicate this PR removes.Fixed Issues
$ #106777
PROPOSAL:
Tests
SearchSearchrequest goes out for the open query (samehash,offset: 0)Searchrequest goes out for the open querySearchrequest withshouldSaveRecentSearch: truegoes out for that query and it appears in recent searchesshouldSaveRecentSearch: trueOffline tests
Same as before: going offline and back on Spend refetches the open query once.
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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
🤖 Generated with Claude Code