You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-06-22] [Due for payment 2026-06-19] Distance - Selection mode exits after entering search term that does not return result #93360
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):jsodinjosdjsoinjsiojs@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Enable Distance rates.
Have at least 12 distance rates.
Launch Expensify app.
Go to workspace settings > Distance rates.
Long tap on any rate > Select.
Tap on the search field.
Type anything that will not return result.
Expected Result:
Selection mode will persist.
Actual Result:
Selection mode exits after entering search term that does not return result.
👋 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:
Identify the pull request that introduced this issue and revert it.
The new distance-rates table (added in #90920) feeds the search-filtered data into the selection middleware. When a search returns zero results, the middleware thinks every row has disappeared and force-exits mobile selection mode.
In Table.tsx:187, useSelection is given sortedData, which is the output of the filter → search → sort pipeline (Table.tsx:170-187):
Inside the selection middleware, selectableKeys is derived from that already-searched data (selection.ts:52), and this effect turns off selection mode the moment it's empty (selection.ts:64-71):
// When there are no more items to be selected, turn off selection mode on mobileuseEffect(()=>{if(selectableKeys.length||!isSelectionModeEnabled){return;}turnOffMobileSelectionMode();},[selectableKeys.length,isSelectionModeEnabled]);
This effect was intended for the "delete the last rate → exit selection mode cleanly" case (Test 4 of #90920). But because selectableKeys reflects the searched/filtered list rather than the underlying data, typing a search term with no matches makes selectableKeys.length === 0 and incorrectly exits selection mode.
What changes do you think we should make in order to solve the problem?
Base the "no more selectable items → exit selection mode" decision on the original, unfiltered data, not the search/filter result.
Pass the original data's selectable count (or the original data) from Table.tsx into useSelection, separate from the sortedData used for rendering selection state.
In the selection.ts:64-71 effect, only call turnOffMobileSelectionMode() when the original selectable count is 0 (i.e. all rates were actually deleted), so an active search/filter that yields no rows no longer collapses selection mode.
This preserves the intended "delete the last rate" behavior while fixing the regression.
What alternative solutions did you explore? (Optional)
Alternatively, gate the effect on whether a search string / filter is active (the parent already computes hasSearchString and hasActiveFilters at Table.tsx:230-231) — skip the turn-off whenever the empty list is the result of an active search/filter rather than an empty dataset. Using the original data count is cleaner because it has a single source of truth.
Confidence & symptoms covered
Confidence: High — the data flow is fully traced from the search input to turnOffMobileSelectionMode(), and it explains the exact reported symptom (selection mode exits only when the typed term returns no results; a term that returns results keeps selection mode because selectableKeys.length > 0). The regression matches the PR (#90920) the deploy-blocker bot assigned. All changes are in the App repo, so this is fixable here.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93360) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Distance - Selection mode exits after entering search term that does not return result[/-][+][Due for payment 2026-06-19] Distance - Selection mode exits after entering search term that does not return result[/+]on Jun 12, 2026
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:
@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]
changed the title [-][Due for payment 2026-06-19] Distance - Selection mode exits after entering search term that does not return result[/-][+][Due for payment 2026-06-22] [Due for payment 2026-06-19] Distance - Selection mode exits after entering search term that does not return result[/+]on Jun 15, 2026
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:
@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]
Activity
applause-bot commentedon Jun 12, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/6c54820e0d3c1b62342594a2c7cae3120b0761cf2c482900968d10b411ee5d75
melvin-bot commentedon Jun 12, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #90920
melvin-bot commentedon Jun 12, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 12, 2026
👋 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:
MelvinBot commentedon Jun 12, 2026
Proposal
What is the root cause of that problem?
The new distance-rates table (added in #90920) feeds the search-filtered data into the selection middleware. When a search returns zero results, the middleware thinks every row has disappeared and force-exits mobile selection mode.
In
Table.tsx:187,useSelectionis givensortedData, which is the output of the filter → search → sort pipeline (Table.tsx:170-187):Inside the selection middleware,
selectableKeysis derived from that already-searched data (selection.ts:52), and this effect turns off selection mode the moment it's empty (selection.ts:64-71):This effect was intended for the "delete the last rate → exit selection mode cleanly" case (Test 4 of #90920). But because
selectableKeysreflects the searched/filtered list rather than the underlying data, typing a search term with no matches makesselectableKeys.length === 0and incorrectly exits selection mode.What changes do you think we should make in order to solve the problem?
Base the "no more selectable items → exit selection mode" decision on the original, unfiltered data, not the search/filter result.
data) fromTable.tsxintouseSelection, separate from thesortedDataused for rendering selection state.selection.ts:64-71effect, only callturnOffMobileSelectionMode()when the original selectable count is0(i.e. all rates were actually deleted), so an active search/filter that yields no rows no longer collapses selection mode.This preserves the intended "delete the last rate" behavior while fixing the regression.
What alternative solutions did you explore? (Optional)
Alternatively, gate the effect on whether a search string / filter is active (the parent already computes
hasSearchStringandhasActiveFiltersatTable.tsx:230-231) — skip the turn-off whenever the empty list is the result of an active search/filter rather than an empty dataset. Using the original data count is cleaner because it has a single source of truth.Confidence & symptoms covered
Confidence: High — the data flow is fully traced from the search input to
turnOffMobileSelectionMode(), and it explains the exact reported symptom (selection mode exits only when the typed term returns no results; a term that returns results keeps selection mode becauseselectableKeys.length > 0). The regression matches the PR (#90920) the deploy-blocker bot assigned. All changes are in the App repo, so this is fixable here.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93360)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
Krishna2323 commentedon Jun 12, 2026
PR is up: #93378
cc: @JS00001 @thelullabyy
melvin-bot commentedon Jun 12, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
JS00001 commentedon Jun 12, 2026
Tested, this is fixed
JS00001 commentedon Jun 12, 2026
Tested on staging, this is fixed
[-]Distance - Selection mode exits after entering search term that does not return result[/-][+][Due for payment 2026-06-19] Distance - Selection mode exits after entering search term that does not return result[/+]melvin-bot commentedon Jun 12, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 12, 2026
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:
melvin-bot commentedon Jun 12, 2026
@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]
[-][Due for payment 2026-06-19] Distance - Selection mode exits after entering search term that does not return result[/-][+][Due for payment 2026-06-22] [Due for payment 2026-06-19] Distance - Selection mode exits after entering search term that does not return result[/+]melvin-bot commentedon Jun 15, 2026
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:
melvin-bot commentedon Jun 15, 2026
@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]