Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.3.4.0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-3005/folder/13176922/49980929/1130572023
Email or phone of affected tester (no customers): ibellicotest+2250@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Motorola MotoG60 / Android 12 / Chrome ( mWeb / Hybrid app) - Windows 11 / Chrome
App Component: Search
Action Performed:
- Open the Expensify app.
- Navigate to "Reports" > "Expenses"
- Note that no count is displayed on "Filters"
- Open the "Filters" tab.
- Open a filter that is not displayed in the main filters bar (For example: Has)
- Tap on "Category" and tap on "Save"
- When redirected to the general filters tab, tap on the arrow on the top left corner, without saving the search or without tapping on "View Results" before.
- Note that filter is not applied, as it wasn´t saved, but filters count is displayed with a (1).
- Reopen filters tab.
- Reopen "Has"
- Tap on "Reset" > "Save"
- Tap on the arrow on the top left corner.
- Note that filters counter is still displayed with a (1)
- Reopen filters tab one more time.
- Note that "Has" field is displayed empty, as filter is not applied.
- Note that "Reset Filters" option is not displayed, as no filter is applied.
Expected Result:
Filters counter shouldn´t be displayed when no filter was applied.
Actual Result:
Filters counter is displayed despite no filter being applied and saved.
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
Screenshots/Videos
1.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022013888257651135313
- Upwork Job ID: 2013888257651135313
- Last Price Increase: 2026-01-28
- Automatic offers:
- abzokhattab | Contributor | 110321632
Issue Owner
Current Issue Owner: @JmillsExpensifyMetadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
melvin-bot commentedon Jan 19, 2026
Triggered auto assignment to @JmillsExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.daledah commentedon Jan 19, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
The filters counter incorrectly shows "(1)" despite no filter being applied to the search results. Additionally, the "Reset Filters" option is not displayed because no filter is actually applied.
What is the root cause of that problem?
The issue is in
SearchFiltersBar.tsx. ThehiddenSelectedFilterscount is calculated usingsearchAdvancedFiltersFormwhich is the raw form state from Onyx, instead of the applied filters fromqueryJSON.App/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx
Lines 710 to 748 in e94f05d
The
searchAdvancedFiltersFormis updated as soon as the user saves a sub-filter, even before they tap "View Results" to apply the filters. This causes the counter to show filters that haven't been applied yet.However,
filterFormValues(obtained fromuseFilterFormValues(queryJSON)at line 102) correctly represents the filters that are actually applied to the search, as it's derived from the URL query:App/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx
Line 102 in e94f05d
What changes do you think we should make in order to solve the problem?
Change
hiddenSelectedFiltersto usefilterFormValuesinstead ofsearchAdvancedFiltersFormwhen calculating the filter count:This ensures the counter only reflects filters that have been actually applied to the search (via "View Results"), not intermediate form states.
What alternative solutions did you explore? (Optional)
Another approach would be to clear the
searchAdvancedFiltersFormwhen navigating back without saving, but this would be more complex and could affect other parts of the filter flow. UsingfilterFormValues(derived from the applied query) is a cleaner solution as it correctly represents the actual state of applied filters.etCoderDysto commentedon Jan 19, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Filters counter is displayed despite no filter being applied
What is the root cause of that problem?
When user clicks Reset button, resetChanges is called, and we set the selected items to empty array
App/src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersHasPage.tsx
Lines 59 to 66 in 75c85ae
When user clicks save button, updateAdvancedFilters will be called and
haskey will be set to empty arrayThen when we try to calculate hiddenSelectedFilters, if searchAdvancedFiltersForm["has"] exists and since we have assigned empty array to "has" key the condition will be true and "has" filter will be included in hiddenSelectedFilters, and we show 1 on filters counter
App/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx
Line 746 in 75c85ae
What changes do you think we should make in order to solve the problem?
We should set "has" key to null if selectedItems.length === 0 when we call
updateAdvancedFiltersApp/src/pages/Search/SearchAdvancedFiltersPage/SearchFiltersHasPage.tsx
Lines 59 to 66 in 75c85ae
We should make similar changes for all the filters where this issue happens
What alternative solutions did you explore? (Optional)
We can map empty array search filter values to null inside updateAdvancedFilters to handle the issue globally.
App/src/libs/actions/Search.ts
Lines 999 to 1003 in d42e185
Or
We can filter out empty array search filter values here
App/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx
Line 746 in 75c85ae
annaweber830 commentedon Jan 19, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Filters counter shouldn´t be displayed when no filter was applied.
What is the root cause of that problem?
The counter is being computed from the draft advanced filters form state (SEARCH_ADVANCED_FILTERS_FORM), which is updated as soon as a nested filter screen “saves” back to the advanced filters UI. When the user exits the advanced filters flow without applying, that draft state can remain “dirty”, so the counter reflects draft changes rather than the applied search query.
What changes do you think we should make in order to solve the problem?
Compute the Filters counter from the applied search state (the current queryJSON / URL query) instead of the draft Onyx form.
Specifically, derive “active filters” using the same query-to-form mapping used elsewhere (e.g., useFilterFormValues(queryJSON)), and count hidden filters from that applied set.
This ensures the counter only appears when filters are actually applied to the search results.
App/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx
Lines 723 to 748 in eafbcff
What alternative solutions did you explore? (Optional)
[-]Reports - Filters counter is displayed despite no filter being applied.[/-][+][$250] Reports - Filters counter is displayed despite no filter being applied.[/+]melvin-bot commentedon Jan 21, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022013888257651135313
melvin-bot commentedon Jan 21, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 (
External)34 remaining items
JmillsExpensify commentedon Feb 21, 2026
Payment summary:
JmillsExpensify commentedon Feb 21, 2026
Created the regression test. We'll circle back on this one once the regression test passes.
abzokhattab commentedon Feb 21, 2026
Thanks @JmillsExpensify i am paid with new dot can we update the summary
JmillsExpensify commentedon Feb 21, 2026
Sure thing. Done!
abzokhattab commentedon Feb 28, 2026
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: https://github.com/Expensify/App/pull/78293/changes#r2866930016
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
Do we agree 👍 or 👎
twisterdotcom commentedon Feb 28, 2026
@abzokhattab has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Zapier Logs
Run ID: 00040eee-0035-a9d4-6b36-97ac8b37bec4garrettmknight commentedon Mar 6, 2026
$250 approved for @daledah