Skip to content

[Due for payment 2026-10-30] Reset button is not shown when different selector is selected from footer on saved search #104030

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: 9.5.9-0
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: #100674
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Search

Action Performed:

Precondition:

  • Enable spendFooterSelectors beta.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an expense.
  4. Go to Spend > Expenses..
  5. Click total spend on the footer.
  6. Click Total.
  7. Select Reimbursable > Apply.
  8. Click Save button next to search field.
  9. Enter name > Save view.
  10. Go to the saved search from Step 8.
  11. Click total spend on the footer.
  12. Click Total.
  13. Select Billable > Apply.

Expected Result:

Reset button will be shown next to search field when different selector is selected from the footer on saved search (similar to when different filter is applied on saved search).

Actual Result:

Reset button is not shown when different selector is selected from the footer on saved search.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7286573_1792002115315.9.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7286573

Issue OwnerCurrent Issue Owner: @mkhutornyi

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 14, 2026
  2. applause-bot commented on Oct 14, 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/231c8ca6fe04a74674bc1105785d037c94d20a553555a7ad3ebb2c3678354cb5

  3. melvin-bot commented on Oct 14, 2026

    @melvin-bot

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

  4. melvin-bot commented on Oct 14, 2026

    @melvin-bot

    @JS00001 @mkhutornyi you have been assigned to this deploy blocker because you reviewed the offending PR: #100674

  5. melvin-bot commented on Oct 14, 2026

    @melvin-bot

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

  6. github-actions commented on Oct 14, 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.
  7. melvin-bot commented on Oct 14, 2026

    @melvin-bot

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

  8. JS00001 commented on Oct 14, 2026

    @JS00001
    Contributor

    this is behind a beta, lets fix this

  9. 1 remaining item

  10. MelvinBot commented on Oct 14, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Investigation

    Causing PR: feat: Add count and spend total selectors to the Spend footer (high confidence). It is on the current staging checklist.

    Root cause: The PR added footerCount, footerTotal, and footerCurrency to NON_FILTER_CHIP_KEYS in SearchQueryUtils.ts:1217-1223. The Reset check in useSearchFiltersBar.tsx:246 ignores those keys, so footerTotal:reimbursable and footerTotal:billable look identical. Saving does include the footer keys, so a saved view stores the selection but changing it never shows Reset.

    Recommendation: fix forward, don't revert. The feature is behind the spendFooterSelectors beta. No fix PR exists yet.

    Recommended fix: For saved searches only, stop ignoring the footer keys in both hasFiltersChangedFromDefault and buildQueryStringWithResetFilters. Reset then shows, and pressing it restores the saved footer selection. Suggested searches keep the PR's intended behavior.

    Investigation details
    • canReset calls hasFiltersChangedFromDefault(current, default) with the default ignore set, NON_FILTER_CHIP_KEYS (SearchQueryUtils.ts:1237-1239). For a saved search, the default query is the saved query.
    • buildQueryStringWithResetFilters (SearchQueryUtils.ts:1226-1235) keeps the current footer keys. Even if Reset appeared, it would leave footerTotal:billable in place.
    • isSearchQuerySavable only ignores groupCurrency (NON_SAVABLE_FILTER_KEYS, L1224). That is why Save and Reset disagree.
    • The PR's tests lock in "Reset stays hidden" for footer changes (SearchQueryUtilsTest.ts:4660-4697). The design missed saved searches, where the footer selection is part of what was saved.
    • The advanced filters page has the same issue (SearchAdvancedFiltersProvider.tsx:62, L74-L76).

    Suggested change:

    1. Add a SAVED_SEARCH_NON_FILTER_CHIP_KEYS set with only keyword and groupCurrency.
    2. Add an ignoredFilterKeys parameter to buildQueryStringWithResetFilters, matching hasFiltersChangedFromDefault.
    3. In useSearchFiltersBar.tsx, pass the saved-search set to both helpers when isSavedSearch is true. Do the same in SearchAdvancedFiltersProvider.tsx.
    4. Add a test: saved query has footerTotal:reimbursable, current query has footerTotal:billable. Reset is visible, and pressing it restores footerTotal:reimbursable.

    A simpler option is to remove the footer keys from NON_FILTER_CHIP_KEYS entirely. That also shows Reset for footer-only changes on suggested searches, which goes against the PR's design. It needs product sign-off.

    Other candidates: No other PR in this release touches NON_FILTER_CHIP_KEYS or the Reset logic.

    Fix status: On Add count and spend total selectors to the Spend footer to let customers choose the data they see, the PR author was asked for one follow-up PR that removes the beta and fixes this issue along with #104010, #104014, and #104026. That PR doesn't exist yet.


    view run

  11. truph01 commented on Oct 15, 2026

    @truph01
    Contributor

    @MelvinBot Post proposal

  12. MelvinBot commented on Oct 15, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    feat: Add count and spend total selectors to the Spend footer added footerCount, footerTotal, and footerCurrency to NON_FILTER_CHIP_KEYS. The Reset logic ignores every key in that set:

    • canReset compares the current query with the saved query through hasFiltersChangedFromDefault. That function skips NON_FILTER_CHIP_KEYS, so footerTotal:reimbursable and footerTotal:billable look the same.
    • buildQueryStringWithResetFilters keeps the current footer keys. Even if Reset appeared, it would not restore the saved footer selection.

    Saving does include the footer keys, because NON_SAVABLE_FILTER_KEYS only lists groupCurrency. So a saved view stores the footer selection, but changing that selection later never counts as a change.

    Code references

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

    Treat the footer selection as part of a saved search, but keep today's behavior for suggested searches.

    1. In SearchQueryUtils.ts, add a second ignore set for saved searches that holds only keyword and groupCurrency.
    2. Add an optional ignoredFilterKeys parameter to buildQueryStringWithResetFilters, the same way hasFiltersChangedFromDefault already has one. Default it to NON_FILTER_CHIP_KEYS.
    3. In useSearchFiltersBar.tsx, when isSavedSearch is true, pass the saved-search set to both hasFiltersChangedFromDefault and buildQueryStringWithResetFilters.
    4. In SearchAdvancedFiltersProvider.tsx, do the same. Get currentSearchKey from useSearchQueryContext() and check it with searchKeyToSavedSearchID.
    5. Add unit tests for a saved query with footerTotal:reimbursable and a current query with footerTotal:billable. Reset should show, and pressing it should restore footerTotal:reimbursable. The existing suggested-search tests stay unchanged.

    What alternative solutions did you explore? (Optional)

    Remove the three footer keys from NON_FILTER_CHIP_KEYS. This is simpler, but Reset would then also show for footer-only changes on suggested searches. That goes against the design of the original PR and its tests, so it needs product sign-off.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/104030#issuecomment-6183882623) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  13. truph01 commented on Oct 15, 2026

    @truph01
    Contributor

    I think this is expected, @JS00001.

    The Reset button shouldn't appear or disappear when toggling any of the footer selectors.

  14. JS00001 commented on Oct 15, 2026

    @JS00001
    Contributor

    @trjExpensify wydt about this one?

    we store the footer currency/selections in the query string so they stick to each view/search. Should changing the footer currency (which changes the query) show 'reset' or not for the search?

  15. trjExpensify commented on Oct 15, 2026

    @trjExpensify
    Contributor

    Oh, I didn't know we're doing this? I don't really love tying in this footer stuff. I was just playing around with it and I'm stuck with this "Save", and I don't really know why.

    Image

    ... I even "Reset" all of the options in the footer popover menu and it didn't do anything. 🤔 Shouldn't that clear it?

    If we're showing "Save" in the top bar when you change something in the footer, then you will need to see "Reset" I think otherwise you get stuck like me. As the footer is largely "shown on reveal" then could we just not show save or reset in the header, and make "reset" within the footer work to clear them?

  16. JS00001 commented on Oct 15, 2026

    @JS00001
    Contributor

    If we're showing "Save" in the top bar when you change something in the footer, then you will need to see "Reset" I think otherwise you get stuck like me. As the footer is largely "shown on reveal" then could we just not show save or reset in the header, and make "reset" within the footer work to clear them?

    This feels like what I would expect

  17. trjExpensify commented on Oct 15, 2026

    @trjExpensify
    Contributor

    As the footer is largely "shown on reveal" then could we just not show save or reset in the header, and make "reset" within the footer work to clear them?

    This part, yeah. 👍

  18. trjExpensify commented on Oct 19, 2026

    @trjExpensify
    Contributor

    @truph01 are you fixing/updating this in #104058?

  19. changed the title [-]Reset button is not shown when different selector is selected from footer on saved search[/-] [+][Due for payment 2026-10-30] Reset button is not shown when different selector is selected from footer on saved search[/+] on Oct 23, 2026
  20. melvin-bot commented on Oct 23, 2026

    @melvin-bot

    @mkhutornyi / @truph01

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.18-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-10-30. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions