Refactor initSplitExpenseItemData to remove ONYXKEYS.COLLECTION.REPORT usages - #81400
Conversation
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.
|
|
@ikevin127 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] |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-02-06.at.13.28.25.mov |
ikevin127
left a comment
There was a problem hiding this comment.
🔥 Edge Case / Destructive Tests
✅ Null Transaction Report: Open a split expense where the underlying transaction's report has been deleted → Verify graceful handling (statusNum should default to 0)
✅ Rapid Tab Switching: Quickly switch between Amount/Percentage/Date tabs while splits are being modified → Verify no race conditions or data corruption
✅ Multiple Split Sessions: Open split for expense A → Navigate away without saving → Open split for expense B → Return to expense A → Verify each maintains independent state
✅ Large Split Count: Create a split with maximum allowed entries (up to CONST.IOU.SPLITS_LIMIT) → Verify performance and all splits maintain correct report associations
✅ Stale Report Data: Have a split expense open → In another session, modify the underlying report's status → Return to split → Verify statusNum reflects current or handles stale data gracefully
✅ Delete During Split: Start splitting an expense → In another browser tab, delete the expense → Return to split flow → Verify appropriate error handling
🟢 The PR correctly implements the refactoring to remove direct Onyx state access from action functions. The changes are well-tested, consistent across all call sites, and improve code quality by making data dependencies explicit.
|
🚧 @danieldoglas has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/danieldoglas in version: 9.3.16-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.16-9 🚀
|
Explanation of Change
Fixed Issues
$ #66517
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
04.02.2026_18.47.31_REC.mp4