Repository navigation
Add Assign new cards option for direct card feeds v2 - #86032
Conversation
- Introduced a new route for refreshing the company card feed connection in ROUTES.ts. - Added corresponding screen identifier in SCREENS.ts. - Updated navigation types to include parameters for the new screen. - Registered the new screen in the modal stack navigator. - Updated linking configuration to support the new route.
- Added new translation keys for 'Assign new cards' and its description in both en.ts and es.ts files.
…CardsSettingsPage - Created a new RefreshCardFeedConnectionPage component to handle the card feed connection process. - Implemented logic to manage navigation based on the current step of the card assignment process. - Updated WorkspaceCompanyCardsSettingsPage to include a menu item for assigning new cards, linking it to the new refresh card feed connection page. - Enhanced the user experience by conditionally displaying the new menu item based on the feed type.
- Updated the AssignCard type to include an isRefreshing property to track the refresh state. - Modified setAssignCardStepAndData function to accept and merge the isRefreshing state. - Implemented logic in RefreshCardFeedConnectionPage to prevent navigation during refresh. - Adjusted WorkspaceCompanyCardsSettingsPage to set the isRefreshing state when initiating card assignment.
- Introduced usePrevious hook to track the previous isRefreshing state. - Updated navigation logic to close the RHP flow only when transitioning from refreshing to not refreshing. - Adjusted useEffect dependencies for better state management.
- Added a title prop to BankConnection and PlaidConnectionStep components for better header customization. - Updated RefreshCardFeedConnectionPage to utilize the new title prop, improving consistency in header titles across components. - Refactored LoadingPage to use the title prop for a unified user experience.
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
- Integrated useCardFeeds hook to manage card feed data and expiration. - Added logic to trigger setFeedRefreshComplete on feed expiration changes during refresh. - Improved state management in RefreshCardFeedConnectionPage for better user experience. - Refactored imports in WorkspaceCompanyCardsSettingsPage for clarity and organization.
- Created comprehensive tests for the RefreshCardFeedConnectionPage component to validate rendering based on different states. - Included tests for loading state, bank connection, and plaid connection steps. - Verified that the correct actions are called on component unmount and when feed expiration updates. - Enhanced test coverage to ensure robust handling of card feed connection scenarios.
- Introduced a new page for verifying company card accounts, enhancing the user flow for account validation. - Updated ROUTES.ts and SCREENS.ts to include the new verification route and screen identifier. - Modified navigation logic in existing components to redirect users to the verification page when account validation is required. - Ensured proper linking configuration for the new route to maintain navigation integrity.
- Introduced seedCardFeedRefresh and startCardFeedRefresh functions to manage the card feed refresh flow. - Updated WorkspaceCompanyCardsVerifyAccountPage to utilize the new refresh logic upon successful account validation. - Refactored WorkspaceCompanyCardsSettingsPage to initiate the card feed refresh process using the new functions. - Improved import organization across multiple components for better clarity and maintainability.
…ngsPage for improved state handling - Updated RefreshCardFeedConnectionPage to enhance the logic for closing the RHP flow and setting feed refresh completion based on state changes. - Refactored useEffect dependencies to prevent unnecessary executions and improve clarity. - Moved the import statement for isUserValidatedSelector in WorkspaceCompanyCardsSettingsPage for better organization.
|
@hungvu193 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] |
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 6eeb121a..5920f8dc 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -5124,6 +5124,7 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
flipAmountSign: 'Betragsvorzeichen umkehren',
importButton: 'Transaktionen importieren',
},
+ assignNewCards: {title: 'Neue Karten zuweisen', description: 'Holen Sie die neuesten Karten zum Zuweisen von Ihrer Bank'},
},
expensifyCard: {
issueAndManageCards: 'Geben Sie Expensify Karten aus und verwalten Sie sie',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index af591fc4..a11ab734 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -5135,6 +5135,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
flipAmountSign: 'Inverser le signe du montant',
importButton: 'Importer des transactions',
},
+ assignNewCards: {title: 'Assigner de nouvelles cartes', description: 'Obtenez les dernières cartes à assigner depuis votre banque'},
},
expensifyCard: {
issueAndManageCards: 'Émettre et gérer vos Cartes Expensify',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index fb28455e..48f268a1 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -5106,6 +5106,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
flipAmountSign: 'Inverti segno importo',
importButton: 'Importa transazioni',
},
+ assignNewCards: {title: 'Assegna nuove carte', description: 'Ottieni le ultime carte da assegnare dalla tua banca'},
},
expensifyCard: {
issueAndManageCards: 'Emetti e gestisci le tue Carte Expensify',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index bf1b0260..c7d1f37f 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -5058,6 +5058,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
flipAmountSign: '金額の符号を反転',
importButton: '取引をインポート',
},
+ assignNewCards: {title: '新しいカードを割り当てる', description: '銀行から割り当て可能な最新のカードを取得します'},
},
expensifyCard: {
issueAndManageCards: 'Expensify カードを発行して管理する',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 1ce90337..cc321dce 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -5097,6 +5097,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
flipAmountSign: 'Teken van bedrag omdraaien',
importButton: 'Transacties importeren',
},
+ assignNewCards: {title: 'Nieuwe kaarten toewijzen', description: 'Haal de nieuwste kaarten op om toe te wijzen vanuit je bank'},
},
expensifyCard: {
issueAndManageCards: 'Geef Expensify Kaarten uit en beheer ze',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 894305d7..688658df 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -5089,6 +5089,7 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
flipAmountSign: 'Odwróć znak kwoty',
importButton: 'Importuj transakcje',
},
+ assignNewCards: {title: 'Przydziel nowe karty', description: 'Pobierz z banku najnowsze karty do przypisania'},
},
expensifyCard: {
issueAndManageCards: 'Wydawaj i zarządzaj Kartami Expensify',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 0ac1a3cd..a8ffd092 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -5089,6 +5089,7 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
flipAmountSign: 'Inverter sinal do valor',
importButton: 'Importar transações',
},
+ assignNewCards: {title: 'Atribuir novos cartões', description: 'Obtenha do seu banco os cartões mais recentes para atribuir'},
},
expensifyCard: {
issueAndManageCards: 'Emita e gerencie seus Cartões Expensify',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index db6b1776..d3a55f6d 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -4978,6 +4978,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
flipAmountSign: '翻转金额符号',
importButton: '导入交易',
},
+ assignNewCards: {title: '分配新卡', description: '从您的银行获取可分配的最新银行卡'},
},
expensifyCard: {
issueAndManageCards: '发放并管理您的 Expensify 卡',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
…nd descriptions for card assignment
…te function and updating imports in related components.
…nectionPageTest and update related test cases to reflect this change.
|
That's really weird, it doesn't work for me Screen.Recording.2026-03-25.at.23.56.33.mov |
…Step check to ensure proper feed handling
|
@hungvu193 Can you retry now ? |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-03-24.at.22.53.09.movScreen.Recording.2026-03-24.at.22.53.34.movScreen.Recording.2026-03-24.at.22.54.21.mov |
|
🎯 @hungvu193, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #86386. |
|
For the QA team ,please note that this issue for Mock Card. We've mentioned here: |
|
Oh we need to resolve the test failed @fedirjh |
…endering for unset currentStep and handle unrecognized currentStep values.
|
All yours @carlosmiceli |
|
🚧 @carlosmiceli 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.3.50-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help Site Review Complete Yes, changes are required. PR #86032 adds an Assign new cards option for direct card feeds, which is not documented in the existing help site articles. Changes made:
Help site PR: #86531 Please review and mark it as "Ready for review" when it looks good. |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.3.50-8 🚀
|


Explanation of Change
Direct card feeds cache their accountList at initial connection. When banks issue new cards, they don't appear in NewDot's assignment UI. This PR adds an "Assign new cards" menu item in the feed settings page (only for direct feeds) that triggers the existing OAuth/Plaid reconnection flow to refresh the card list.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/594594
$ #79383
$ #85676
PROPOSAL:
Tests
Test 1 :
Test 2 :
Offline tests
QA Steps
Test 1 :
Test 2 :
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
CleanShot.2026-03-23.at.17.15.08-converted.mp4
CleanShot.2026-03-23.at.17.15.08.mp4
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari