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-28] [Card Rules] - Hide deactivated cards from rule summary and selection lists #87669
When a virtual card used by a spend rule is deactivated, the spend rules UI can still surface that deactivated card in the rule summary and/or selection lists.
Proposed behavior
We should update the spend rules experience so deactivated cards are no longer surfaced in these places.
Possible approaches:
Hide the entire rule when it only contains deactivated cards.
Hide deactivated cards from the rule summary and selection lists.
changed the title [-]Spend rules - Hide deactivated cards from rule summary and selection lists[/-][+][Card Rules] - Hide deactivated cards from rule summary and selection lists[/+]on Apr 10, 2026
The rule summary in SpendRulesSection.tsx and the card menu in SpendRulePageBase.tsx build card display text by iterating over formValues.cardIDs from the rule's filter AST. Although cardsList is fetched with the filterInactiveCards selector (which excludes deactivated/closed cards), when a card ID is missing from cardsList, the code falls back to displaying the raw numeric card ID instead of hiding the entry.
The card selection list (SpendRuleCardPage.tsx) is already correct — it uses the filterInactiveCards selector and only shows active cards.
What changes do you think we should make in order to solve the problem?
Filter out deactivated card IDs (those not present in the active cardsList) before building the display summaries:
SpendRulesSection.tsx — In the createdRules mapping (~line 127), filter formValues.cardIDs to only include IDs present in cardsList before passing them to getTruncatedSpendRuleSummary. Also filter formValues.cardIDs the same way before passing to getSelectedCardsSharedCurrency. If a rule ends up with zero active cards after filtering, skip rendering it (return undefined so it's filtered out).
SpendRulePageBase.tsx — In getCardsMenuTitle (~line 109), apply the same filter: skip card IDs not found in cardsList rather than falling back to displaying the raw ID.
This approach keeps the rules data intact on the backend (no data loss) while simply hiding deactivated cards from the UI, consistent with how the card selection list already works.
What alternative solutions did you explore? (Optional)
Showing a "deactivated" indicator instead of hiding — This adds UI complexity without clear user benefit, since deactivated cards can't be used.
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.
changed the title [-][Card Rules] - Hide deactivated cards from rule summary and selection lists[/-][+][Due for payment 2026-04-28] [Card Rules] - Hide deactivated cards from rule summary and selection lists[/+]on Apr 21, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.60-22 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Activity
[-]Spend rules - Hide deactivated cards from rule summary and selection lists[/-][+][Card Rules] - Hide deactivated cards from rule summary and selection lists[/+]luacmartins commentedon Apr 10, 2026
@MelvinBot work on a proposal for this
MelvinBot commentedon Apr 10, 2026
Proposal
What is the root cause of that problem?
The rule summary in
SpendRulesSection.tsxand the card menu inSpendRulePageBase.tsxbuild card display text by iterating overformValues.cardIDsfrom the rule's filter AST. AlthoughcardsListis fetched with thefilterInactiveCardsselector (which excludes deactivated/closed cards), when a card ID is missing fromcardsList, the code falls back to displaying the raw numeric card ID instead of hiding the entry.Specifically in
SpendRulesSection.tsx:127-139:The same pattern exists in
SpendRulePageBase.tsx:109-122.The card selection list (
SpendRuleCardPage.tsx) is already correct — it uses thefilterInactiveCardsselector and only shows active cards.What changes do you think we should make in order to solve the problem?
Filter out deactivated card IDs (those not present in the active
cardsList) before building the display summaries:SpendRulesSection.tsx— In thecreatedRulesmapping (~line 127), filterformValues.cardIDsto only include IDs present incardsListbefore passing them togetTruncatedSpendRuleSummary. Also filterformValues.cardIDsthe same way before passing togetSelectedCardsSharedCurrency. If a rule ends up with zero active cards after filtering, skip rendering it (returnundefinedso it's filtered out).SpendRulePageBase.tsx— IngetCardsMenuTitle(~line 109), apply the same filter: skip card IDs not found incardsListrather than falling back to displaying the raw ID.This approach keeps the rules data intact on the backend (no data loss) while simply hiding deactivated cards from the UI, consistent with how the card selection list already works.
What alternative solutions did you explore? (Optional)
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.luacmartins commentedon Apr 10, 2026
@MelvinBot implement this
MelvinBot commentedon Apr 10, 2026
🤖 Draft PR created: #87679
Please mark it as "Ready for review" when it is ready for review.
[-][Card Rules] - Hide deactivated cards from rule summary and selection lists[/-][+][Due for payment 2026-04-28] [Card Rules] - Hide deactivated cards from rule summary and selection lists[/+]melvin-bot commentedon Apr 21, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Apr 21, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.60-22 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-28. 🎊
For reference, here are some details about the assignees on this issue: