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 2026-04-14] [$250] Remove travel invoicing card from home page #87108
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:constactiveExpensifyCards=Object.values(activeCards).filter((card)=>isExpensifyCard(card)&&!isExpiredCard(card)&&card.cardName!==CONST.COMPANY_CARDS.CARD_NAME.CASH);// After:constactiveExpensifyCards=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.
@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.
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.
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():
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.
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
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:
@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]
Activity
melvin-bot commentedon Apr 3, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (
External)[-]Remove travel invoicing card from home page[/-][+][$250] Remove travel invoicing card from home page[/+]melvin-bot commentedon Apr 3, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022040106116858298040
trasnake87 commentedon Apr 3, 2026
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
getDisplayableExpensifyCardsso 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: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
getTravelInvoicingCardutility fromTravelInvoicingUtils.trasnake87 commentedon Apr 3, 2026
Contributor details
Your Expensify account email: trasnake87@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~010f770315ab181656
melvin-bot commentedon Apr 3, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
blimpich commentedon Apr 3, 2026
@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.
MelvinBot commentedon Apr 3, 2026
Proposal
What is the root cause of that problem?
The
getDisplayableExpensifyCards()function inCardUtils.ts:1455-1483does not filter out travel invoicing cards. Travel cards havebank === 'Expensify Card'so they pass theisExpensifyCardcheck, and at line 1468 they are explicitly excluded from combo-card deduplication (!isTravelCard(card)makesisComboCard = false), which causes them to always returntruefrom the filter. TheAssignedCardsSectionon 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 atCardUtils.ts:1461so travel cards are excluded from the displayable Expensify cards list. This is consistent with how other parts of the codebase already handle travel cards — bothPaymentMethodList.tsx:326-329andWorkspaceMemberDetailsPage.tsx:121explicitly filter out travel cards from their card lists.What alternative solutions did you explore? (Optional)
The filter could be applied in
AssignedCardsSection/index.tsxinstead, but placing it ingetDisplayableExpensifyCards()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 thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.Ltbltbltbltb commentedon Apr 3, 2026
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 withnameValuePairs.feedCountry === CONST.TRAVEL.PROGRAM_TRAVEL_US). The filter correctly excludes expired cards and CASH cards, but travel cards pass through because the onlyisTravelCard()call in the function is used to control domain-deduplication logic (isComboCardcalculation), not to remove them from the result. Since!isComboCardistruefor 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 theactiveExpensifyCardsfilter insidegetDisplayableExpensifyCards():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 byisBetaEnabled(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.tsxusingisTravelCard()ondisplayableCards— 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)) inAssignedCardsSectionto hide the whole section — rejected becauseAssignedCardsSectionalso shows regular Expensify cards unrelated to travel; gating the entire section on the travel beta would break display of non-travel cards.Contributor Details
9 remaining items
[-][$250] Remove travel invoicing card from home page[/-][+][Due for payment 2026-04-14] [$250] Remove travel invoicing card from home page[/+]melvin-bot commentedon Apr 7, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Apr 7, 2026
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. 🎊
melvin-bot commentedon Apr 7, 2026
@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]
melvin-bot commentedon Apr 7, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)