fix: missing pending indicator for bulk-edited expenses#86954
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.
|
|
@Krishna2323 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] |
|
I’ll review this tomorrow morning (within 12 hours). |
Reviewing...🤦🏻 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid_hybrid.mp4Android: mWeb Chromeandroid_chrome.mp4iOS: HybridAppios_hybrid.mp4iOS: mWeb Safariios_safari.mp4MacOS: Chrome / Safariweb_chrome_test_1.mp4web_chrome_test_2.mp4 |
Krishna2323
left a comment
There was a problem hiding this comment.
LGTM! 🙇🏻
We have some conflicts to resolve.
…to fix/bulk-edit-pending
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Conflicts resolved |
|
@LukasMod please merge main. I’ve pinged @marcaaron on Slack to get this merged. |
…to fix/bulk-edit-pending
|
@Krishna2323 done ✅ |
|
🚧 @Valforte 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/Valforte in version: 9.3.59-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This is a bug fix that adds missing pending indicators (faded/greyed-out appearance) for bulk-edited expenses while offline requests are in-flight. The changes are internal to |
@LukasMod the fix seems to be working but the After And in #86841, it needs to be tested in offline mode, not with @IuliiaHerets could you please update the test steps in the original issues: #86841 and #86842? |
|
@Krishna2323 Agree. Maybe we could replace Test 8 with tests I listed in this PR? WDYT?
|
Agree 👍 let’s replace Test 8 with those |
|
@IuliiaHerets Could you check again please? Test 8 is updated. @Krishna2323 checked that fix is working for him so maybe there is no issue with this PR? I'm not sure what exactly is not working on attached video |
|
@LukasMod, according to the comment, Test 8a passes. However, in Test 8b, values changed during a poor connection are not displayed with a faded appearance ScreenRecording_04-14-2026.10-50-17_1.mp4 |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.3.59-4 🚀
|
|
@IuliiaHerets I rechecked and it seems like its by design. The "Simulate poor internet connection" toggle randomly flips This means Test 8b produces two different outcomes depending on timing:
The test doesn't verify any unique behavior, it's just the offline test with a coin flip. If fading shows, it's because the app happened to be offline. If it doesn't, it's because the app happened to be online. I think we could remove test 8b from that list |
Explanation of Change
src/libs/actions/IOU/index.ts —
updateMultipleMoneyRequests():pendingFieldsalongsideupdatedTransactionso the snapshot has pending statesnapshotSuccessDataarray that clearspendingFieldsviaclearedPendingFieldswhen the API succeedspendingFieldsviaclearedPendingFieldswhen reverting on failure (prevents stale pending state due to Onyx merge semantics)snapshotSuccessDatain thesuccessDataarray passed toAPI.write()src/libs/SearchUIUtils.ts:
getTransactionsSections(): Derive pendingAction from pendingFields for transaction items in the individual Expenses search viewgetReportSections(): Same derivation for transactions inside the expense report grouped viewreportItem?.pendingAction ?? reportItem?.pendingFields?.preview)Fixed Issues
$ #86842
$ #86841
PROPOSAL:
Tests
Test 1: Offline pending indicator
Test 2: Failure revert
Test 3: Slow network
Offline tests
QA Steps
Same as tests
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
Screen.Recording.2026-04-02.at.14.52.11.mov
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari