[Payment due @marufsharifi] [No QA] Fire search requests for visible todos#92299
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35a54a0252
ℹ️ 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".
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.
|
There was a problem hiding this comment.
Pull request overview
This PR extends the existing search-firing effect on the Spend home page to also fire Search requests for the visible TODO suggested searches (Submit / Approve / Pay / Export), in addition to the card and approval/payment queries it already fires. This ensures TODO row counts on the Spend page stay fresh after login/focus.
Changes:
- Imports
getSuggestedSearches,getSuggestedSearchesVisibility, andTODO_SEARCH_KEYSfromSearchUIUtils. - Reads
emailfromuseCurrentUserPersonalDetailsand computes suggested-search visibility (passing empty card feeds and undefined default Expensify card, since neither affects TODO visibility). - In
fireSearches, iterates overTODO_SEARCH_KEYSand dispatches asearchfor each visible TODO withshouldCalculateTotals: false.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5166398f20
ℹ️ 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".
|
No new product considerations - removing my assignment and unsubscribing. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppNot Required Android: mWeb ChromeNot Required iOS: HybridAppNot Required iOS: mWeb SafariNot Required MacOS: Chrome / Safari |
luacmartins
left a comment
There was a problem hiding this comment.
LGTM. We have conflicts and failing checks though
|
Resolved conflicts. Failed tests seemed unrelated (Pagination stuff) and hopefully they are fixed now |
|
Another test failed now but also looks unrelated. Can you please rerun that one |
|
Failed on retry. Running again |
|
🎯 @marufsharifi, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
Changes LGTM; the failure is unrelated. thanks. |
|
Merged main |
|
Carlos approved before so I will merge it |
|
Nice! Can't wait to remove the Search calls from OpenApp |
|
🚧 @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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.0-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review: no changes required I reviewed the changes in this PR and no updates to the help site ( Why: This PR is a behind-the-scenes data-fetching optimization. It fires There is no change to any user-facing feature, UI label, tab, setting, button, or workflow that a help article describes — it's purely when data loads, not what a user sees or does. Since the help site documents user-facing behavior, no draft PR was created. |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.0-7 🚀
|
|
🤖 Payment issue created: #92989 |
| } | ||
| fireSearches(); | ||
| }, [isFocused, isOffline, displayableCardIDsKey, applicabilityKey]); | ||
| }, [isFocused, isOffline, displayableCardIDsKey, applicabilityKey, suggestedSearchesVisibility]); |
There was a problem hiding this comment.
@s77rt @mountiny isn't suggestedSearchesVisibility a new object every render? wouldn't watching it trigger the useEffect every time?
Coming from: https://expensify.slack.com/archives/C0B96MS9B8X/p1781114792126269?thread_ts=1781114404.944699&cid=C0B96MS9B8X
There was a problem hiding this comment.
Explanation of Change
Fire search requests for visible todos
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/643382
PROPOSAL:
Tests
Searchrequest is made (they could be other requests too)Screen.Recording.2026-06-02.at.1.21.58.AM.mov
Offline tests
n/a
QA Steps
n/a
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