Refactor delete money request for transaction Onyx Key - #98126
Conversation
…n thread data builder
…ad of getAllReports
…ve getAllReports from getCleanUp callers
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@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] |
|
That test failure happens on main too. |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-09-03.at.16.07.08.mov |
|
@ikevin127 Its ready for you. |
|
Thanks, doing a second review-pass now 🔄 |
| policyTags: undefined, | ||
| policyCategories: undefined, | ||
| allTransactionViolations: createAllTransactionViolations(targetTransaction.transactionID, sourceTransaction.transactionID, mockViolations, mockViolations), | ||
| sourceIOUActionThreadReport: undefined, |
There was a problem hiding this comment.
🟡 tests/actions/MergeTransactionTest.ts - the self-DM fix from comment 1 has zero test coverage
All nine call sites still pass sourceIOUActionThreadReport: undefined.
That is fine for the eight expense-report cases, but it means the one behaviour this PR actually fixed, the unreported / tracked-expense merge path, is verified by nothing. If someone reverts the ?? selfDMSourceIOUAction?.childReportID fallback tomorrow, every test still passes.
DuplicateTest.ts now has the right pattern to copy, so this is mechanical: one case where sourceTransaction.reportID === CONST.REPORT.UNREPORTED_REPORT_ID, a selfDMReport and selfDMReportActions containing the IOU action with a childReportID, a real sourceIOUActionThreadReport, then assert the successData contains REPORT_${threadID}: null and the failureData restores the passed thread report.
If you fold in the fix above, the same fixture also covers the report-actions rollback.
Revised test coverageRoughly 35 to 40%, up from 10 to 15% at the first pass. Breaking down the six new data surfaces:
Fixture realism across the six updated |
Approval stateNot approving yet, but close. One round away. What I want before approval:
If that is the only thing that changes, I will approve. The rest are nice-to-haves I will not block on:
Everything else from pass 1 is either fixed or correctly rebutted. Code quality on the fixes is good, the new precedence test is a real test rather than a box-tick, and CI is fully green. |
|
Updated. |
ikevin127
left a comment
There was a problem hiding this comment.
🟢 LGTM - Thanks for addressing all comments
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/danieldoglas in version: 9.4.78-0 🚀
|
|
No help site changes are required for this PR, so I did not create a docs PR. This is an internal Onyx refactor, not a behavior or copy change. Every change swaps a global
The only user-visible effect is that the discarded expense's transaction thread is reliably deleted after a merge. The existing articles already describe that outcome, so nothing needs editing:
No strings in @parasharrajat, please confirm this matches the behavior you shipped. If you think a docs update is warranted anyway, reply with what changed for the user and I'll create the draft PR. view run · no recording available |
|
Deploy Blocker #101157 was identified to be related to this PR. |
|
@parasharrajat @ikevin127 Could you please confirm the expected result for step 2 Grabacion.de.pantalla.2026-09-14.a.la.s.22.online-video-cutter.com.mp4 |
|
@danieldoglas could you help with the above please? |
|
@jponikarchuk I've updated the tests steps. Please try again. |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.4.78-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Fixed Issues
$ #66517
PROPOSAL:
Tests
Merge two transactions
Steps:
Review & merge duplicates
Steps:
Keep selectedOffline 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
02.09.2026_20.09.13_REC.mp4