Skip to content

[$250] [RCA #67117] Reports - "Feed" filter pill shows only 1 card feed when 2 card feeds are selected #67645

Closed

Description

@nlemma

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.1.88-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 TestRail: #67117
Email or phone of affected tester (no customers): shdiuhdshbudihdsi@gmail.com
Issue reported by: Applause Internal Team
Device used: Windows 11 / Chrome
App Component: Search

Action Performed:

Precondition:
Add two card feeds:

  • Chase bank account - Assign card ending 0000 to yourself.
  • Wells Fargo bank account - Assign card ending 3333 to yourself.
    Both card feeds should have imported transactions.
  1. Go to staging.expensify.com
  2. Go to Reports.
  3. Go to Unapproved cards.
  4. Open Advanced filters.
  5. Go to Card.
  6. Unselect "All Plaid Checking 0000" and select "All Plaid Credit Card 3333".
  7. Click Save > View results.
    → "Feed" filter pill changes to Well Fargo cards.
  8. Open Advanced filters.
  9. Go to Card.
  10. Select both "All Plaid Checking 0000" and select "All Plaid Credit Card 3333".
  11. Click Save > View results.

Expected Result:

We go back to the state of no suggested search selected, meaning the feed filter pill is not visible anymore.

Actual Result:

"Feed" filter pill only shows Chase cards as selected when the search query contains both card feeds. The filter pill does not support multi selection.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6905098_1754047964814.bandicam_2025-08-01_19-27-01-690.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021952385351138992865
  • Upwork Job ID: 1952385351138992865
  • Last Price Increase: 2025-08-04
Issue OwnerCurrent Issue Owner: @alitoshmatov

Activity

  1. added
    Daily
    Bug
    on Aug 1, 2025
  2. melvin-bot commented on Aug 1, 2025

    @melvin-bot

    Triggered auto assignment to @muttmuure (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.

  3. added
    DeployBlockerCash
    on Aug 1, 2025
  4. github-actions commented on Aug 1, 2025

    @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.
  5. melvin-bot commented on Aug 1, 2025

    @melvin-bot

    Triggered auto assignment to @rlinoz (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  6. melvin-bot commented on Aug 1, 2025

    @melvin-bot

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

  7. rlinoz commented on Aug 1, 2025

    @rlinoz
    Contributor

    Posted here https://expensify.slack.com/archives/C03U7DCU4/p1754053150242389 asking for confirmation on the behavior.

  8. BlameGPT commented on Aug 1, 2025

    @BlameGPT
  9. removed
    DeployBlockerCash
    on Aug 1, 2025
  10. 6 remaining items

  11. added
    External
    on Aug 4, 2025
  12. changed the title [-][RCA #67117] Reports - "Feed" filter pill shows only 1 card feed when 2 card feeds are selected[/-] [+][$250] [RCA #67117] Reports - "Feed" filter pill shows only 1 card feed when 2 card feeds are selected[/+] on Aug 4, 2025
  13. melvin-bot commented on Aug 4, 2025

    @melvin-bot
  14. melvin-bot commented on Aug 4, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov (External)

  15. daledah commented on Aug 4, 2025

    @daledah
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    "Feed" filter pill only shows Chase cards as selected when the search query contains both card feeds. The filter pill does not support multi selection.

    What is the root cause of that problem?

    We always show feed filter if number of feeds is greater than 1:

    const shouldDisplayFeedFilter = feedOptions.length > 1 && !!filterFormValues?.feed;

    And don't hide feed pill if all feeds are selected.

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

    Add additional checks for shouldDisplayFeedFilter

    const shouldDisplayFeedFilter = feedOptions.length > 1 && !!filterFormValues?.feed?.length && filterFormValues?.feed?.length !== feedOptions.length;

    This will hide Feed selector if all card feeds are selected.

    Note

    I don't think this is the expected behaviour. Since the card selector in Search filters page are multi-selectable, we should make the feed multi-select instead of hiding it, similar to Status selector pill.

    We'll have to make some updates to MultiSelectPopup

    1. Add additional proptext here

    type MultiSelectItem<T> = {
    translation: TranslationPaths;
    value: T;
    };

    1. Update this line to proper fallback

    text: translate(item.translation),

    text: item.translation ? translate(item.translation) : (item.text ?? ''),
    1. Update getFeedOptions to return correct type (from SingleSelectItem to MultiSelectItem)

    return Object.values(getCardFeedsForDisplay(allCardFeeds, allCards)).map<SingleSelectItem<string>>((cardFeed) => ({

    1. In Search Filters Bar, update feedOptions here to match MultiSelectPopup props

    const [feedOptions, feed] = useMemo(() => {
    const feedFilterValue = flatFilters
    .find((filter) => filter.key === CONST.SEARCH.SYNTAX_FILTER_KEYS.FEED)
    ?.filters.find((filter) => filter.operator === CONST.SEARCH.SYNTAX_OPERATORS.EQUAL_TO)?.value;
    const options = getFeedOptions(allFeeds, allCards);
    const value = options.find((option) => option.value === feedFilterValue) ?? null;
    return [options, value];
    }, [flatFilters, allFeeds, allCards]);

        const [feedOptions, feed] = useMemo(() => {
            const feedFilters = flatFilters
                .find((filter) => filter.key === CONST.SEARCH.SYNTAX_FILTER_KEYS.FEED)
                ?.filters.filter((filter) => filter.operator === CONST.SEARCH.SYNTAX_OPERATORS.EQUAL_TO);
            const options = getFeedOptions(allFeeds, allCards);
            const values = options.filter((option) => feedFilters?.find((filter) => filter.value === option.value)) ?? null;
            return [options, values];
        }, [flatFilters, allFeeds, allCards]);
    1. Update feedComponent to use MultiSelectPopup and update onChange props:

    <SingleSelectPopup
    label={translate('search.filters.feed')}
    items={feedOptions}
    value={feed}
    closeOverlay={closeOverlay}
    onChange={(item) => updateFilterForm({feed: item ? [item.value] : undefined})}
    />

    <MultiSelectPopup
            label={translate('search.filters.feed')}
            items={feedOptions}
            value={feed}
            closeOverlay={closeOverlay}
            onChange={(item) => updateFilterForm({feed: item ? item.map((i) => i.value) : undefined})}
    />
    1. Update here for feed display

    value: feed.map((option) => option.text ?? ''),

    With this change, we make:

    1. Feed selector becomes multi-select, instead of dissappearing
    2. Feed selector shows all feeds selected

    POC:

    Screen.Recording.2025-08-04.at.22.49.30.mov

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    None

    What alternative solutions did you explore? (Optional)

    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.

  16. rlinoz commented on Aug 6, 2025

    @rlinoz
    Contributor
  17. melvin-bot commented on Aug 7, 2025

    @melvin-bot

    @alitoshmatov Whoops! This issue is 2 days overdue. Let's get this updated quick!

  18. rlinoz commented on Aug 8, 2025

    @rlinoz
    Contributor

    I don't think this is the expected behaviour. Since the card selector in Search filters page are multi-selectable, we should make the feed multi-select instead of hiding it, similar to Status selector pill.

    Going by the doc https://docs.google.com/document/d/1vXMf1oK3J8A7EcjTGSPtpT2rgHWqcAg-FbuXlObjHZ4/edit?tab=t.0#bookmark=id.ta9hmylqm33k it looks like we only add the feed filter when this query is selected and it looks like it is intended to be a single feed at a time.

    If you could confirm @JS00001

  19. JS00001 commented on Aug 8, 2025

    @JS00001
    Contributor

    We decided to go with multiselect, this is fixed here: #67799

  20. rlinoz commented on Aug 8, 2025

    @rlinoz
    Contributor

    Closing this one then, thanks

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

Metadata

Metadata

Labels

BugDailyEngineeringExternalHelp Wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions