[No QA] Add reasonAttributes to MergeExpensesSkeleton in MergeTransactionsListContent#83679
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
e02293d to
092bb11
Compare
|
@hoangzinh 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: 092bb11ddc
ℹ️ 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 reasonAttributes: SkeletonSpanReasonAttributes = { | ||
| context: 'MergeTransactionsListContent', | ||
| isEligibleTransactionsLoaded: eligibleTransactions !== undefined, | ||
| }; |
There was a problem hiding this comment.
Memoize reason attributes passed to skeleton
reasonAttributes is created as a new object on every render, and MergeExpensesSkeleton forwards it to useSkeletonSpan, whose update effect depends on reasonAttributes; while the loading placeholder is visible, any parent re-render (e.g., Onyx/network updates) will repeatedly call span.setAttributes/span.addEvent with identical data, creating noisy telemetry and avoidable work. Please memoize this object (as done in other call sites) so updates only happen when the loaded state actually changes.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This component is already using useMemo and useCallback so React compiler will skip this compoent. We can either:
- add
useMemofor this constant - Remove all usaged of
useMemoanduseCallbackin this component.
There was a problem hiding this comment.
I decided to Remove all usaged of useMemo and useCallback in this component.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-03-04.at.19.10.30.movAndroid: mWeb ChromeScreen.Recording.2026-03-04.at.19.08.38.moviOS: HybridAppScreen.Recording.2026-03-04.at.19.18.26.moviOS: mWeb SafariScreen.Recording.2026-03-04.at.19.12.24.movMacOS: Chrome / SafariScreen.Recording.2026-03-04.at.19.05.18.mov |
|
@sosek108, there is some lag on the merge transaction list page Screen.Recording.2026-03-04.at.00.38.25.mov |
|
@hoangzinh I did merge main to the branch. Can you check this again? I see nothing that could lead to this kind of lag. And on my machine it works well |
|
It works well for me. Hmm, it seems I need to reset npm run |
|
We have conflicts |
|
Conflicts resolved |
|
🚧 @youssef-lr 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/youssef-lr in version: 9.3.32-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.32-3 🚀
|

Explanation of Change
The
MergeExpensesSkeletoncomponent accepts areasonAttributesprop for telemetry/tracing purposes, but the call site inMergeTransactionsListContent.tsxwas not passing it. This change adds the missingreasonAttributesobject usinguseMemo, providing context about which component is rendering the skeleton and whether the eligible transactions data has loaded. This ensures skeleton span tracing is correctly attributed when the merge expenses list is in a loading state.Fixed Issues
$ #83405
PROPOSAL:
Tests
Offline tests
N/A
QA Steps
Same as tests
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari