Skip to content

[Due for payment 2026-04-14] [$250] Remove travel invoicing card from home page #87108

Closed

Description

@stitesExpensify

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: v9.3.51-10
Reproducible in staging?: y
Reproducible in production?: y
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: @stitesExpensify
Slack conversation (hyperlinked to channel name): https://expensify.slack.com/archives/C05S5EV2JTX/p1775233675327189

Action Performed:

  1. Log into an account provisioned for Travel Invoicing
  2. Go to the home page

Expected Result:

You should not see the travel invoicing card and amount remaining

Actual Result:

You do see the travel invoicing card and amount remaining

Image

Workaround:

Just a visual improvement

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

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @blimpich
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022040106116858298040
  • Upwork Job ID: 2040106116858298040
  • Last Price Increase: 2026-04-03

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 3, 2026
  2. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Apr 3, 2026
  3. melvin-bot commented on Apr 3, 2026

    @melvin-bot

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

  4. changed the title [-]Remove travel invoicing card from home page[/-] [+][$250] Remove travel invoicing card from home page[/+] on Apr 3, 2026
  5. melvin-bot commented on Apr 3, 2026

    @melvin-bot
  6. trasnake87 commented on Apr 3, 2026

    @trasnake87
    Contributor

    Proposal

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

    The travel invoicing card (and its remaining balance) is displayed on the home page in the "Assigned cards" widget, but it should not be shown there.

    What is the root cause of that problem?

    In getDisplayableExpensifyCards, travel cards are explicitly excluded from the "combo card" grouping logic via !isTravelCard(card) at line 1468, which causes them to always pass the filter at line 1471-1472 ("Always show non-combo cards"). There is no logic to exclude travel invoicing cards from the home page widget entirely.

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

    We should filter out travel invoicing cards in getDisplayableExpensifyCards so they never appear in the home page assigned cards section. The simplest fix is to add !isTravelCard(card) to the initial filter on line 1461:

    // src/libs/CardUtils.ts, line 1461
    // Before:
    const activeExpensifyCards = Object.values(activeCards).filter((card) => isExpensifyCard(card) && !isExpiredCard(card) && card.cardName !== CONST.COMPANY_CARDS.CARD_NAME.CASH);
    
    // After:
    const activeExpensifyCards = Object.values(activeCards).filter((card) => isExpensifyCard(card) && !isExpiredCard(card) && card.cardName !== CONST.COMPANY_CARDS.CARD_NAME.CASH && !isTravelCard(card));

    This removes travel invoicing cards from the displayable cards list entirely, so they won't appear in the home page widget. The travel card CVV functionality in the Wallet page is unaffected since it uses a separate getTravelInvoicingCard utility from TravelInvoicingUtils.

  7. self-assigned this
    on Apr 3, 2026
  8. trasnake87 commented on Apr 3, 2026

    @trasnake87
    Contributor

    Contributor details
    Your Expensify account email: trasnake87@gmail.com
    Upwork Profile Link: https://www.upwork.com/freelancers/~010f770315ab181656

  9. melvin-bot commented on Apr 3, 2026

    @melvin-bot

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

  10. blimpich commented on Apr 3, 2026

    @blimpich
    Contributor

    @jjcoffee I'll write the PR for this. This is difficult for contributors to actually test without the proper setup. Requires using a backend engineers ngrok.

  11. MelvinBot commented on Apr 3, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The getDisplayableExpensifyCards() function in CardUtils.ts:1455-1483 does not filter out travel invoicing cards. Travel cards have bank === 'Expensify Card' so they pass the isExpensifyCard check, and at line 1468 they are explicitly excluded from combo-card deduplication (!isTravelCard(card) makes isComboCard = false), which causes them to always return true from the filter. The AssignedCardsSection on the home page calls this function directly and renders every card it returns, including travel invoicing cards.

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

    Add && !isTravelCard(card) to the filter at CardUtils.ts:1461 so travel cards are excluded from the displayable Expensify cards list. This is consistent with how other parts of the codebase already handle travel cards — both PaymentMethodList.tsx:326-329 and WorkspaceMemberDetailsPage.tsx:121 explicitly filter out travel cards from their card lists.

    What alternative solutions did you explore? (Optional)

    The filter could be applied in AssignedCardsSection/index.tsx instead, but placing it in getDisplayableExpensifyCards() is the better choice since this function is the centralized utility for determining which Expensify cards to display, and travel invoicing cards should not be shown in any context that uses this function.


    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.

  12. Ltbltbltbltb commented on Apr 3, 2026

    @Ltbltbltbltb

    Proposal

    Problem: Accounts provisioned for Travel Invoicing see a travel invoicing card with "amount remaining" on the home page, which should not be displayed there.

    Root Cause: src/libs/CardUtils.ts — getDisplayableExpensifyCards() (line ~1457). This function filters cards for general display but does NOT exclude travel invoicing cards (those with nameValuePairs.feedCountry === CONST.TRAVEL.PROGRAM_TRAVEL_US). The filter correctly excludes expired cards and CASH cards, but travel cards pass through because the only isTravelCard() call in the function is used to control domain-deduplication logic (isComboCard calculation), not to remove them from the result. Since !isComboCard is true for travel cards, they always pass into the returned array. AssignedCardsSection/index.tsx (the home page component) then renders every card in this array unconditionally, with no beta flag check.

    Fix: In src/libs/CardUtils.ts, add !isTravelCard(card) to the activeExpensifyCards filter inside getDisplayableExpensifyCards():

    - const activeExpensifyCards = Object.values(activeCards).filter(
    -     (card) => isExpensifyCard(card) && !isExpiredCard(card) && card.cardName !== CONST.COMPANY_CARDS.CARD_NAME.CASH
    - );
    + const activeExpensifyCards = Object.values(activeCards).filter(
    +     (card) => isExpensifyCard(card) && !isExpiredCard(card) && card.cardName !== CONST.COMPANY_CARDS.CARD_NAME.CASH && !isTravelCard(card)
    + );

    This matches the pattern in src/pages/settings/Wallet/PaymentMethodList.tsx (line ~325) which explicitly skips travel cards (if (isTravelCard(card)) { continue; }) before they reach the general card list, showing them only in a dedicated section guarded by isBetaEnabled(CONST.BETAS.TRAVEL_INVOICING).

    Why this differs from existing proposals: First proposal — addresses the most likely root cause directly. The fix is in the shared utility getDisplayableExpensifyCards() rather than in the component itself, which prevents the same card from leaking into any other consumer of this utility in the future.

    Alternatives considered: (1) Filter travel cards inside AssignedCardsSection/index.tsx using isTravelCard() on displayableCards — rejected because it patches the symptom at the call site rather than fixing the utility function that should never return travel cards for general display. (2) Add a beta flag guard (isBetaEnabled(CONST.BETAS.TRAVEL_INVOICING)) in AssignedCardsSection to hide the whole section — rejected because AssignedCardsSection also shows regular Expensify cards unrelated to travel; gating the entire section on the travel beta would break display of non-travel cards.

    Contributor Details
    Field Value
    Contributor email lucastrba@gmail.com
    Upwork Profile https://www.upwork.com/freelancers/~01d016059c6701ebaa
  13. 9 remaining items

  14. added
    InternalRequires API changes or must be handled by Expensify staff
    and removed
    ExternalAdded to denote the issue can be worked on by a contributor
    on Apr 3, 2026
  15. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Apr 7, 2026
  16. changed the title [-][$250] Remove travel invoicing card from home page[/-] [+][Due for payment 2026-04-14] [$250] Remove travel invoicing card from home page[/+] on Apr 7, 2026
  17. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  18. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.53-7 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 2026-04-14. 🎊

  19. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    @blimpich 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]

  20. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  21. removed
    Awaiting PaymentAuto-added when associated PR is deployed to production
    on Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.InternalRequires API changes or must be handled by Expensify staffWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions