Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 862ac6c3ba
ℹ️ 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".
|
Thanks for the improvements @rlinoz! I wonder, how would the performance change if instead of adding more manual memoization, we dropped the existing manual memoization to let React Compiler automatically optimize the component? Here are some insight I've gathered when running compiler health check on those components: Currently If we remove these two manual memoizations, the compiler should fully optimize Line 71 - drop - const transactionDetails = useMemo(() => getTransactionDetails(transaction), [transaction]);
+ const transactionDetails = getTransactionDetails(transaction);Line 86-90 - drop - const navigateToReviewFields = useCallback(() => {
+ const navigateToReviewFields = () => {
Navigation.navigate(
getReviewNavigationRoute(Navigation.getActiveRoute(), route.params?.threadReportID, transaction, duplicates, policy, policyCategories, policyTags ?? {}, transactionReport),
);
- }, [route.params?.threadReportID, transaction, duplicates, policy, policyCategories, policyTags, transactionReport]);
+ };With the compiler fully optimizing the component, the Let me know what you think, thanks! |
|
Ah nice! As far as I can tell that gets the same result, updated. |
|
@rlinoz FYI, there's something up with linter after the changes - could that be caused by not all the commits present on remote? |
|
My check here was fake #84067 (comment) For some reaosn that I can't figure out adding the memo there still makes a difference for this not to re-render @kacper-mikolajczak |
|
@hungvu193 if you could continue with the review 🙇 |
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.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-03-06.at.10.44.12.movAndroid: mWeb ChromeScreen.Recording.2026-03-06.at.10.39.56.moviOS: HybridAppScreen.Recording.2026-03-06.at.10.33.46.moviOS: mWeb SafariScreen.Recording.2026-03-06.at.10.32.14.movMacOS: Chrome / SafariScreen.Recording.2026-03-06.at.10.05.14.mov |
|
@puneetlath 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] |
|
🎯 @hungvu193, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #84353. |
amyevans
left a comment
There was a problem hiding this comment.
LGTM!
Though looks like #84067 (comment) is still pending
|
I will go ahead and merge and address that in a follow up if necessary, thanks! |
|
🚧 @rlinoz 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.3.33-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.33-5 🚀
|
Explanation of Change
This PR helps stop re-rendering
TransactionPreviewwhen not needed, helping with the manual open report metric.Fixed Issues
#84148
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
Screen.Recording.2026-03-03.at.16.46.32.mov
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari