perf: search autocomplete optimization#92938
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
…-SearchAutocompleteList
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8cafb86b75
ℹ️ 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".
| return; | ||
| } | ||
|
|
||
| const unsubscribe = navigation.addListener('transitionEnd', () => setDidTransitionOut(true)); |
There was a problem hiding this comment.
Add a fallback when transitionEnd is missed
When native/iOS navigation misses transitionEnd—a case this repo already guards against in src/components/ScreenWrapper/index.tsx:203 and src/hooks/useAutoFocusInput.ts:104 with CONST.SCREEN_TRANSITION_END_TIMEOUT—this listener never runs and didTransitionOut stays false. In the Search → chat path from issue #91846, that makes useIsFocusedUntilTransitionEnd() keep returning true, so DeferredAutocompleteList continues rendering the heavy SearchAutocompleteList behind the chat and the intended message-send performance fix is skipped for those transitions.
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ 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". |
Test: Recent Chat Message Update (only mobile native)
|
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid-Native.mp4Android: mWeb ChromeiOS: HybridAppiOS-Native.mp4iOS: mWeb SafariMacOS: Chrome / Safari |
|
🎯 @nyomanjyotisa, 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. |
No need for a payment issue. I assigned @nyomanjyotisa to the fixed issue |
|
🚧 @cristipaval has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/cristipaval in version: 9.4.15-0 🚀
|
|
🤖 No help site changes required. I reviewed the changes in this PR against the help site files under This is a purely internal performance/memory optimization — it adds a Because there's no change to any user-facing feature, flow, setting, tab, or button label, there's nothing in the public help site that needs to be updated. No draft docs PR was created. @rinej, let me know if you believe any user-facing behavior actually changed here and I'll re-evaluate and open a docs PR if needed. |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.4.15-3 🚀
|
Explanation of Change
On native, the search autocomplete screen stays mounted behind a chat after navigating into it, leaving the heavy
SearchAutocompleteListin memory. This PR adds auseIsFocusedUntilTransitionEndhook that swaps the list for a lightweight skeleton once the closing transition finishes, keeping it mounted only through the animation so navigation never blanks mid-transition.Fixed Issues
#91846
PROPOSAL:
Tests
Offline tests
QA Steps
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.mp4
Android: mWeb Chrome
iOS: Native
ios.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari