Refactor deleteMoneyRequest to pass transactionThreadReport#90878
Conversation
|
@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] |
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/VideosScreen.Recording.2026-05-16.at.16.15.08.mov |
ikevin127
left a comment
There was a problem hiding this comment.
🟢 LGTM
This is a high-quality refactor that improves the codebase without introducing any new issues. The changes:
- ✅ Follow all Expensify coding standards
- ✅ Improve code maintainability and reusability
- ✅ Maintain excellent type safety
- ✅ Include comprehensive test coverage
- ✅ Handle edge cases properly
- ✅ Follow Onyx best practices
The refactor successfully eliminates duplicate Onyx operations while making the deleteMoneyRequest functionality more maintainable and testable. I recommend
merging this PR after addressing the minor documentation suggestion above.
- Test Coverage: 100% for modified functionality
- Risk: Low - this is a refactor that maintains existing behavior while improving code quality
- Impact: Positive - reduces duplicate code, improves maintainability, and makes functions more pure and testable
🧪 Manual Tests Verified
- ✅ Create a money report with multiple expenses, delete it, and verify:
- The transaction thread is properly deleted if empty
- Navigation returns to the correct report
- ✅ Delete a money request via the "Bulk Actions" menu and verify:
- The transaction is properly deleted
- The transaction thread is cleaned up if empty
- The UI updates correctly
- ✅ Delete a money report while in single transaction view and verify:
- Proper navigation back to the parent report
- Correct handling of the transaction thread
🔥 Edge Case/Destructive Tests
- ✅ Delete a report where the transaction thread has additional comments (should not delete thread)
- ✅ Delete money requests rapidly in sequence (race condition test)
|
cc: @tgolen |
|
Bump @tgolen for visibility |
|
PR doesn’t need product input as a refactor PR. Unassigning and unsubscribing myself. |
|
🚧 @danieldoglas 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/danieldoglas in version: 9.3.79-1 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This is a purely internal code refactoring that changes how |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.79-4 🚀
|
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
28.03.2026_17.32.38_REC.mp4