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 - After deleting report, filter buttons are not responsive and do not open list #65410
Version Number: 9.1.74-9 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/6414951 Email or phone of affected tester (no customers):jiodnjsoijdoi@gmail.com Issue reported by: Applause - Internal Team
Action Performed:
Go to staging.expensify.com
Create a new workspace.
Go to workspace chat.
Submit two expenses to the workspace chat.
Open the expense report.
Click More > Delete.
Delete the report.
Go to Reports > Expenses.
Click Type:Expense button or other filters button like Status, Date and From.
Expected Result:
Filter buttons will be responsive and open type list.
Actual Result:
After deleting report, filter buttons are not responsive and do not open type list.
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 evidenceBug6876966_1751542326211.20250703_192721.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.
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.
Add 'action:pay/export' filter #63753: Introduced extensive changes to SearchQueryUtils, SearchUIUtils, and SearchAutocompleteList – the core modules used by the report-filter chips – so breaking them can leave the Type/Status/Date filter menus unresponsive after a report is deleted.
MED Refactor ShowContextMenuContext to pass isReportArchived instead of rNVPs #65179: Large refactor touching ShowContextMenuContext and OptionsListUtils, components utilised by dropdown / popover menus across the Reports page, making it plausible that the refactor prevents the filter popovers from opening after navigation following a delete.
If not above, check these
Use ReanimatedModal for FULLSCREEN modals #64805: Switching BaseModal to the new ReanimatedModal for FULLSCREEN/BOTTOM_DOCKED modals could leave an invisible backdrop after the Delete-report confirmation modal closes, blocking clicks on the filter buttons that follow.
After deleting the report, we go back to previous route without waiting for the current confirmation modal to be closed, leads to this logic is not properly handled
Previously, this issue doesn't happen on large screen, because we use ReactNativeModal which calls onModalHide on unmount (more info in this comment). But now we use ReanimatedModal, which doesn't have similar implementation.
What changes do you think we should make in order to solve the problem?
To prevent similar issue appear in the future, we should fix DropdownButton
#63996 was created to fix the issue where we can open 2 dropdown buttons at the same time. But it accidentally also affects behaviour if there's other modals. So we can limit the logic to only apply when DropdownButton is already rendered on screen.
Add a previous value for willAlertModalBecomeVisible in DropdownButton
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 Jul 3, 2025
Triggered auto assignment to @youssef-lr (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Jul 3, 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:
melvin-bot commentedon Jul 3, 2025
💬 A slack conversation has been started in #expensify-open-source
lanitochka17 commentedon Jul 3, 2025
Video production:
Recording.3359.mp4
Eskalifer1 commentedon Jul 3, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Reports - After deleting report, filter buttons are not responsive and do not open list
What is the root cause of that problem?
The reason is this if:
App/src/components/Search/FilterDropdowns/DropdownButton.tsx
Lines 74 to 76 in ba687b4
The value of willAlertModalBecomeVisible is true, so we get into this if
What changes do you think we should make in order to solve the problem?
When deleting, we need to set the state for MODAL to false:
`
App/src/components/MoneyReportHeader.tsx
Lines 1107 to 1124 in ba687b4
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
We can wrap the Navigation.goBack() with setNavigationActionToMicrotaskQueue if this will not break anything
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.
BlameGPT commentedon Jul 3, 2025
Possible culprit PRs for this issue
If not above, check these
daledah commentedon Jul 3, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
After deleting report, filter buttons are not responsive and do not open type list.
What is the root cause of that problem?
This comes from #64805
After deleting the report, we go back to previous route without waiting for the current confirmation modal to be closed, leads to this logic is not properly handled
App/src/components/Modal/BaseModal.tsx
Line 287 in c5d9bf0
App/src/components/Modal/BaseModal.tsx
Lines 125 to 140 in 41b1885
So
willAlertModalBecomeVisibleremainstrue, so this logic always returnsfalseApp/src/components/Search/FilterDropdowns/DropdownButton.tsx
Lines 72 to 76 in 41b1885
Previously, this issue doesn't happen on large screen, because we use
ReactNativeModalwhich callsonModalHideon unmount (more info in this comment). But now we useReanimatedModal, which doesn't have similar implementation.What changes do you think we should make in order to solve the problem?
To prevent similar issue appear in the future, we should fix
DropdownButton#63996 was created to fix the issue where we can open 2 dropdown buttons at the same time. But it accidentally also affects behaviour if there's other modals. So we can limit the logic to only apply when
DropdownButtonis already rendered on screen.Add a previous value for
willAlertModalBecomeVisibleinDropdownButtonThen update here
App/src/components/Search/FilterDropdowns/DropdownButton.tsx
Line 74 in 41b1885
This way, when navigating from other pages,
prevWillAlertModalBecomeVisiblewill beundefinedand will not satisfy the condition above.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
For
MoneyRequestView, we should close the modal before going backApp/src/components/MoneyReportHeader.tsx
Line 1113 in ba687b4
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.
daledah commentedon Jul 3, 2025
I've fixed a similar issue before so I can help raise a quick PR if needed.
youssef-lr commentedon Jul 3, 2025
@daledah #63996 is in production though. Why is this not reproducible there?
daledah commentedon Jul 3, 2025
@youssef-lr I updated the RCA and the offending PR.
youssef-lr commentedon Jul 3, 2025
@daledah I reverted that PR locally and I can still reproduce
daledah commentedon Jul 3, 2025
@youssef-lr Turns out the confirm modal is not affected by that PR, I'll spend some more time to look further on this issue 👀
Anyways the RCA is incorrect but the solution definitely works 😂
youssef-lr commentedon Jul 3, 2025
yeah, we need to figure out why
willAlertModalBecomeVisibledoesn't go back tofalseafter deleting a report/expense. https://expensify.slack.com/archives/C02NK2DQWUX/p1751560434146609?thread_ts=1751552145.326369&cid=C02NK2DQWUXyoussef-lr commentedon Jul 3, 2025
@daledah the offending PR is here https://github.com/Expensify/App/pull/64865/files#diff-c5dd0a065b12f253786ab2916473640a80014957475696db4d97bedc23f47af2L166 and this part of the code is what used to set that value back to false. If you can figure out a fix without reverting feel free to make a proposal! We should also test the linked issue of the offending PR is not reproducible too.
Eskalifer1 commentedon Jul 3, 2025
My alternative proposal works, we use the same approach in another modal window:
App/src/components/MoneyReportHeader.tsx
Lines 1085 to 1087 in 9494e08
cc: @youssef-lr
youssef-lr commentedon Jul 3, 2025
I think it's best to wait for @bernhardoj's input as well.