[deploy blocker fix] Expense - Selection mode persists after undeleting all expenses offline#86877
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
…ode-persists-after-undeleting-fix
|
Linking the question regarding the offline behavior for deletion! comment link |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b67b62c7c0
ℹ️ 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".
|
I can't review it right away, if it's urgent, please reassign. Thank you. |
|
Original PR was reverted so this can't be merged directly to main. I will merge it to my PR with another version |
|
It will be merged to this PR: #86938. Thank you for your help guys! ❤️ |
Explanation of Change
Hotfix for a deploy blocker where selection mode persists after undeleting all expenses offline. We now perform a count-based check before calling clearSelectedTransactions.
Simply calling
clearSelectedTransactions()withshouldTurnOffSelectionMode === truewould always disable selection mode even in cases where some expenses remain in the search results after deletion, which would be inconsistent with behavior in other parts of the application.As a follow-up, I’d recommend considering Melvin’s proposal to properly update the search snapshot after undelete (see PR comment: link)
Fixed Issues
$#86790
PROPOSAL:
Tests
Selection mode will exit because there is no more expense.
Offline tests
N/A
QA Steps
Same as Tests.
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
MacOS: Chrome / Safari
Screen.Recording.2026-04-01.at.15.24.30.mov