Fix travel card display in Assigned Cards#85282
Conversation
…gation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@thesahindia Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@thesahindia @heyjennahay please ignore the ping |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8cf4691aa8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Travel cards are now identified by feedCountry === TRAVEL_US instead of the deprecated isTravelCard NVP. They are skipped in the assignedCardsGrouped loop since the dedicated travelCardGrouped section already renders them with the correct title, icon, and navigation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fallback path (when only company OR personal cards exist, not both) was returning companyCardsGrouped without travelCardGrouped, so the Travel CVV entry was silently dropped. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
ikevin127
left a comment
There was a problem hiding this comment.
Code-wise LGTM, if you require manual testing - I'm assuming you have a test email account for your personal ngrok that I should use which will have a Travel card assigned ? Let me know and I'll perform the tests 👐
ℹ️ This PR should probably have [NoQA] in the title.
|
@roryabraham Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Nope, no test email account because I can't create fake travel cards in dev. Or at least I'm not aware of a way to do it. So just looking for code review and then we can QA this once it's deployed to staging. |
Reviewer Checklist
|
| return [...companyCards, ...personalCards]; | ||
| } | ||
| return [...companyCardsGrouped, ...personalCardsGrouped]; | ||
| return [...companyCardsGrouped, ...travelCardGrouped, ...personalCardsGrouped]; |
There was a problem hiding this comment.
Should the travelCard be last in the list?
|
🚧 @rlinoz has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.3.39-0 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.3.39-3 🚀
|
Explanation of Change
Two bugs preventing the Travel CVV entry from showing in the wallet's Assigned Cards section:
The travel card was appearing as a duplicate "Expensify Card" in the assigned cards loop because it used the deprecated
isTravelCardNVP for detection (which is no longer set by the backend). Switched tofeedCountry === TRAVEL_USand now skip travel cards from that loop entirely — the dedicatedtravelCardGroupedsection already handles them correctly.The
travelCardGroupedentries were only included when both company AND personal cards existed. The fallback return path (companyCardsGrouped.length > 0 && personalCardsGrouped.length > 0being false) droppedtravelCardGroupedentirely. This was the actual root cause — most users only have one card type, so the Travel CVV entry was silently omitted.Fixed Issues
$ #85281
Tests
travelInvoicingbeta enabledOffline tests
QA Steps
Same as tests, on staging with a travel card account.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari