Repository navigation
Remove getPersonalDetailByEmail usage in getAccountIDsByLogins #19 - #108762
bernhardoj wants to merge 6 commits into
Conversation
|
@hoangzinh @lorretheboy One of you needs to 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] |
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. |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de7114bf68
ℹ️ 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".
|
|
||
| const [allReports] = useOnyx(ONYXKEYS.COLLECTION.REPORT); | ||
| const [allPersonalDetails] = useAllPersonalDetails(); | ||
| const personalDetailsByLogin = useAllPersonalDetailsByLogin(); |
There was a problem hiding this comment.
This adds a second rebuild of the option list on every personal details update. PersonalDetailsByLoginProvider only publishes the new map in a useLayoutEffect, so this hook first renders with the new allPersonalDetails and the old map (cache miss, full build), then re-renders with the new map (cache miss again, second full build). Both are in cacheInputs.
Could createFilteredOptionList build the login map from the personalDetails it already gets (e.g. buildPersonalDetailsByLogin(personalDetails) on a cache miss) instead? Then both always change together.
There was a problem hiding this comment.
Fixed. Please check
…prevent a login map handed in separately arrive a render later and rebuild the whole option list a second time
Explanation of Change
Fixed Issues
$ #66391
PROPOSAL:
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Prerequisite: have a workspace with an approver
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
iOS: mWeb Safari
MacOS: Chrome / Safari
approver.mp4