Skip to content

[Due for payment 2026-06-22] [Due for payment 2026-06-19] Rates - Search input disappears after deleting expense, but search results remain displayed #93391

Closed

Description

@applause-bot

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.4.6-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #90920
Email or phone of affected tester (no customers): ibellicotest+2766@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome
App Component: Workspace Settings

Action Performed:

Prerequisite: Account has a workspace with "Distance Rates" enabled.
Prerequisite 2: Have 12 rates created to make search input available.

  1. Open the staging.new.expensify.com website.
  2. Navigate to "Workspaces" > Workspace > "Distance Rates"
  3. Type anything on search input that will trigger more than one rate as result.
  4. Select any rate from results and delete it.
  5. Note that search input disappears, but search results are not cleared.
  6. Navigate to a different section and return to "Distance Rates"
  7. Note that the rest of the rates reappear.

Expected Result:

When search input disappears after deleting a rate from results, the rest of the rates should reappear.

Actual Result:

When search input disappears after deleting a rate, search results remain displayed and user has to navigate to a different section and return to make the rest of the rates reappear.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7178526_1781235800324.Rates_List_7.mp4

View all open jobs on GitHub

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

Issue OwnerCurrent Issue Owner: @Krishna2323

Activity

  1. added
    DeployBlockerCash
    on Jun 12, 2026
  2. added
    Bug
    on Jun 12, 2026
  3. applause-bot commented on Jun 12, 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/d72ff3979550c865a06c48ada36ff90114fa124cb5146806c7787fe061716c26

  4. melvin-bot commented on Jun 12, 2026

    @melvin-bot

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

  5. melvin-bot commented on Jun 12, 2026

    @melvin-bot

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

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

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The Table search bar is conditionally rendered, but the search state lives in the always-mounted parent Table, so hiding the input does not clear the active search.

    In WorkspaceDistanceRatesTable/index.tsx:122 the search bar only renders when there are at least STANDARD_LIST_ITEM_LIMIT (12) rates:

    • You have 12 rates → search bar shows. You type a query → only matching rates remain.
    • You delete one of the matching rates → total drops to 11 → shouldShowSearchBar becomes false → <Table.SearchBar> unmounts.
    • But activeSearchString is held in useSearching inside the parent Table (searching.ts:55), and searchMiddleware keeps filtering by that stale string (Table.tsx:172-173).

    The result: the input is gone but the data stays filtered, and there is no UI left to clear it. Navigating away unmounts the whole Table, resetting state, which is why the rates reappear on return.

    TableSearchBar has no unmount cleanup to reset the search string.

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

    Reset the search string when the search bar unmounts. Add an unmount-cleanup effect to TableSearchBar.tsx that calls updateSearchString(''). This guarantees that when the input disappears, the invisible filter goes with it.

    This fix in the shared component also covers the same latent bug in the other tables that gate the search bar on count: DomainListTable, WorkspaceListTable, and WorkspaceCategoriesTable.

    Why the shared-component fix is preferred over a page-level one

    An alternative is to clear the search in WorkspaceDistanceRatesTable whenever ratesData.length drops below the threshold. That works but only patches Distance Rates and leaves the identical bug in the three sibling tables. Clearing on TableSearchBar unmount is the correct general behavior: if there is no visible input to edit or clear the search, the filter should not silently persist.

    This was introduced by #90920, which replaced the mileage rate list with the new Table UI.


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

  8. JS00001 commented on Jun 12, 2026

    @JS00001
    Contributor

    Tested on staging, this is fixed

  9. removed
    DeployBlockerCash
    Hourly
    on Jun 12, 2026
  10. changed the title [-]Rates - Search input disappears after deleting expense, but search results remain displayed[/-] [+][Due for payment 2026-06-19] Rates - Search input disappears after deleting expense, but search results remain displayed[/+] on Jun 12, 2026
  11. melvin-bot commented on Jun 12, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.6-4 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-06-19. 🎊

    For reference, here are some details about the assignees on this issue:

    • @Krishna2323 requires payment through NewDot Manual Requests
  12. melvin-bot commented on Jun 12, 2026

    @melvin-bot

    @Krishna2323 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]

  13. changed the title [-][Due for payment 2026-06-19] Rates - Search input disappears after deleting expense, but search results remain displayed[/-] [+][Due for payment 2026-06-22] [Due for payment 2026-06-19] Rates - Search input disappears after deleting expense, but search results remain displayed[/+] on Jun 15, 2026
  14. melvin-bot commented on Jun 15, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.7-4 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-06-22. 🎊

    For reference, here are some details about the assignees on this issue:

    • @Krishna2323 requires payment through NewDot Manual Requests
  15. melvin-bot commented on Jun 15, 2026

    @melvin-bot

    @Krishna2323 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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

BugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions