You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reports -"Create Expense" button doesn´t appear on empty state screen when deleting expenses #61344
Version Number: 9.1.39-2 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers):ibellicotest+648@gmail.com Issue reported by: Applause - Internal Team
Action Performed:
Open the staging.new.expensify.com website
Open any workspace chat
Submit a few manual expenses. (At least two)
Navigate to "Reports"
Long tap on any expense and tap on "Select"
Select all the expenses
Tap on the dropdown menu and delete them
Note that an empty state modal appears
Note that "Create Expense" button is not displayed in it
Expected Result:
"Create Expense" button should appear automatically on empty state screen on "Reports" after deleting all the expenses
Actual Result:
When all the expenses are deleted on "Reports" section, "Create Expense" button is not automatically displayed on "You haven´t created any expense yet" modal
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Platforms Tested:
On which of our officially supported platforms was this issue tested:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidenceBug6819792_1746205558853.Empty.mp4
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Previously when user deletes a transaction - it used to trigger a search call which would return value of hasResults = false if all the transactions are deleted.
But after this PR, it does not trigger a search call and relies on snapshot when user deletes a transaction and hence the old copy of search results has value hasResults = true and hence default case is loaded here instead of case CONST.SEARCH.DATA_TYPES.EXPENSE.
What changes do you think we should make in order to solve the problem?
There are 2 possible solutions to this issue.
Trigger a search call when user deletes a transaction.
To archive that - modify following condition to compare only the length of TransactionIDs array and trigger a search call in case it does not match(it ensures both case - new ID and deletion)
Explaination: why we don't want that check?
coz we would render emptySearchView only when there are no results to show, so we don't really need an extra condition here
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Activity
melvin-bot commentedon May 2, 2025
Triggered auto assignment to @MarioExpensify (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon May 2, 2025
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 2, 2025
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
samranahm commentedon May 2, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Create Expense" button doesn't appear on empty state screen when deleting expenses
What is the root cause of that problem?
This happen because currently we did not display button on default case here
App/src/pages/Search/EmptySearchView.tsx
Lines 211 to 217 in b1b95a3
What changes do you think we should make in order to solve the problem?
We should add
App/src/pages/Search/EmptySearchView.tsx
Lines 136 to 163 in b1b95a3
these buttons on default case too
here
App/src/pages/Search/EmptySearchView.tsx
Line 210 in b1b95a3
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
ChavdaSachin commentedon May 2, 2025
Is it open of external?
MarioExpensify commentedon May 2, 2025
@ChavdaSachin not yet, trying to find that PR caused the regression.
MarioExpensify commentedon May 2, 2025
Reverting this PR solved the issue. A revert PR is already on its way here.
CC: @martasudol @c3024 @MariaHCD @mountiny
ChavdaSachin commentedon May 2, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Reports -"Create Expense" button doesn´t appear on empty state screen when deleting expenses
What is the root cause of that problem?
following PR optimizes the search call which caused the regression
https://github.com/Expensify/App/pull/60896/files
Previously when user deletes a transaction - it used to trigger a search call which would return value of
hasResults = falseif all the transactions are deleted.But after this PR, it does not trigger a search call and relies on snapshot when user deletes a transaction and hence the old copy of search results has value
hasResults = trueand hence default case is loaded here instead of case CONST.SEARCH.DATA_TYPES.EXPENSE.App/src/pages/Search/EmptySearchView.tsx
Line 131 in 7f68056
What changes do you think we should make in order to solve the problem?
There are 2 possible solutions to this issue.
To archive that - modify following condition to compare only the length of TransactionIDs array and trigger a search call in case it does not match(it ensures both case - new ID and deletion)
App/src/hooks/useSearchPusherUpdates.ts
Lines 63 to 65 in 1a4da39
!hasResultscheck form following places.App/src/pages/Search/EmptySearchView.tsx
Line 131 in 11989de
App/src/pages/Search/EmptySearchView.tsx
Line 171 in 11989de
Explaination: why we don't want that check?
coz we would render
emptySearchViewonly when there are no results to show, so we don't really need an extra condition hereWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
ChavdaSachin commentedon May 2, 2025
@MarioExpensify could you maybe take a look at my solution 2 in this proposal
I could explain it further if you want.
I could raise a quick PR and we might not need this revert.
MarioExpensify commentedon May 2, 2025
@ChavdaSachin as this was a regression from another PR we'll leave it to be fixed by the original author. Thank you for your proposal.
MarioExpensify commentedon May 2, 2025
Fixed in staging after revert CP'ed.
5 remaining items
MarioExpensify commentedon May 7, 2025
@martasudol any news on this one?
c3024 commentedon May 7, 2025
The PR that caused this was reverted. This issue can be closed.
c3024 commentedon May 7, 2025
This new PR works well with this issue too.
MarioExpensify commentedon May 7, 2025
Awesome @lanitochka17 can you retest so we close this one?
melvin-bot commentedon May 13, 2025
@MarioExpensify Eep! 4 days overdue now. Issues have feelings too...
MarioExpensify commentedon May 13, 2025
Requested re-test here.
m-natarajan commentedon May 13, 2025
Issue not reproducible
screen-20250513-164455.mp4
MarioExpensify commentedon May 13, 2025
Thank you @m-natarajan, closing this issue!