Optimize post-expense search page transition with progressive rendering#86738
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c419a01bdc
ℹ️ 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✅ Changes either increased or maintained existing code coverage, great job!
|
|
|
||
| function SearchInputSelectionWrapper({ref, ...props}: SearchAutocompleteInputProps) { | ||
| const [showSkeleton, setShowSkeleton] = useState(!isAutocompleteInputInitialized); | ||
| function SearchInputSelectionWrapper({ref, skipSkeleton, ...props}: SearchAutocompleteInputProps & {skipSkeleton?: boolean}) { |
There was a problem hiding this comment.
Can skipSkeleton be a part of SearchAutocompleteInputProps?
There was a problem hiding this comment.
Unfortunately no - SearchAutocompleteInput itself doesn't use skipSkeleton, so adding it to SearchAutocompleteInputProps triggers react/no-unused-prop-types. It's only consumed by the wrapper layer, so the intersection type is the correct approach here.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec57427727
ℹ️ 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".
|
@ShridharGoel Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4653768e8
ℹ️ 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 |
|
TypeScript failing on main - unrelated. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7dff25d82b
ℹ️ 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 |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ 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". |
|
No product review needed |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-04-02.at.10.05.23.PM.movAndroid: mWeb ChromeScreen.Recording.2026-04-02.at.10.09.03.PM.moviOS: HybridAppiOS: mWeb SafariScreen.Recording.2026-04-02.at.3.09.51.AM.movMacOS: Chrome / Safari |
|
Can people have a look at the offline experience? It is a bit unstable I guess (might not be related to the changes here though) Screen.Recording.2026-04-02.at.3.09.51.AM.mov |
|
@ShridharGoel Next time, please try to provide the minimum number of steps necessary to reproduce the issue, as the video is quite long and it will make it easier for QA's in future. 🙏 The offline + no Onyx issue is reproducible on main, though I agree it's something to look into but out of scope here. Repro steps:
Video from main: Screen.Recording.2026-04-02.at.09.21.49.movAbout the headers, I can't seem to reproduce neither on main or my branch 😕 Can you reliably reproduce this? |
|
Discussed over Slack, we can ignore this since it is happening on main also |
luacmartins
left a comment
There was a problem hiding this comment.
I'm slightly concerned with the maintainability of this architecture and the potential class of bugs it might introduce. I think we should revisit this solution once the tab navigation changes are in.
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @luacmartins 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/luacmartins in version: 9.3.52-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required. This PR is a performance optimization for the search page transition after expense creation on narrow layouts. It introduces progressive rendering (static placeholders → full interactive UI) to reduce load time by ~36-49%. The changes are entirely internal:
The help site documents user-facing features and workflows, none of which are affected by this PR. |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.52-9 🚀
|
Explanation of Change
Optimizes the post-expense-creation search page transition on narrow (mobile) layouts. Instead of waiting for the heavy
Searchcomponent to mount, we show lightweight static stand-ins and progressively upgrade to the full interactive UI.Rendering phases (submit-and-navigate flow only):
SearchStaticListrenders real data via plainFlatList(max 10 items)StaticTabSelector,StaticSearchPageHeader,StaticFiltersBar)SearchStaticList.onLayoutfiresSearchStaticList(unchanged)useEffectsetsisInteractive=trueviastartTransitionSearchmounts and receivesstaticListContentasinitialContentprop - renders same static content on first frame while hooks initializeSearchfinishes deferred work (shouldShowRowSkeletonclears)FlashListreplacesinitialContentKey design: there is no overlay.
SearchStaticListis rendered alone first, then replaced bySearchwhich receives the samestaticListContentelement asinitialContent. This avoids having two list components mounted simultaneously, preventing UI thread contention.Other changes:
skipWaitForWrites-- fires the search API immediately when a deferred write is pending (no risk of overwriting optimistic data since search snapshots live in separate Onyx keys)handleNavigateAfterExpenseCreatewhennavigationRefis already readyPulsingView-- reusable Reanimated component for opacity pulse animation withwrapperStyleprop for opaque backgrounds that shouldn't pulseskipSkeletonprop onSearchInputSelectionWrapperto avoid double-skeleton on the static pathSearchStaticListusesuseSession()context instead ofuseCurrentUserPersonalDetails()to avoid extra Onyx subscriptionsPulsingViewwrapper around all static header componentsPerformance gains (
ManualSubmitToDestinationVisiblespan):mainavg (ms)Raw measurements (the first one is cold)
main(6 runs): 1684, 1079, 1085, 1095, 1079, 1249 msthis branch(6 runs): 617, 628, 579, 575, 604, 686 msmain(5 runs): 1804, 1758, 1590, 1863, 1664 msthis branch(5 runs): 904, 1083, 1332, 1129, 1143 msFixed Issues
$ #83634
PROPOSAL: N/A
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_new.mov
Android: mWeb Chrome
iOS: Native
iOS_new.mov
iOS: mWeb Safari
MacOS: Chrome / Safari