Fix: Reports - Previous expense disappears after creating new one offline with "Group by" applied#81607
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid-app-2026-02-09_16.51.53.mp4Android: mWeb Chromeandroid-chrome-2026-02-09_16.58.56.mp4iOS: HybridAppios-app-2026-02-09_16.21.00.mp4iOS: mWeb Safariios-safari-2026-02-09_16.33.50.mp4MacOS: Chrome / Safaridesktop-chrome-2026-02-09_16.10.34.mp4 |
|
@annaweber830 Please add screenshots for all platforms. |
This comment was marked as resolved.
This comment was marked as resolved.
|
Seems like there's been a bit of a change of behaviour since the issue was raised, the group by filter gets removed when a new expense is added (even when offline), and on mobile this seems to result in the offline screen showing. android-app-2026-02-09_16.51.53.mp4 |
|
Hi @jjcoffee How should I fix this issue? |
|
@annaweber830 I think this is probably out of scope for this issue since it's now the behaviour on production. We'll have to wait for @heyjennahay on this other issue though. |
|
@annaweber830 Can you add the other platform screenshots in the meantime? |
|
Sorry for the slow reply on this. @jjcoffee with your question in #81607 (comment) are you suggesting the heading expense count and amount should be updated to include the offline created expense? So in your screenshot it would be 2 and €7? |
@heyjennahay That's right. I guess in a way the new expense is pending to be added so maybe it doesn't make sense for it to be included in the total yet? |
|
@jjcoffee yeah I can see the argument both ways for sure but I think for the sake of getting this PR done let's go with the simplest solution which I think is not updating the header? |
|
@annaweber830 Let's add another step to account for the change in behaviour so QA don't get confused. Something like "apply the same group by filter again". |
|
@annaweber830 Please also add the remaining screenshots for Android devices. |
cristipaval
left a comment
There was a problem hiding this comment.
Could we please:
- Generalize beyond just GROUP_BY.FROM, or file a follow-up issue
- Add at least one unit test covering this optimistic data path
- Fill in the "Explanation of Change" section
|
Hi @cristipaval should I do these?:
|
|
yes please, it would be great to extend the fix for all groupBYs |
Hi @cristipaval, sorry, I don’t understand. What does this mean: “Generalize beyond just GROUP_BY.FROM, or file a follow-up issue”? |
|
Hi @jjcoffee
|
|
Okay, sounds more like a follow-up or a bigger project? cc @cristipaval |
|
@annaweber830 You have failing tests. |
heyjennahay
left a comment
There was a problem hiding this comment.
Bug fix, product review not required
got it!
Thanks @annaweber830! |
|
@annaweber830 Please fix the checks |
|
@cristipaval All yours 🙏 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @cristipaval 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/cristipaval in version: 9.3.23-2 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.23-3 🚀
|

Explanation of Change
Fix: Reports - Previous expense disappears after creating new one offline with "Group by" applied
Fixed Issues
$ #79838
PROPOSAL: #79838 (comment)
Tests
Offline tests
Same as test
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
Screen.Recording.2026-02-16.at.10.43.07.AM.mp4
Android: mWeb Chrome
Screen.Recording.2026-02-16.at.11.16.47.AM.mp4
iOS: Native
Screen.Recording.2026-02-12.at.1.35.33.PM.mp4
iOS: mWeb Safari
Screen.Recording.2026-02-12.at.1.46.30.PM.mp4
MacOS: Chrome / Safari
Screen.Recording.2026-02-05.at.2.18.22.PM.mp4