Skip to content

Spend - The feed dropdown filter displays “Expensify Card” for every workspace, making it impossible to identify which card feed belongs to which workspace #97865

Closed

Description

@izarutskaya

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


Version Number: 9.4.50-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
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: @sofiainteriano
Slack conversation (hyperlinked to channel name): #expensify_bugs

Action Performed:

  1. Enable Expensify Cards in several workspaces
  2. Go to Spend >Open the feed dropdown filter under the Bank Reconciliation tab (or any Feed filter across the Expenses, Cash accruals, Card accruals, Card statements tabs as well)
  3. Review the available Expensify Card feeds.

Expected Result:

Each Expensify Card feed should display its associated workspace so users can easily select the correct feed and identify withdrawals by workspace.

Actual Result:

Every workspace’s feed is labeled only as “Expensify Card,” so users cannot distinguish which feed belongs to which workspace.

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

Recording.3918.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit

Activity

  1. added
    Daily
    Bug
    on Aug 5, 2026
  2. MelvinBot commented on Aug 5, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The Spend-section feed dropdown labels every Expensify Card feed with the hardcoded constant CONST.EXPENSIFY_CARD.BANK ("Expensify Card"), and never appends the workspace/policy name.

    Each workspace's feed does get a distinct id (keyed by fundID), so multiple rows appear — but they all carry the identical name, so they're visually indistinguishable.

    The label is set in getExpensifyCardFeedsForDisplay (src/libs/CardFeedUtils.ts:161):

    const name = translate && feedCountry === CONST.TRAVEL.PROGRAM_TRAVEL_US ? translate('search.filters.card.travelInvoicing') : CONST.EXPENSIFY_CARD.BANK;

    This function isn't passed the policies collection, so it has no workspace context to disambiguate with — even though it holds card.fundID. By contrast, commercial company-card feeds route through getCustomOrFormattedFeedName and get a distinct bank/network name, which is why only Expensify Card feeds collide.

    Investigation details & evidence

    Rendering chain (Search "Spend" feed filter):
    FeedSelector → useFilterFeedData → getFeedOptions (SearchUIUtils.ts:5042) — maps each feed to {text: cardFeed.name, value: cardFeed.id}, so the dropdown label is literally cardFeed.name.

    Confidence: High — deterministic code behavior, no production logs needed. Two independent investigations converged on the same root cause.

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

    Make getExpensifyCardFeedsForDisplay policy-aware so each Expensify Card feed row is distinguishable by workspace:

    1. Thread the allPolicies collection into getExpensifyCardFeedsForDisplay (via getCardFeedsForDisplay → getFeedOptions).
    2. For each feed, resolve the owning workspace with policy.policyAccountID === Number(card.fundID) (same mapping already used at CardFeedUtils.ts:272, or reuse getLinkedPolicyName).
    3. Append the workspace name to the label, e.g. Expensify Card • {workspaceName}, when more than one Expensify Card feed exists (keep the plain "Expensify Card" label when there's only one, to avoid needless clutter). Preserve the special-cased Travel Invoicing label.

    What alternative solutions did you explore? (Optional)

    Disambiguating in the UI layer at render time instead of in the util — rejected, since getCardFeedsForDisplay is the shared source used by multiple consumers (search filters, autocomplete, query parsing), so fixing the name at the util keeps all of them consistent.

    Related issues


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/97865) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  3. added
    External
    on Aug 5, 2026
  4. melvin-bot commented on Aug 5, 2026

    @melvin-bot

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

  5. melvin-bot commented on Aug 5, 2026

    @melvin-bot
  6. QichenZhu commented on Aug 5, 2026

    @QichenZhu
    Contributor

    3. Append the workspace name to the label, e.g. Expensify Card • {workspaceName}, when more than one Expensify Card feed exists (keep the plain "Expensify Card" label when there's only one, to avoid needless clutter).

    @Expensify/design, what do you think about @MelvinBot's suggestion above?

  7. MelvinBot commented on Aug 5, 2026

    @MelvinBot
    Contributor

    Deferring the visual call to Expensify/design — a couple of technical notes that may help frame it:

    Two decisions to make:

    1. Always show the workspace, or only when feeds collide? My proposal appended it only when 2+ Expensify Card feeds exist (to avoid clutter in the common single-workspace case). The simpler, more consistent alternative is to always show it. Trade-off is consistency vs. a slightly longer label for the majority of users who have one feed.

    2. Where does the workspace name go? The feed dropdown renders each row as a single text label — MultiSelect's item type only supports text (no subtitle/secondary-line field today). So an inline label like Expensify Card • {workspaceName} works with no component changes, whereas a two-line "primary + secondary" treatment would require extending the list item first.

    The • separator was just a placeholder — happy to match whatever convention design prefers (e.g. Expensify Card (Workspace), or the workspace name alone).

    No code change is needed from me until there's a direction — once design weighs in, reply with @MelvinBot implement this and I'll build it to match.

  8. dannymcclain commented on Aug 5, 2026

    @dannymcclain
    Contributor

    I don't hate it, but I do wonder if it would look a little nicer to just use the item's description. And if we wanted to get really fancy, we could even toss in the workspace avatar? (Is that allowed? Do we do that anywhere else?)

    Image
  9. shawnborton commented on Aug 5, 2026

    @shawnborton
    Contributor

    O la la! I like that third option! But yeah B is even a good improvement.

  10. dannymcclain commented on Aug 5, 2026

    @dannymcclain
    Contributor

    Including the avatar definitely makes the list more scannable. Here's a couple other alts that are semi-based on what we do for members:

    Image
  11. shawnborton commented on Aug 5, 2026

    @shawnborton
    Contributor

    Nice - no strong feelings, the middle version above is nice and consistent with the product shot you are showing.

  12. trjExpensify commented on Aug 5, 2026

    @trjExpensify
    Contributor

    #97279 we have two issues for this, which one are we going to use? 😅

  13. trjExpensify commented on Aug 5, 2026

    @trjExpensify
    Contributor

    Re: avatar, what are we going to do when it's a domain assigned feed? I think B avoids that.

  14. dubielzyk-expensify commented on Aug 6, 2026

    @dubielzyk-expensify
    Contributor

    Definitely prefer one of these two:

    Image

    If we wanna keep one line then I prefer the one with out the avatar:

    Image

    Looks good overall!

  15. joekaufmanexpensify commented on Aug 6, 2026

    @joekaufmanexpensify
    Contributor

    Latest one without the avatar looks good to me. 👍

  16. joekaufmanexpensify commented on Aug 6, 2026

    @joekaufmanexpensify
    Contributor

    We have a draft PR in the other issue for a different design. However, it's just from Melvin, so it will be very quick to move to this new design here if that is our preference.

    Image
  17. dannymcclain commented on Aug 6, 2026

    @dannymcclain
    Contributor

    Cool cool cool. I kinda think we should go with using the description text for these items (the one Joe just posted above) because I'm slightly worried that if we put them next to each other we run the risk of some important bits of the workspace name being truncated.

    i.e. for silly long workspace names like:
    New Logistics Boulder Development
    New Logistics Boulder Development UK
    New Logistics Boulder Development AU
    New Logistics Boulder Development US

    You'd get:
    Image

    Which defeats the purpose of the whole thing. And yes, I know that people should use shorter workspace names, but for some reason it seems like a lot of our customers really like using super long names for everything.

  18. trjExpensify commented on Aug 6, 2026

    @trjExpensify
    Contributor

    I agree. It's still possible in Joe's version to truncate, but more space out the gate and I assume we'll apply the "display full string on hover" if truncated here yeah?

  19. dannymcclain commented on Aug 6, 2026

    @dannymcclain
    Contributor

    Yeah that's what I'm thinking 👍

  20. trjExpensify commented on Aug 6, 2026

    @trjExpensify
    Contributor

    Dope.

  21. joekaufmanexpensify commented on Aug 6, 2026

    @joekaufmanexpensify
    Contributor

    Sounds good. Should we close this issue in favor of the existing one then?

  22. dannymcclain commented on Aug 6, 2026

    @dannymcclain
    Contributor

    Yeah if that one is already taking care of it let's close this!

  23. shawnborton commented on Aug 6, 2026

    @shawnborton
    Contributor

    Makes sense to me too, send it.

  24. joekaufmanexpensify commented on Aug 6, 2026

    @joekaufmanexpensify
    Contributor

    sounds good! closing in favor of #97279

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

Metadata

Metadata

Assignees

Labels

BugDailyExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions