Refactor getDeleteTrackExpenseInformation to remove usages of ONYXKEYS.COLLECTION.REPORT#81404
Refactor getDeleteTrackExpenseInformation to remove usages of ONYXKEYS.COLLECTION.REPORT#81404parasharrajat wants to merge 6 commits intoExpensify:mainfrom
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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff447d8257
ℹ️ 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".
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-02-06.at.14.04.00.mov |
ikevin127
left a comment
There was a problem hiding this comment.
🔥 Edge Case / Destructive Tests
| Test | Steps | Expected Result |
|---|---|---|
| ✅ Rapid successive deletes | Create 5 tracked expenses → Quickly delete all 5 in succession | All expenses deleted without race conditions |
| ✅ Delete during slow network | Throttle network to 3G → Delete expense → Watch UI | Shows optimistic deletion, handles timeout gracefully |
| ✅ Delete archived report expense | Navigate to archived report → Try to delete expense | Should fail gracefully or be prevented |
| ✅ Delete expense with thread comments | Add comments to expense thread → Delete expense | Thread comments should also be deleted |
| ✅ Concurrent delete from two devices | Open same expense on two devices → Delete from both simultaneously | One succeeds, other shows error or refreshes |
| ✅ Delete with undefined childReportID | Find/create scenario where childReportID is undefined → Delete expense | Should handle gracefully without crash |
🟢 Code Quality
Strengths
- Follows Onyx best practices: The refactor correctly removes direct allReports access from the action function, making state access parameterized.
- Consistent pattern application: All call sites (MoneyRequestHeader, ReportDetailsPage, PopoverReportActionContextMenu, Split.ts, and getConvertTrackedExpenseInformation) are updated consistently.
|
I'll wait until the 🟡 NABs are covered or answered. Please tag me when it's ready to final review/merge. |
|
Done @danieldoglas |
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
05.02.2026_01.34.39_REC.mp4