Skip to content

[$175] Card statements displays the same cards and transactions regardless of the selected CSV feed. #105907

Open

Description

@m-natarajan

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.27-2
Reproducible in staging?: Needs Reproduction (Unable to reproduce)
Reproducible in production?: Needs Reproduction
If this was caught during regression testing, add the test name, ID and link from BrowserStack:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @nicollyrodrigues-max
Slack conversation (hyperlinked to channel name): #Expensify Bugs

Action Performed:

  1. Access a customer account with multiple company card feeds whose transactions are imported monthly through CSV uploads in Expensify Classic.
  2. In New Expensify, navigate to Spend > Card statements.
  3. Keep the Posted filter set to Last statement.
  4. Open the Feed filter, select only one CSV feed, such as CHASE VISA/SMC (Pete R), and click Apply.
  5. Review the displayed cards, expense count, and total spend.
  6. Reopen the Feed filter, deselect the previous feed, select a different CSV feed, such as AMEX SMC (Don), and click Apply.
  7. Compare the results.

Expected Result:

The results should display only the cards and transactions associated with the selected feed and posted period. The expense count and total spend should reflect those filtered results.

Actual Result:

The same card list and transactions remain visible after applying different CSV feed selections. The results continue to show same expenses and total spend, preventing the customer from reconciling each feed separately.
The CSV feeds have distinct names in the filter dropdown, but the corresponding rows display the generic label “CSV cards” in the Feed column.

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

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

Screenshots/Videos

The video and screenshot for the issue are in Slack thread

View all open jobs on GitHub

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @arosiclair

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 4, 2026
  2. MelvinBot commented on Nov 4, 2026

    @MelvinBot
    Contributor

    🤖 Web test steps verification results: ⚠️ partial

    Blocked on dev NewDot web: the supplied account has no workspaces or expenses, so the required multiple Classic-imported company-card CSV feeds are unavailable. No data was invented.

    Workspaces empty state showing the required fixture is unavailable

    Step Status
    1. Access account with multiple Classic-imported CSV feedsWorkspaces displays “No workspaces yet” and prompts creation of a workspace to manage company cards.
    Workspaces empty state showing the required fixture is unavailable
    ❌
    2. Navigate Spend > Card statementsSpend displays Expenses and Reports with “No expenses yet”; Card statements is not available.
    ❌
    3. Keep Posted set to Last statementBlocked by the missing CSV-feed fixture; Posted could not be verified.
    ❌
    4. Select only one CSV feed and ApplyBlocked by the missing CSV-feed fixture; no feed was selected or applied.
    ❌
    5. Inspect cards, expense count, and totalBlocked by the missing CSV-feed fixture; selected-feed results could not be inspected.
    ❌
    6. Replace selection with a different CSV feed and ApplyBlocked by the missing CSV-feed fixture; a second feed was unavailable.
    ❌
    7. Verify selected-feed isolation, appropriate total changes, and Feed column labelsBlocked by the missing CSV-feed fixture; cards, transactions, totals, and Feed labels could not be compared.
    ❌

    view run

  3. MelvinBot commented on Nov 4, 2026

    @MelvinBot
    Contributor

    ⚠️ Preliminary analysis (low confidence) — the root cause remains unconfirmed.

    Hypothesis: Search may return identical results for distinct CSV-feed selections. The inspected App code does not support an identifier-collision explanation.

    Evidence and alternatives

    The checkout is newer than reported version 9.5.27-2. Web reproduction was blocked by missing CSV feeds.

    To confirm: Compare both selections’ Search requests and responses: feed values, hashes, cards, counts, and totals. Repeat with explicit Posted dates. Different requests with identical responses warrant internal investigation; unchanged requests point toward App selection state. No code fix is justified yet.


    Next Steps: Reply with @MelvinBot <your feedback> to refine this analysis.


    view run · no recording available

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 4, 2026
  5. melvin-bot commented on Nov 4, 2026

    @melvin-bot

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

  6. changed the title [-]Card statements displays the same cards and transactions regardless of the selected CSV feed.[/-] [+][$175] Card statements displays the same cards and transactions regardless of the selected CSV feed.[/+] on Nov 4, 2026
  7. melvin-bot commented on Nov 4, 2026

    @melvin-bot
  8. jaharoni commented on Nov 4, 2026

    @jaharoni

    Proposal

    What is the root cause of that problem?

    There are two distinct issues causing the generic "CSV cards" label in the Feed column and the unfiltered card/transaction results when switching between CSV feeds:

    1. Why the Feed column displays "CSV cards" while the Feed filter dropdown shows distinct feed names:

      • In src/libs/CardUtils.ts (getCustomOrFormattedFeedName), the string "CSV cards" is only produced when getBankName(feed) returns CONST.COMPANY_CARDS.CARD_TYPE.CSV ("CSV"), translate('workspace.companyCards.feedName', 'CSV') formats it with the " cards" suffix, and customFeedName is undefined.
      • customFeedName resolves to undefined in getCardSections (src/libs/SearchUIUtils.ts:3499-3514) because:
        • CSV upload feeds store their user-defined layout name in settings.companyCards[feed].uploadLayoutSettings.layoutName (which getCombinedCardFeedsFromAllFeeds in src/libs/CardFeedUtils.ts:609 already falls back to via customFeedName ?? feedSettings?.uploadLayoutSettings?.layoutName), whereas getCardSections (src/libs/SearchUIUtils.ts:3506), getCustomFeedNameFromFeeds (src/libs/CardUtils.ts:128), and getCardFeedsForDisplay (src/libs/CardFeedUtils.ts:267) only check settings.companyCardNicknames?.[feed] and ignore uploadLayoutSettings?.layoutName.
        • In getCardSections, card is looked up from cardList (ONYXKEYS.DERIVED.PERSONAL_AND_WORKSPACE_CARD_LIST). For CSV feeds, unassigned/imported cards are not preloaded into PERSONAL_AND_WORKSPACE_CARD_LIST on initial search load (and CSV cards can lack card.fundID, as noted in the comment at src/libs/SearchUIUtils.ts:3497). When card?.fundID is undefined, getCardSections passes customFeedName = undefined and the generic cardGroup.bank value to getFeedNameForDisplay, which fails to match the numbered CSV feed key (ccupload1, ccupload2, csv1, etc.) and falls back to "CSV cards".
    2. Why selecting different CSV feeds returns the same cards, expense count, and total spend:

      • Multiple CSV feeds imported under the same domain have distinct feed keys (<fundID>_<feedKey>) in sharedNVP_private_domain_member_<fundID>.settings.companyCards, but their underlying card rows share the same generic CSV bank identifier (upload / csv) on the domain.
      • When feed:"<fundID>_<feedKey>" is applied on Spend > Card statements (group-by:card posted:last-statement), neither the search query resolution nor getCardSections scopes the results to the specific card IDs belonging to that CSV feed layout (cards_<fundID>_<feedKey>), so every CSV feed selection on the same domain matches the full set of CSV cards and transactions for that domain.

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

    1. Include uploadLayoutSettings?.layoutName in feed display-name resolution:

      • In getCustomFeedNameFromFeeds (src/libs/CardUtils.ts), getCardFeedsForDisplay / getCardFeedsForDisplayPerPolicy / getVisibleCompanyCardFeedsForSelector (src/libs/CardFeedUtils.ts), and getCardSections (src/libs/SearchUIUtils.ts), fall back to feedData?.settings?.companyCards?.[feed]?.uploadLayoutSettings?.layoutName when companyCardNicknames?.[feed] is not set, matching the existing pattern in getCombinedCardFeedsFromAllFeeds (src/libs/CardFeedUtils.ts:609).
    2. Resolve the specific CSV feed key and domain in getCardSections (src/libs/SearchUIUtils.ts):

      • Look up the card across both cardList and nonPersonalAndWorkspaceCardList, resolve its feed key via getCompanyCardFeed(card.bank) when present, and when card?.fundID is missing on a CSV card group, fall back to getCustomFeedNameFromFeeds (or the active feed filter in queryJSON when a single CSV feed is selected) so the Feed column displays the specific CSV feed name instead of "CSV cards".
    3. Scope CSV feed filtering to the selected feed's cards:

      • When filtering by a CSV upload feed (isCSVUploadFeed), resolve the feed key to its associated cards (cards_<fundID>_<feedKey> / feed layout mapping in Search) so that selecting a specific CSV feed filters the returned card statement groups, transaction counts, and total spend to only that CSV feed.

    What alternative solutions did you explore? (Optional)

    We considered filtering cardSections purely client-side in getCardSections based on queryJSON.flatFilters for the feed key, but client-side row filtering alone would leave the search snapshot's footer totals and pagination counts out of sync with the visible rows unless the query/backend feed resolution also scopes by the selected CSV feed's cards.

    Contributor details

    Your Expensify account email: jaharoni@gmail.com
    Upwork Profile Link: https://www.upwork.com/freelancers/inceptionenginesystems

  9. melvin-bot commented on Nov 4, 2026

    @melvin-bot

    ⚠️ Invalid email. Please make sure to create an Expensify account with this email first here.

  10. jaharoni commented on Nov 4, 2026

    @jaharoni

    Contributor details
    Your Expensify account email: jaharoni@gmail.com
    Upwork Profile Link: https://www.upwork.com/freelancers/inceptionenginesystems

  11. melvin-bot commented on Nov 4, 2026

    @melvin-bot

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  12. Enes2553 commented on Nov 4, 2026

    @Enes2553

    Proposal

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

    On Spend > Card statements, when filtering by different CSV company card feeds (e.g. switching between CHASE VISA/SMC (Pete R) and AMEX SMC (Don) under the Feed filter), the results continue displaying the exact same list of cards, expense counts, and total spend. Furthermore, despite distinct feed names appearing in the filter dropdown, the Feed column on each statement row displays the generic fallback "CSV cards".

    What is the root cause of that problem?

    There are two root causes in feed display name resolution and CSV feed filtering:

    1. Generic "CSV cards" label in the Feed column (src/libs/SearchUIUtils.ts:3505-3518 & src/libs/CardUtils.ts:1145-1192):
      In src/libs/SearchUIUtils.ts:3505-3518, statement card sections build formattedFeedName via getFeedNameForDisplay:

      formattedFeedName: isPersonal
          ? translate('cardTransactions.personalCard')
          : getFeedNameForDisplay(
                translate,
                cardGroup.bank as OnyxTypes.CompanyCardFeed,
                cardFeeds,
                card?.fundID
                    ? cardFeeds?.[`${ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_DOMAIN_MEMBER}${card.fundID}`]?.settings?.companyCardNicknames?.[
                          cardGroup.bank as OnyxTypes.CompanyCardFeed
                      ]
                    : undefined,
                true,
                cardGroup?.feedCountry,
            ),
      • For CSV feeds, the custom user-defined feed name is stored in feedSettings?.uploadLayoutSettings?.layoutName (as recognized in src/libs/CardFeedUtils.ts:609: customFeedName: customFeedName ?? feedSettings?.uploadLayoutSettings?.layoutName).
      • However, getFeedNameForDisplay and getCustomFeedNameFromFeeds (src/libs/CardUtils.ts:1145-1158) exclusively inspect feedData?.settings?.companyCardNicknames?.[feed] and completely ignore uploadLayoutSettings?.layoutName.
      • Furthermore, in getCardSections, card?.fundID is often undefined for imported CSV card groups (as noted at SearchUIUtils.ts:3497), so customFeedName passes as undefined. getFeedNameForDisplay then falls back to getCustomOrFormattedFeedName(translate, feed, undefined, true), which resolves feed (ccupload* or generic upload/csv) to the fallback "CSV cards".
    2. Selecting different CSV feeds does not filter the returned cards or transactions:

      • Multiple CSV feeds imported under the same domain have distinct feed IDs (${fundID}_${feedName}) in the filter dropdown, but their card records share the same underlying bank type (upload / csv).
      • When the user selects a specific CSV feed, the filter sets feed:"<fundID>_<feedName>". However, search query resolution does not restrict the card rows to the specific cards belonging to that CSV feed layout (cards_<fundID>_<feedName>), causing every CSV feed selection on that domain to return the full set of cards and transactions.

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

    1. In src/libs/CardUtils.ts (getCustomFeedNameFromFeeds):
      Support uploadLayoutSettings?.layoutName when resolving custom feed names from cardFeeds, matching getCombinedCardFeedsFromAllFeeds in CardFeedUtils.ts:609:

      --- a/src/libs/CardUtils.ts
      +++ b/src/libs/CardUtils.ts
      @@ -1152,7 +1152,8 @@ function getCustomFeedNameFromFeeds(cardFeeds: OnyxCollection<CardFeeds> | unde
           for (const feedData of Object.values(cardFeeds)) {
      -        const nickname = feedData?.settings?.companyCardNicknames?.[feed];
      +        const feedSettings = feedData?.settings?.companyCards?.[feed];
      +        const nickname = feedData?.settings?.companyCardNicknames?.[feed] ?? feedSettings?.uploadLayoutSettings?.layoutName;
               if (nickname) {
                   return nickname;
               }
           }
    2. In src/libs/CardFeedUtils.ts (getCardFeedsForDisplay & getCardFeedsForDisplayPerPolicy):
      In both getCardFeedsForDisplay (line 257) and getCardFeedsForDisplayPerPolicy (line 390), fallback to feedData?.settings?.uploadLayoutSettings?.layoutName when companyCardNicknames?.[feed] is not set:

      const customName = cardFeeds?.settings?.companyCardNicknames?.[feed] ?? feedData?.settings?.uploadLayoutSettings?.layoutName;
      name: getCustomOrFormattedFeedName(translate, feed, customName, false) ?? feed,
    3. In src/libs/SearchUIUtils.ts (getCardSections):
      When card?.fundID is missing on a CSV card group, retrieve customFeedName using getCustomFeedNameFromFeeds(cardFeeds, cardGroup.bank as OnyxTypes.CompanyCardFeed) (or from the active feed filter in transactionsQueryJSON) so the specific CSV feed name (e.g. CHASE VISA/SMC (Pete R) cards) is displayed instead of the generic "CSV cards".

    4. Scope CSV feed query filtering:
      Ensure feed filter resolution maps CSV upload feeds (isCSVUploadFeed) to their specific card IDs (cards_${fundID}_${feedName}) so that selecting an individual CSV feed isolates transactions and cards belonging solely to that feed.

    What alternative solutions did you explore? (Optional)

    • Only renaming the feed in the UI without scoping transactions: rejected because customers need to reconcile individual CSV feeds separately as described in the issue.

    What automated tests can you add to prevent this from re-occurring?

    In tests/unit/CardUtilsTest.ts:

    • Verify getCustomFeedNameFromFeeds returns uploadLayoutSettings.layoutName for CSV company card feeds when no manual nickname is set.
    • Verify getFeedNameForDisplay returns the layout name with " cards" suffix for CSV feeds.
  13. 12 remaining items

  14. MelvinBot commented on Nov 12, 2026

    @MelvinBot
    Contributor

    Yes—but there are two separate fixtures needed: feed/card data for the dropdown, and Search responses for the statement rows and totals. Adding feeds to Onyx alone won’t reproduce the filtering issue.

    The earlier run was blocked by an empty account, not a confirmed reproduction.

    1. Populate two local CSV feeds

    Use a disposable local-development account with an existing paid workspace, not a customer account. Web development exposes Onyx in DevTools (documentation).

    Replace the two placeholders, then run:

    const policyID = 'YOUR_WORKSPACE_ID';
    const accountID = Number('YOUR_ACCOUNT_ID');
    const fundID = '900000001'; // Synthetic fixture ID
    
    await Onyx.merge(`policy_${policyID}`, {
        areCompanyCardsEnabled: true,
    });
    await Onyx.set('nvp_expensify_activePolicyID', policyID);
    
    await Onyx.set(`sharedNVP_private_domain_member_${fundID}`, {
        settings: {
            companyCards: {
                csv1: {pending: false, preferredPolicy: policyID},
                csv2: {pending: false, preferredPolicy: policyID},
            },
            companyCardNicknames: {
                csv1: 'Monthly A',
                csv2: 'Monthly B',
            },
        },
    });
    
    const makeCard = (cardID, bank, lastFourPAN) => ({
        cardID,
        bank,
        lastFourPAN,
        cardName: `XXXX${lastFourPAN}`,
        accountID,
        fundID,
        domainName: 'mock.example',
        state: 3,
        fraud: 'none',
        lastUpdated: '2026-11-01 00:00:00',
    });
    
    await Onyx.set(`cards_${fundID}_csv1`, {
        '910000001': makeCard(910000001, 'csv1', '1111'),
    });
    await Onyx.set(`cards_${fundID}_csv2`, {
        '910000002': makeCard(910000002, 'csv2', '2222'),
    });

    This supplies two distinct feed identities: 900000001_csv1 and 900000001_csv2. The selector constructs those IDs separately from their labels (CardFeedUtils.ts:244–265).

    2. Supply statement results separately

    For a frontend-only test, intercept each selection’s Search response and return different snapshots:

    Selected feed Returned card Expense count Total
    Monthly A 910000001 1 $10
    Monthly B 910000002 2 $25

    Use the existing card-group Search fixture as the response template. Its data contains personalDetailsList and group_<cardID> entries with bank, cardID, count, total, and currency.

    Each response must target snapshot_<that request’s actual hash>, with matching search.hash and totals. Capture the hash from the outgoing request rather than inventing it (Search.ts:1451–1506). Online responses can overwrite manually seeded snapshots.

    What this verifies—and what it doesn’t

    • Mocked responses: verify A → B → A sends distinct feed values and renders the corresponding cards/counts/totals.
    • Actual reported bug: requires two real Classic CSV feeds with disjoint cards and imported transactions in the selected posted period. Compare their real Search requests and responses.
    • Returning the same mocked data for both feeds would manufacture the symptom, not confirm the bug.

    This is a source-based fixture recipe; I haven’t executed it in the browser, and the production root cause remains unconfirmed.


    view run

  15. cocvn157 commented on Nov 14, 2026

    @cocvn157

    Proposal

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

    On Spend > Card statements (type:expense group-by:card posted:last-statement), when a customer has multiple company card feeds imported via CSV uploads in Expensify Classic:

    1. Even when the Feed filter dropdown shows distinct CSV feed names (e.g. CHASE VISA/SMC (Pete R) and AMEX SMC (Don)), every statement row displays the generic fallback label "CSV cards" in the Feed column.
    2. Selecting different CSV feeds in the Feed filter and clicking Apply displays the same list of cards, expense counts, and total spend, preventing the customer from reconciling each CSV feed separately.

    What is the root cause of that problem?

    There are two connected root causes across Expensify/App's feed display/selector utilities and CSV feed card-statement resolution:

    1. Why the Feed column displays "CSV cards" (and why CSV feeds without a manual nickname entry fall back to "CSV") in src/libs/SearchUIUtils.ts:3642-3667, src/libs/CardUtils.ts:1140-1186, and src/libs/CardFeedUtils.ts:263, 393, 508:

      • In getCardSections (src/libs/SearchUIUtils.ts:3642-3667), each card group row looks up card and formats formattedFeedName as:
        const card = cardList?.[cardGroup.cardID];
        const isPersonal = !!card && isPersonalCard(card) && !nonPersonalAndWorkspaceCardList?.[cardGroup.cardID];
        ...
        formattedFeedName: isPersonal
            ? translate('cardTransactions.personalCard')
            : getFeedNameForDisplay(
                  translate,
                  cardGroup.bank as OnyxTypes.CompanyCardFeed,
                  cardFeeds,
                  card?.fundID
                      ? cardFeeds?.[`${ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_DOMAIN_MEMBER}${card.fundID}`]?.settings?.companyCardNicknames?.[
                            cardGroup.bank as OnyxTypes.CompanyCardFeed
                        ]
                      : undefined,
                  true,
                  cardGroup?.feedCountry,
              ),
      • Defect A (uploadLayoutSettings.layoutName ignored outside getCombinedCardFeedsFromAllFeeds): For CSV upload feeds (ccupload* / csv*), the feed's layout name is stored at settings.companyCards[feed].uploadLayoutSettings.layoutName—which getCombinedCardFeedsFromAllFeeds in src/libs/CardFeedUtils.ts:605 already reads via customFeedName: customFeedName ?? feedSettings?.uploadLayoutSettings?.layoutName. However, getCustomFeedNameFromFeeds (src/libs/CardUtils.ts:1140-1153), getCardSections (src/libs/SearchUIUtils.ts:3660-3664), getCardFeedsForDisplay (CardFeedUtils.ts:263), getCardFeedsForDisplayPerPolicy (CardFeedUtils.ts:393), and getVisibleCompanyCardFeedsForSelector (CardFeedUtils.ts:508) only check settings?.companyCardNicknames?.[feed] and ignore settings?.companyCards?.[feed]?.uploadLayoutSettings?.layoutName.
      • Defect B (card lookup and cardGroup.bank normalization in getCardSections): In getCardSections, card is only read from cardList (ONYXKEYS.DERIVED.PERSONAL_AND_WORKSPACE_CARD_LIST), not nonPersonalAndWorkspaceCardList, and as the comment at line 3643 notes, workspace/company cards from a feed can lack card.fundID or not be present in cardList. Furthermore, cardGroup.bank on statement group rows can carry either a domain suffix (#domainID) or the generic CSV bank value (upload / csv) rather than the numbered feed key (csv1, csv2, ccupload1). When getFeedNameForDisplay calls getCustomFeedNameFromFeeds(cardFeeds, cardGroup.bank), it fails to match the specific CSV feed's custom/layout name and falls back to getCustomOrFormattedFeedName(translate, feed, undefined, true), which maps getBankName(feed) === 'CSV' to translate('workspace.companyCards.feedName', 'CSV') = "CSV cards".
    2. Why selecting different CSV feeds on the same domain returns the same cards and transactions:

      • Multiple Classic CSV feeds under the same fundID have distinct feed filter keys (${fundID}_${feed}, e.g. 12345_csv1 and 12345_csv2) in getCardFeedsForDisplay (CardFeedUtils.ts:253), while their imported card records share the same underlying CSV bank identifier on that domain.
      • When the user selects a specific CSV feed in the Feed filter (feed:"<fundID>_<feed>"), getCardSections (src/libs/SearchUIUtils.ts:3598-3675) and the Search query resolution do not scope the CSV feed filter to the cards belonging to that specific CSV feed layout (cards_<fundID>_<feed>), so both CSV feed selections return the full set of CSV cards and transactions for that domain.

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

    1. Include uploadLayoutSettings?.layoutName when resolving custom feed names in src/libs/CardUtils.ts:1140-1153 and src/libs/CardFeedUtils.ts:263, 393, 508:

      • In getCustomFeedNameFromFeeds (src/libs/CardUtils.ts:1140-1153), normalize const feedKey = getCompanyCardFeed(feed as CardFeedWithNumber) and fall back to uploadLayoutSettings?.layoutName:
        function getCustomFeedNameFromFeeds(cardFeeds: OnyxCollection<CardFeeds> | undefined, feed: CompanyCardFeed | undefined): string | undefined {
            if (!feed || !cardFeeds) {
                return undefined;
            }
            const normalizedFeed = getCompanyCardFeed(feed);
            for (const feedData of Object.values(cardFeeds)) {
                const nickname =
                    feedData?.settings?.companyCardNicknames?.[normalizedFeed] ??
                    feedData?.settings?.companyCards?.[normalizedFeed]?.uploadLayoutSettings?.layoutName;
                if (nickname) {
                    return nickname;
                }
            }
            return undefined;
        }
      • Apply the same cardFeeds?.settings?.companyCardNicknames?.[feed] ?? cardFeeds?.settings?.companyCards?.[feed]?.uploadLayoutSettings?.layoutName fallback in getCardFeedsForDisplay (CardFeedUtils.ts:263), getCardFeedsForDisplayPerPolicy (CardFeedUtils.ts:393), and getVisibleCompanyCardFeedsForSelector (CardFeedUtils.ts:508), matching getCombinedCardFeedsFromAllFeeds (CardFeedUtils.ts:605).
    2. Resolve the card from both cardList and nonPersonalAndWorkspaceCardList and resolve its feed key/custom name in getCardSections (src/libs/SearchUIUtils.ts:3642-3667):

      • Look up const card = cardList?.[cardGroup.cardID] ?? nonPersonalAndWorkspaceCardList?.[cardGroup.cardID];.
      • Resolve const feedKey = getCompanyCardFeed((card?.bank ?? cardGroup.bank) as OnyxTypes.CompanyCardFeed);.
      • Look up customFeedName from domainSettings?.companyCardNicknames?.[feedKey] ?? domainSettings?.companyCards?.[feedKey]?.uploadLayoutSettings?.layoutName (and when a single CSV feed is filtered in queryJSON for a generic CSV cardGroup.bank, resolve its feed key from the active feed filter) so the Feed column displays the specific CSV feed name (e.g. CHASE VISA/SMC (Pete R) cards) instead of "CSV cards".
    3. Scope CSV feed filtering to the selected feed's cards:

      • Ensure the feed filter for CSV upload feeds (isCSVUploadFeed) resolves to the cards associated with that specific CSV feed (cards_${fundID}_${feed} / layout mapping) so that switching between CSV feeds isolates the displayed cards, transaction counts, and total spend for each feed.

    What alternative solutions did you explore? (Optional)

    • Filtering cardSections only on the client in getCardSections: Rejected because filtering rows client-side after the Search response arrives would leave the statement footer's total spend and expense count out of sync with the visible rows whenever the backend returns all domain CSV cards.
  16. jayeshmangwani commented on Nov 16, 2026

    @jayeshmangwani
    Contributor

    I've been trying to reproduce this locally, but no luck so far. If I'm still unable to reproduce it today, I'll ask in the #contributor-plus channel if someone else can reproduce it and take it up.

  17. jayeshmangwani commented on Nov 17, 2026

    @jayeshmangwani
    Contributor

    I was able to reproduce this on dev with two NewDot CSV feeds on the same workspace. The feeds are ccupload1 (Feed A) and ccupload2 (Feed B), on fund 22353296.

    Steps

    1. Go to Workspace → Company cards → Add cards → Import transactions from file. Import feedA_chase_oct.csv with name “Feed A”, then assign the cards.
    2. Repeat as a new feed with feedB_amex_oct.csv and layout name “Feed B”.
    3. Go to Spend → Card statements and keep Posted set to Last statement. Select Feed A, then Feed B.

    Result

    The App sends distinct queries for each selection:

    • Feed A: feed:22353296_ccupload1 posted:last-statement (hash 2087499993)
    • Feed B: feed:22353296_ccupload2 posted:last-statement (hash 879581818)

    The Search response is identical for both. Both contain group_1706838286791432 (•1111) and group_6805067643766166 (•1112), and both groups have "bank": "ccupload1". So the ccupload2 filter returns ccupload1 cards, and Feed B’s cards (•2222, •2223) never appear.

    The frontend passes the selected feed through unchanged and doesn’t filter grouped results on the client. This looks like a backend Search API issue with how CSV (ccupload*) feeds are matched.

    feedA_chase_oct.csv
    feedB_amex_oct.csv

  18. jayeshmangwani commented on Nov 17, 2026

    @jayeshmangwani
    Contributor

    I think we need someone from the BE team to look into this, as the issue appears to be coming from the backend. context #105907 (comment).

    🎀 👀 🎀 C+ reviewed

  19. expensify-chore-bot commented on Nov 17, 2026

    @expensify-chore-bot

    Triggered auto assignment to @arosiclair, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  20. arosiclair commented on Nov 18, 2026

    @arosiclair
    Contributor

    @MelvinBot who worked on the feed and posted:last-statement search queries originally?

  21. MelvinBot commented on Nov 18, 2026

    @MelvinBot
    Contributor

    The original App implementation was by Abdelhafidh Belalia (s77rt), with Jack Senyitko (JS00001) and Carlos Martins (luacmartins) reviewing:

    For backend context, I’d start with JS00001—the original Posted-filter PR explicitly routed backend filtering problems to him. I couldn’t verify the original Auth implementation author with the repository access available here.


    view run

  22. expensify-chore-bot commented on Nov 18, 2026

    @expensify-chore-bot

    @arosiclair @jayeshmangwani this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  23. jayeshmangwani commented on Nov 19, 2026

    @jayeshmangwani
    Contributor

    Not overdue. We're still looking for someone from the BE team to investigate this.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions