Skip to content

Applied Has filter not cleared when resetting filter from Display modal #107501

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: v9.5.43-3
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #107141
Email or phone of affected tester (no customers): kiatest.78+ck111826@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Windows 11/Chrome, Pixel 8a/Android 16
App Component: Search

Action Performed:

Prerequisites:

  1. Control WS with Rules feature enabled
  2. Has some expenses with violations (Missing category, Potential Duplicate) and it's submitted/approved
  3. Has some expenses without violations

Steps:

  1. Navigate to staging.new.expensify.com
  2. Go to Spend >> Expenses
  3. Select Display > Group by >> Violation filter >> Apply
  4. Expand and note expenses with violations displayed
  5. Click Display again >> click Reset CTA
  6. Note applied Has filter is not cleared and expenses with violations still displayed
  7. Click the Reset pill next to Has filter
  8. Note all expenses (with and without violations) displayed

Expected Result:

On step 6 - When clicking Reset CTA from Display modal should clear the applied Has filter and all expenses (with and without violations) should be displayed

Actual Result:

On step 6 - When clicking Reset CTA in Display modal, Has filter still persists and expenses with violations are displayed. While the filter get cleared only when clicking the Reset button next to Has filter

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7319482_1795129572548.Recording__322.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7319482

Activity

  1. applause-bot commented on Nov 20, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/7dddb0f0862d0a866c3547d6b9e74fc63bb8a112d2e41846c39d97f61ce287b9

  2. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 20, 2026
  3. expensify-chore-bot commented on Nov 20, 2026

    @expensify-chore-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #107141

  4. expensify-chore-bot commented on Nov 20, 2026

    @expensify-chore-bot

    @neil-marcellini you have been assigned to this deploy blocker because you reviewed the offending PR: #107141

  5. expensify-chore-bot commented on Nov 20, 2026

    @expensify-chore-bot

    @nkdengineer you have been assigned to this deploy blocker because you authored the offending PR: #107141

  6. expensify-chore-bot commented on Nov 20, 2026

    @expensify-chore-bot

    💬 A slack conversation has been started in #expensify-open-source

  7. github-actions commented on Nov 20, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  8. MelvinBot commented on Nov 20, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The regression was introduced by “[Insights: Violations][R3] Add group-by:violation”. Selecting violation grouping automatically adds submitted/approved violation filters, but Display → Reset removes the grouping without removing those filters. This explains both the remaining Has chip and the violation-only results.

    Code and release evidence

    A stale-results or backend-only explanation does not account for the restrictive Has filter remaining in the frontend query.

    What changes do you think we should make in order to solve the problem?

    Prefer a targeted roll-forward fix: make Display Reset remove the violation restriction introduced by violation grouping, while preserving unrelated filters.

    One design decision needs explicit agreement: the current query does not distinguish automatically added violation filters from manually selected ones. Define how pre-existing violation selections and saved/default queries should behave rather than clearing Has indiscriminately.

    Regression tests should cover:

    • The reported grouping → Display Reset sequence restores all otherwise-matching expenses.
    • Unrelated Has values and other filters survive.
    • Explicit violation selections and saved/default queries behave as agreed.
    • Resetting Has still clears its paired violation grouping.

    What alternative solutions did you explore? (Optional)

    Reverting the feature PR is a safe fallback if reset semantics cannot be resolved and verified promptly. For this issue alone, a targeted fix is narrower.

    Verification limit: This conclusion is based on code and release-history evidence; browser reproduction and fix verification were not performed.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement with a link to this proposal after clarifying filter-preservation semantics.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.


    view run

  9. neil-marcellini commented on Nov 20, 2026

    @neil-marcellini
    Contributor

    (Neil's AI agent)

    Confirmed, but I don't think it should block the deploy. It's a small UX gap in a new feature. No results are wrong: the Has pill still shows the filter that's applied, and it has its own Reset. I recommend removing DeployBlockerCash and fixing this in a follow-up.

    Cause: choosing Group by → Violation adds both violation Has values. Display's Reset only resets display settings and keeps every filter, so the grouping is removed but the added has:submitted-violation,approved-violation stays. The other direction is already handled: resetting the Has filter also removes the violation grouping.

    The same thing happens when you switch Group by from Violation to another option, like Category.

    Fix: when the grouping changes away from Violation (Display's Reset, or picking another Group by), also remove submitted-violation and approved-violation from Has when both are there, since that pair is what the grouping added. Keep any other Has values. One trade-off: if someone picked both values by hand before grouping, they'd be removed too. I think that's fine. Add cases to useUpdateFilterQuery.test.ts and SearchQueryUtilsTest.ts.

    @nkdengineer could you take the follow-up?

  10. nkdengineer commented on Nov 20, 2026

    @nkdengineer
    Contributor

    I can take this

  11. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Nov 20, 2026
  12. trjExpensify commented on Nov 20, 2026

    @trjExpensify
    Contributor

    Fix: when the grouping changes away from Violation (Display's Reset, or picking another Group by), also remove submitted-violation and approved-violation from Has when both are there, since that pair is what the grouping added.

    Mhm, I dunno about this Neil. I think you should be able to see the expenses with violations grouped by From or whatever if you want.

    1. Selects "Has: submitted-violation"
    2. Chooses "Group-by:violation"
    3. Chooses "Group-by:from"
    4. "Has:submitted-violation is removed." ❌ that doesn't seem right to remove it.

    I'm not entirely convinced we need to do anything here, tbh. This doesn't seem bad?

    1. Select "Group-by: Violation"
    2. Has:submitted-violation, approved-violation are applied automatically as they are required for that group-by.
    3. Reset Display -> "Group-by: Violation" is removed because you've reset the display. Maybe you're going to pick another one, or just want the raw list of expenses with has submitted, approved violations.
    4. "Has-submitted-violation, approved-violation" stays applied. The filter reset button removes filters if they want.
  13. neil-marcellini commented on Nov 20, 2026

    @neil-marcellini
    Contributor

    Yeah good point. Let's close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions