Repository navigation
perf: stop Getting started and the Spend empty state re-rendering when Create expense opens - #106712
BartekObudzinski wants to merge 3 commits into
Conversation
|
@nyomanjyotisa 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] |
|
This PR adds a new |
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. |
|
@MelvinBot test |



Explanation of Change
Starting Create expense writes a transaction draft. Two screens that stay mounted while it opens subscribed to the list of draft IDs, so they re-rendered in the same commit that mounts the Create expense page:
useGettingStartedItems). Home is the screen under the RHP, so it is still mounted.EmptySearchView). Hidden native tabs are not frozen since the native tab bar.Both only use the IDs inside a press handler, to clear old drafts in
startMoneyRequest. They now read the drafts withOnyx.getwhen the button is pressed instead of subscribing, so a draft write no longer re-renders them.EmptySearchViewalso passes the screen focus fromSearchtouseSearchTypeMenuSections, the same gate #105620 added for the narrow Spend menu, so its Submit button stops watching drafts while Spend is hidden.On these two buttons the span now starts after
Onyx.getresolves, which is a cache read. The Create menu path is unchanged.Performance, iOS simulator (iPhone 18 Pro, DEV build), new account,
ManualOpenCreateExpenseopened from Home through the actions menu, 9 interleaved blocks of 6 opens after warmup:In the commit that mounts the page,
GettingStartedSection(about 9ms) andEmptySearchView(about 6ms) no longer render. Accounts that already have expenses do not show these two sections, so they will see little change.Fixed Issues
$ #105517
PROPOSAL:
Tests
Offline tests
Same as tests while offline. Opening Create expense makes no API call, so it works the same.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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
Getting started and Spend empty state Create expense buttons: VIDEO_TO_UPLOAD
iOS: mWeb Safari
MacOS: Chrome / Safari