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
Reports - Keyword quick filter remains after clicking Reset while on saved search #88074
Version Number: 9.3.60-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:#86297 Email or phone of affected tester (no customers):applausetester+sjois22jd3@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Search
Action Performed:
Precondition:
Have a saved search with category filter.
Go to staging.new.expensify.com
Go to Reports > Expenses.
Open the saved search with category filter.
Click Filters.
Click Keywords.
Enter anything > click Save.
Click outside the RHP.
Click Keyword quick filter.
Click Reset.
Expected Result:
Keyword quick filter will be removed.
Actual Result:
Keyword quick filter remains after clicking Reset while on saved search.
👋 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.
Investigation Summary: Classification=Frontend bug. Causing PR=#86297 '[Wiring the UI] Revamp search page actions bar' by @bernhardoj (High confidence). Recommendation=REVERT. PR 86297 introduced a significant revamp of the search page actions bar and is the clear cause of this regression. The bug is staging-only (not reproducible in production). Assigned: @bernhardoj (PR author), @aimane-chnaif, @JS00001, @luacmartins (approving reviewers). Labels: Removing DeployBlocker (backend deploy not affected, pure frontend issue). Keeping DeployBlockerCash. Root Cause: PR 86297 introduced useSearchFiltersBar as the new hook for filter chips. When on a saved search: opening Advanced Filters > Keywords > saving writes to Onyx but NOT the URL, then closing the RHP causes useSearchFilterSync to skip re-syncing (intentional guard), leaving Onyx with a keyword that isn't in the URL. When Reset is clicked on the keyword chip, updateFilterForm updates the URL but doesn't atomically clear the Onyx form, so the chip persists.
Every filter dropdown popup (TextInputPopup, MultiSelectPopup, SingleSelectPopup, etc.) follows the same pattern in its resetChanges handler: call onChange(resetValue) then closeOverlay(). The problem is that onChange triggers updateFilterForm in useSearchFiltersBar.tsx, which calls close(navigationCallback) from libs/actions/Modal.ts. Since the popover is open, close() calls closeTop(), which invokes the popover's registered close handler -- which is toggleOverlay. Then closeOverlay()also calls toggleOverlay.
toggleOverlay is a state toggle (setIsOverlayVisible(prev => !prev)), not a "set to false". Calling it twice in the same React batch produces a no-op (true -> false -> true). The popover never closes, onModalDidClose never fires, and the deferred Navigation.setParams callback is orphaned. The URL q param stays unchanged, so the keyword filter persists.
React batches both: isOverlayVisible stays true, popover never closes, navigation never fires
This was introduced by PR #86297 because keyword was not previously shown as a quick filter chip -- it was only accessible through the Advanced Filters RHP. The PR made keyword (and other filters) appear as quick filter chips with inline popover Reset/Apply buttons, exposing this double-toggle bug.
What changes do you think we should make in order to solve the problem?
In all filter popup components, remove the closeOverlay() call from resetChanges and applyChanges. The onChange -> updateFilterForm -> Modal.close() path already handles closing the popover via closeTop(). The explicit closeOverlay() is redundant and creates the double-toggle.
Affected files (all in src/components/Search/FilterDropdowns/):
TextInputPopup.tsx (lines 21-29)
MultiSelectPopup.tsx (lines 92-100)
SingleSelectPopup.tsx (lines 110-118)
GroupByPopup.tsx (lines 75-83)
InSelectPopup.tsx (lines 162-170)
CardSelectPopup.tsx (lines 131-141)
UserSelectPopup.tsx (lines 136-145)
ReportFieldPopup.tsx (lines 209-233)
DateSelectPopup/index.tsx (lines 97-131)
AmountPopup.tsx (lines 113-121)
Alternatively, change closeOverlay from a toggle to an explicit setIsOverlayVisible(false) in DropdownButton.tsx, so calling it multiple times is idempotent. This is a smaller, safer change that fixes the same issue without removing the closeOverlay() calls.
What alternative solutions did you explore? (Optional)
The alternative to removing closeOverlay() calls is changing DropdownButton.tsx line 102-110 to provide a dedicated closeOverlay function that calls setIsOverlayVisible(false) instead of reusing toggleOverlay. This is arguably cleaner since closeOverlay semantically means "close", not "toggle", and would prevent any future code from hitting the same double-toggle issue.
Investigation details
Key evidence chain:
TextInputPopup.tsx:26-29: resetChanges calls onChange('') then closeOverlay()
useSearchFiltersBar.tsx:153-181: updateFilterForm merges filter values, builds query string, calls Modal.close(navCallback) where navCallback is Navigation.setParams({q: queryString})
Modal.ts:50-61: close() stores the navCallback as onModalClose, then calls closeTop() which invokes the popover's registered close handler
BaseModal.tsx:141: Registers onClose via setCloseModal(onClose) when the popover mounts
Popover/index.tsx:70-76: Wraps onClose as onCloseWithPopoverContext which calls toggleOverlay
DropdownButton.tsx:102-110: toggleOverlay is setIsOverlayVisible(prev => !prev) -- a toggle, not a setter
DropdownButton.tsx:144: closeOverlay passed to popup components IS toggleOverlay
Modal.ts:63-74: onModalDidClose fires the stored navCallback, but only when the modal actually finishes closing
The same double-toggle pattern exists in applyChanges across all popup components, meaning Apply buttons are also broken when the popover is registered with the Modal system. Note that UserSelectPopup.applyChanges (line 136-140) happens to call closeOverlay() BEFORE onChange(), which accidentally works correctly because the toggle fires before closeTop runs.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
The issue here is that, when selecting a filter from the advanced filters page, even though we haven't pressed View results, the filter is already saved to the onyx data. So, when pressing Reset, the search query stays the same, and so does the onyx data.
Activity
melvin-bot commentedon Apr 16, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #86297
melvin-bot commentedon Apr 16, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Apr 16, 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:
OSBotify commentedon Apr 16, 2026
Investigation Summary: Classification=Frontend bug. Causing PR=#86297 '[Wiring the UI] Revamp search page actions bar' by @bernhardoj (High confidence). Recommendation=REVERT. PR 86297 introduced a significant revamp of the search page actions bar and is the clear cause of this regression. The bug is staging-only (not reproducible in production). Assigned: @bernhardoj (PR author), @aimane-chnaif, @JS00001, @luacmartins (approving reviewers). Labels: Removing DeployBlocker (backend deploy not affected, pure frontend issue). Keeping DeployBlockerCash. Root Cause: PR 86297 introduced useSearchFiltersBar as the new hook for filter chips. When on a saved search: opening Advanced Filters > Keywords > saving writes to Onyx but NOT the URL, then closing the RHP causes useSearchFilterSync to skip re-syncing (intentional guard), leaving Onyx with a keyword that isn't in the URL. When Reset is clicked on the keyword chip, updateFilterForm updates the URL but doesn't atomically clear the Onyx form, so the chip persists.
MelvinBot commentedon Apr 16, 2026
Proposal
What is the root cause of that problem?
Every filter dropdown popup (TextInputPopup, MultiSelectPopup, SingleSelectPopup, etc.) follows the same pattern in its
resetChangeshandler: callonChange(resetValue)thencloseOverlay(). The problem is thatonChangetriggersupdateFilterForminuseSearchFiltersBar.tsx, which callsclose(navigationCallback)fromlibs/actions/Modal.ts. Since the popover is open,close()callscloseTop(), which invokes the popover's registered close handler -- which istoggleOverlay. ThencloseOverlay()also callstoggleOverlay.toggleOverlayis a state toggle (setIsOverlayVisible(prev => !prev)), not a "set to false". Calling it twice in the same React batch produces a no-op (true -> false -> true). The popover never closes,onModalDidClosenever fires, and the deferredNavigation.setParamscallback is orphaned. The URLqparam stays unchanged, so the keyword filter persists.The call chain:
resetChanges()->onChange('')->updateFilterForm({keyword: ''})->Modal.close(navCallback)->closeTop()->toggleOverlay()(1st: true->false)closeOverlay()->toggleOverlay()(2nd: false->true)isOverlayVisiblestaystrue, popover never closes, navigation never firesThis was introduced by PR #86297 because keyword was not previously shown as a quick filter chip -- it was only accessible through the Advanced Filters RHP. The PR made keyword (and other filters) appear as quick filter chips with inline popover Reset/Apply buttons, exposing this double-toggle bug.
What changes do you think we should make in order to solve the problem?
In all filter popup components, remove the
closeOverlay()call fromresetChangesandapplyChanges. TheonChange->updateFilterForm->Modal.close()path already handles closing the popover viacloseTop(). The explicitcloseOverlay()is redundant and creates the double-toggle.Affected files (all in
src/components/Search/FilterDropdowns/):TextInputPopup.tsx(lines 21-29)MultiSelectPopup.tsx(lines 92-100)SingleSelectPopup.tsx(lines 110-118)GroupByPopup.tsx(lines 75-83)InSelectPopup.tsx(lines 162-170)CardSelectPopup.tsx(lines 131-141)UserSelectPopup.tsx(lines 136-145)ReportFieldPopup.tsx(lines 209-233)DateSelectPopup/index.tsx(lines 97-131)AmountPopup.tsx(lines 113-121)Alternatively, change
closeOverlayfrom a toggle to an explicitsetIsOverlayVisible(false)inDropdownButton.tsx, so calling it multiple times is idempotent. This is a smaller, safer change that fixes the same issue without removing thecloseOverlay()calls.What alternative solutions did you explore? (Optional)
The alternative to removing
closeOverlay()calls is changingDropdownButton.tsxline 102-110 to provide a dedicatedcloseOverlayfunction that callssetIsOverlayVisible(false)instead of reusingtoggleOverlay. This is arguably cleaner sincecloseOverlaysemantically means "close", not "toggle", and would prevent any future code from hitting the same double-toggle issue.Investigation details
Key evidence chain:
TextInputPopup.tsx:26-29:resetChangescallsonChange('')thencloseOverlay()useSearchFiltersBar.tsx:153-181:updateFilterFormmerges filter values, builds query string, callsModal.close(navCallback)where navCallback isNavigation.setParams({q: queryString})Modal.ts:50-61:close()stores the navCallback asonModalClose, then callscloseTop()which invokes the popover's registered close handlerBaseModal.tsx:141: RegistersonCloseviasetCloseModal(onClose)when the popover mountsPopover/index.tsx:70-76: WrapsonCloseasonCloseWithPopoverContextwhich callstoggleOverlayDropdownButton.tsx:102-110:toggleOverlayissetIsOverlayVisible(prev => !prev)-- a toggle, not a setterDropdownButton.tsx:144:closeOverlaypassed to popup components IStoggleOverlayModal.ts:63-74:onModalDidClosefires the stored navCallback, but only when the modal actually finishes closingThe same double-toggle pattern exists in
applyChangesacross all popup components, meaning Apply buttons are also broken when the popover is registered with the Modal system. Note thatUserSelectPopup.applyChanges(line 136-140) happens to callcloseOverlay()BEFOREonChange(), which accidentally works correctly because the toggle fires beforecloseTopruns.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.bernhardoj commentedon Apr 16, 2026
This happens on other filters and on prod too.
The issue here is that, when selecting a filter from the advanced filters page, even though we haven't pressed View results, the filter is already saved to the onyx data. So, when pressing Reset, the search query stays the same, and so does the onyx data.
web.mp4
JS00001 commentedon Apr 16, 2026
Demoting since this happens on prod
JS00001 commentedon Apr 20, 2026
@bernhardoj are you working on this one?
bernhardoj commentedon Apr 20, 2026
Nope. I think we can just hold (or close) for the release 2 because this won't happen anymore after we refactor the filters popup.
JS00001 commentedon Apr 20, 2026
Yeah lets fix this with the filter changes, please make sure we test this
JS00001 commentedon Apr 20, 2026
Commented on the issue, closing this one