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 2025-10-09] [$250] Reports - Search query shows "feed:" when workspace has Expensify Card #70743
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Version Number: 9.2.15-1 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:#69197 Email or phone of affected tester (no customers):applausetester+160901kh@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Mac 15.5 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Workspace is set up with Expensify Card feature.
Assign at least one card to any user.
Go to staging.new.expensify.com
Go to Reports.
Click Unapproved card.
Expected Result:
Search query will not show "feed:".
Actual Result:
Search query shows "feed:" when workspace has Expensify Card.
🚨 Edited by proposal-police: This proposal was edited at 2025-09-25 19:01:29 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Search query shows "feed:" when workspace has Expensify Card but no default feed ID is available.
What is the root cause of that problem?
In SearchUIUtils, when defaultFeedID is not available, the code sets feed: ['']here
The buildQueryStringFromFilterFormValues function processes this empty string and adds feed:"" to the query string
This results in the unwanted "feed:" prefix appearing in search queries
What changes do you think we should make in order to solve the problem?
Update getSuggestedSearches to use CONST.EXPENSIFY_CARD.BANK as fallback when no default feed ID is available:
This approach uses the established "Expensify Card" fallback that users expect to see and prevents empty feed filters from appearing in search queries.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
When defaultFeedID is undefined or empty, this creates an array with an empty string [''], which gets processed by the query builder and "feed:" prefix displayed in search queries
What changes do you think we should make in order to solve the problem?
We can conditionally include the feed filter only when a valid defaultFeedID exists to prevents empty feed values from being created in the first place
What changes do you think we should make in order to solve the problem?
We should fall back to CONST.EXPENSIFY_CARD.BANK (We don't have to check workspace condition since Unapproved card tab only shows under specific conditions) - Just in case we still want to check, we could check in the parent component and pass it to new props fallBackFeedId
Optional: I think we should not show the selection button since Expensify Card is just a fallback value. However, if needed, we can add the selection button by update the values here to check if CONST.EXPENSIFY_CARD.BANK then we should show Expensify card option
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
🚨 Edited by proposal-police: This proposal was edited at 2025-09-23 20:05:40 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
In workspaces where Expensify Cards are enabled but no company card feed record loads, the "Unapproved card" search shows feed: in the input field.
What is the root cause of that problem?
getSuggestedSearches seeds the canned searches with feed: defaultFeedID ? [defaultFeedID] : [''], so when defaultFeedID is missing the query still receives an array containing an empty string.
buildQueryStringFromFilterFormValues only checks filterValue.length > 0, therefore [''] is considered valid and rendered as feed: with no value.
getSuggestedSearchesVisibility marks the Unapproved Card shortcut as visible whenever a paid policy has Expensify Cards enabled, even if no feed metadata exists - so the empty array path is exercised whenever the feature is enabled via toggle alone.
What changes do you think we should make in order to solve the problem?
Resolve the canned search feed identifier before building the query so we never inject placeholder empty strings. Derive a fallback of CONST.EXPENSIFY_CARD.BANK when the shortcut is eligible but we lack a concrete feed ID.
Harden the query builder to strip empty or whitespace-only entries from every array-based filter, ensuring future callers cannot surface blank filters.
Keep the UI consistent by re-using the localized Expensify Card label when we depend on the fallback so admins still see an explicit feed:"Expensify Card" hint.
Note: It will not show as a dropdown if we have just the single Expensify Card feed.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Unit test buildQueryStringFromFilterFormValues to confirm arrays containing only empty strings produce no filter and mixed values retain only the non-empty entries.
Test covering the normal path where a real feed ID exists to ensure we still surface that ID and do not overwrite it with the fallback.
changed the title [-]Reports - Search query shows "feed:" when workspace has Expensify Card[/-][+][$250] Reports - Search query shows "feed:" when workspace has Expensify Card[/+]on Sep 18, 2025
changed the title [-][$250] Reports - Search query shows "feed:" when workspace has Expensify Card[/-][+][Due for payment 2025-10-09] [$250] Reports - Search query shows "feed:" when workspace has Expensify Card[/+]on Oct 2, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.21-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@truph01@bfitzexpensify 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]
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
The original fix only covered Expensify-Card-only workspaces; mixed-feed workspaces remained broken. This was reported again as #96342 and fixed in #97262.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Activity
melvin-bot commentedon Sep 17, 2025
Triggered auto assignment to @bfitzexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.abzokhattab commentedon Sep 17, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-09-25 19:01:29 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Search query shows "feed:" when workspace has Expensify Card but no default feed ID is available.
What is the root cause of that problem?
SearchUIUtils, whendefaultFeedIDis not available, the code setsfeed: ['']hereThe buildQueryStringFromFilterFormValues function processes this empty string and adds
feed:""to the query stringWhat changes do you think we should make in order to solve the problem?
getSuggestedSearchesto useCONST.EXPENSIFY_CARD.BANKas fallback when no default feed ID is available:`
This approach uses the established "Expensify Card" fallback that users expect to see and prevents empty feed filters from appearing in search queries.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
NA
nyomanjyotisa commentedon Sep 17, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Reports - Search query shows "feed:" when workspace has Expensify Card
What is the root cause of that problem?
We set
feed: defaultFeedID ? [defaultFeedID] : ['']hereApp/src/libs/SearchUIUtils.ts
Line 477 in b1af723
When
defaultFeedIDis undefined or empty, this creates an array with an empty string[''], which gets processed by the query builder and "feed:" prefix displayed in search queriesWhat changes do you think we should make in order to solve the problem?
We can conditionally include the feed filter only when a valid
defaultFeedIDexists to prevents empty feed values from being created in the first placeApp/src/libs/SearchUIUtils.ts
Lines 475 to 480 in b1af723
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We can add test for
getSuggestedSearchesWhat alternative solutions did you explore? (Optional)
None
lorretheboy commentedon Sep 17, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-09-24 01:23:29 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Search query shows "feed:" when workspace has Expensify Card.
What is the root cause of that problem?
When we don't have feed ID, we set its default value to
['']in SEARCH_KEYS.STATEMENTS and SEARCH_KEYS.UNAPPROVED_CARDApp/src/libs/SearchUIUtils.ts
Line 435 in 29c8229
App/src/libs/SearchUIUtils.ts
Line 477 in 29c8229
So that it uses empty string values to generate query key
App/src/libs/SearchQueryUtils.ts
Line 559 in 29c8229
What changes do you think we should make in order to solve the problem?
We should fall back to
CONST.EXPENSIFY_CARD.BANK(We don't have to check workspace condition sinceUnapproved cardtab only shows under specific conditions) - Just in case we still want to check, we could check in the parent component and pass it to new propsfallBackFeedIdApp/src/libs/SearchUIUtils.ts
Line 477 in 29c8229
Optional: To highlight the expensify card default value, we can add
App/src/libs/SearchAutocompleteUtils.ts
Line 153 in 9cc8853
Optional: I think we should not show the selection button since Expensify Card is just a fallback value. However, if needed, we can add the selection button by update the values here to check if
CONST.EXPENSIFY_CARD.BANKthen we should show Expensify card optionApp/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx
Line 444 in 47516da
And seed the default values here
App/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx
Line 483 in 47516da
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Can add test to cover empty cases for
getSuggestedSearchesWhat alternative solutions did you explore? (Optional)
We should not show
UNAPPROVED_CARDsection if user doesn't have any feedApp/src/libs/SearchUIUtils.ts
Line 555 in 4f37d8c
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
ShridharGoel commentedon Sep 17, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-09-23 20:05:40 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
In workspaces where Expensify Cards are enabled but no company card feed record loads, the "Unapproved card" search shows
feed:in the input field.What is the root cause of that problem?
getSuggestedSearchesseeds the canned searches withfeed: defaultFeedID ? [defaultFeedID] : [''], so whendefaultFeedIDis missing the query still receives an array containing an empty string.buildQueryStringFromFilterFormValuesonly checksfilterValue.length > 0, therefore['']is considered valid and rendered asfeed:with no value.getSuggestedSearchesVisibilitymarks the Unapproved Card shortcut as visible whenever a paid policy has Expensify Cards enabled, even if no feed metadata exists - so the empty array path is exercised whenever the feature is enabled via toggle alone.What changes do you think we should make in order to solve the problem?
CONST.EXPENSIFY_CARD.BANKwhen the shortcut is eligible but we lack a concrete feed ID.feed:"Expensify Card"hint.Note: It will not show as a dropdown if we have just the single Expensify Card feed.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
buildQueryStringFromFilterFormValuesto confirm arrays containing only empty strings produce no filter and mixed values retain only the non-empty entries.What alternate solutions did you explore?
The feed filter can be removed for this scenario.
[-]Reports - Search query shows "feed:" when workspace has Expensify Card[/-][+][$250] Reports - Search query shows "feed:" when workspace has Expensify Card[/+]melvin-bot commentedon Sep 18, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021968705813242457077
melvin-bot commentedon Sep 18, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @truph01 (
External)33 remaining items
[-][$250] Reports - Search query shows "feed:" when workspace has Expensify Card[/-][+][Due for payment 2025-10-09] [$250] Reports - Search query shows "feed:" when workspace has Expensify Card[/+]melvin-bot commentedon Oct 2, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Oct 2, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.21-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 2025-10-09. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Oct 2, 2025
@truph01 @bfitzexpensify 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]
truph01 commentedon Oct 9, 2025
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
bfitzexpensify commentedon Oct 14, 2025
Payments complete to @truph01 and @thelullabyy via Upwork
Krishna2323 commentedon Aug 10, 2026
The original fix only covered Expensify-Card-only workspaces; mixed-feed workspaces remained broken. This was reported again as #96342 and fixed in #97262.