Skip to content

No decision module is shown in Search #103285

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.4-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: #101651
Email or phone of affected tester (no customers): applausetester+en@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Macbook Pro 2023 / Tahoe 26.4.1
App Component: Search

Action Performed:

  1. Login to staging.new.expensify.com
  2. Open Spend > Any suggested search (Expenses, Report, etc.)
  3. Open a saved search (Saved search should have a filter saved already)
  4. Change the filter of the saved search (The issues tends to reproduce when you switch the filter to Chat/invoice)
  5. Verify a Reset and Save button is shown
  6. Verify pressing the Reset button resets to the original saved search filters
  7. Press the Save button

Expected Result:

According to the PR, there should be a decision modal to create a new saved search or update the current one

Actual Result:

No decision module is shown. Also, after reseting, sometimes the save button shows and sometimes it does not appear at all

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7279539_1791354599965.second_video_.mp4
Bug7279539_1791335190601.No_decision_module.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7279539

Issue OwnerCurrent Issue Owner: @bernhardoj

Activity

  1. added
    DeployBlockerCash
    Bug
    on Oct 7, 2026
  2. melvin-bot commented on Oct 7, 2026

    @melvin-bot

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

  3. melvin-bot commented on Oct 7, 2026

    @melvin-bot

    @JS00001 @aimane-chnaif you have been assigned to this deploy blocker because you reviewed the offending PR: #101651

  4. melvin-bot commented on Oct 7, 2026

    @melvin-bot

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

  5. melvin-bot commented on Oct 7, 2026

    @melvin-bot

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

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

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Causing PR: Show save filters button when the current filters is no longer the default filters (Expensify/App#101651). This is a frontend bug and I'm highly confident in the cause. Production isn't affected because the feature is new.

    Root cause: The new "save edits" decision modal only opens when the page still has a saved-search searchKey. An existing code path, which the PR didn't change, replaces that key every time the search type changes. Pressing Save then skips the modal and goes straight to the Save Search page.

    Recommended fix (roll forward): In useUpdateFilterQuery.tsx:58, don't reset the key when the current key is a saved search:

    const isSavedSearch = !!searchKeyToSavedSearchID(currentSearchKey); // currentSearchKey from useSearchQueryContext()
    const shouldResetSearchKey = !isSavedSearch && !!values.type && values.type !== searchAdvancedFiltersForm.type;

    Also add a unit test that changes the type on a saved search and checks the key is kept. If a fix can't land quickly, reverting the PR is clean.

    Investigation details
    1. The modal depends on the key. SearchFiltersSaveButton.tsx:29 gets the saved search ID from currentSearchKey. Pressing Save opens the modal only if that ID exists (lines 37-44), and the modal only renders when it exists (line 68).
    2. The PR meant saved searches to keep their key. useSearchKeyParam.ts:104-107 exempts saved-search keys from validation.
    3. A type change overwrites the key first. useUpdateFilterQuery.tsx:58-60 sets a new searchKey from getSearchKeyForQuery. The edited query no longer matches the saved search, so it falls back to a key based on type alone (useSearchKeyParam.ts:84). That key is undefined for Chat, Invoice and Trip, and the general expenses/reports suggested search for Expense and Expense report.

    Why Save sometimes shows after Reset:

    • After switching to Chat or Invoice: there's no default query, so isSearchQuerySavable returns true and Save stays visible.
    • After switching to Expense or Expense report: Reset goes back to the suggested search's defaults, not the saved search's filters, so Save disappears.
    • Changing filters other than type: the key survives, so the modal appears correctly.

    Optional repro: On a saved search, switch the type to Chat and press Save. It opens the Save Search page, and the searchKey URL parameter is gone.

    I'm not proposing a code review rule. One code path silently overwrites route state that another path relies on, and a reviewer can't check for that mechanically.


    view run

  8. JS00001 commented on Oct 7, 2026

    @JS00001
    Contributor

    This is minor so going to demote, @bernhardoj lets look into this one

  9. added
    Daily
    and removed
    DeployBlockerCash
    Hourly
    on Oct 7, 2026
  10. bernhardoj commented on Oct 7, 2026

    @bernhardoj
    Contributor

    This isn't a bug. The decision modal only shows if we are on a saved search. When the QA changes the type, the search key is reset and since it choose Invoice, the search key is undefined (there is nothing to highlight on the LHN). It's not a saved search anymore.

  11. JS00001 commented on Oct 7, 2026

    @JS00001
    Contributor

    @bernhardoj I think we want every search to be fully self-contained though, meaning changing anything still leaves you on that view, until you click another one

  12. bernhardoj commented on Oct 7, 2026

    @bernhardoj
    Contributor

    I think it's intentional when changing the type. For example, when we are on the expenses suggested search, it doesn't make sense for it to stay on the expenses view. Or if we are on Card accruals and change the type to Chat. Each type also has a different set of applicable filters.

  13. JS00001 commented on Oct 7, 2026

    @JS00001
    Contributor

    @trjExpensify any thoughts on this one?

  14. trjExpensify commented on Oct 7, 2026

    @trjExpensify
    Contributor

    I agree with that re: Type. 👍

  15. JS00001 commented on Oct 8, 2026

    @JS00001
    Contributor

    Cool, lets close this then, thanks

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

Metadata

Metadata

Labels

BugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions