Fix: Deleting one split in Top Spenders removes both splits#86090
Fix: Deleting one split in Top Spenders removes both splits#86090luacmartins merged 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.
|
|
@ShridharGoel 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: 0c87e87e2f
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
JmillsExpensify
left a comment
There was a problem hiding this comment.
Those testing steps make sense to me
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-03-28.at.2.56.52.AM.movAndroid: mWeb ChromeScreen.Recording.2026-03-28.at.2.55.53.AM.moviOS: HybridAppScreen.Recording.2026-03-28.at.2.32.25.AM.moviOS: mWeb SafariScreen.Recording.2026-03-28.at.2.52.33.AM.movMacOS: Chrome / SafariScreen.Recording.2026-03-28.at.2.27.18.AM.mov |
| }); | ||
| } else if (originalMessage?.IOUTransactionID) { | ||
| deleteTransactions([originalMessage.IOUTransactionID], duplicateTransactions, duplicateTransactionViolations, currentSearchHash); | ||
| deleteTransactions([originalMessage.IOUTransactionID], duplicateTransactions, duplicateTransactionViolations, undefined); |
There was a problem hiding this comment.
Why is undefined being passed here?
| }); | ||
| } else if (iouTransactionID) { | ||
| deleteTransactions([iouTransactionID], duplicateTransactions, duplicateTransactionViolations, currentSearchHash, isSingleTransactionView); | ||
| deleteTransactions([iouTransactionID], duplicateTransactions, duplicateTransactionViolations, undefined, isSingleTransactionView); |
There was a problem hiding this comment.
undefined is intentional here. These are generic/non-search flows, and SearchContext can still retain the last search hash after leaving Search.
Passing currentSearchHash from these entry points could update stale grouped snapshots from a previous search. Search-origin flows still pass the hash where appropriate, but here we intentionally avoid that to prevent broader regressions.
|
@ShridharGoel, gentle bump. thanks. |
|
@marufsharifi conflicts |
|
@luacmartins, resolved the conflicts. thanks. |
luacmartins
left a comment
There was a problem hiding this comment.
This is a bit late, but I was wondering if we need all the Search specific logic for the delete cases. Onyx merges any live data updates into the snapshots already, so if we'red deleting a particular transaction ID, that'd be deleted from the snapshots too.
@luacmartins Thanks for the review. |
|
That makes sense. The groups are not updated because there's no live key equivalent of them. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @luacmartins 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/luacmartins in version: 9.3.52-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. Reason: This is a bug fix that corrects how grouped search results (e.g., Top Spenders) update after deleting a split expense. No new features, UI labels, settings, or workflows were introduced. I reviewed the two relevant help articles:
Both articles remain correct after this fix. |
|
Deploy Blocker ##87015 was identified to be related to this PR. |
Explanation of Change
This change fixes a Reports UX issue in the grouped view, like
Top Spenders. Previously, when a user deleted one split expense from a grouped result, both splits could disappear until the list was manually refreshed or collapsed and expanded again.With this update, grouped search results stay in sync immediately after the delete. The removed split disappears, the remaining transaction stays visible, and the report reflects the correct state without requiring any extra user action.
Fixed Issues
$ #79138
PROPOSAL: #79138 (comment)
Tests
Offline tests
Same as Tests.
QA Steps
Same as Tests.
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Screen.Recording.2026-03-23.at.5.36.05.PM.mov
Android: mWeb Chrome
Screen.Recording.2026-03-23.at.5.51.22.PM.mov
iOS: Native
Screen.Recording.2026-03-23.at.5.59.59.PM.mov
iOS: mWeb Safari
Screen.Recording.2026-03-23.at.6.12.31.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2026-03-23.at.5.24.34.PM.mov