[Payment due @dmkt9] Show a needs re-auth message for card scrape codes 438/532 (NewDot) - #97893
Conversation
Co-authored-by: Carlos Alvarez <cead22@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Carlos Alvarez <cead22@users.noreply.github.com>
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
… and test names Co-authored-by: Carlos Alvarez <cead22@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Carlos Alvarez <cead22@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Carlos Alvarez <cead22@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
🦜 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 aae951ee87c..a0210223467 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -2612,7 +2612,7 @@ const translations: TranslationDeepObject<typeof en> = {
fixConnection: 'Bitte beheben Sie diese Verbindung',
fixConnectionIn: (companyCardsRoute: string) => `Bitte beheben Sie diese Verbindung in <a href="${companyCardsRoute}">Firmenkarten</a>`,
askAdminToFixConnection: 'Bitte bitten Sie eine(n) Admin, diese Verbindung zu reparieren',
- reconnectBank: 'Bitte verbinden Sie Ihre Bank erneut',
+ reconnectBank: 'Ihre Bankverbindung muss erneut authentifiziert werden',
},
bankAccountStatus: {
active: 'Aktiv',
diff --git a/src/languages/el.ts b/src/languages/el.ts
index 5bd72da3382..0460dda9ee2 100644
--- a/src/languages/el.ts
+++ b/src/languages/el.ts
@@ -2672,7 +2672,7 @@ const translations: TranslationDeepObject<typeof en> = {
fixConnection: 'Παρακαλούμε διορθώστε αυτήν τη σύνδεση',
fixConnectionIn: (companyCardsRoute: string) => `Παρακαλούμε διορθώστε αυτήν τη σύνδεση στις <a href="${companyCardsRoute}">εταιρικές κάρτες</a>`,
askAdminToFixConnection: 'Παρακαλούμε ζητήστε από έναν διαχειριστή να διορθώσει αυτήν τη σύνδεση',
- reconnectBank: 'Παρακαλούμε επανασυνδέστε την τράπεζά σας',
+ reconnectBank: 'Η σύνδεσή σας με την τράπεζα χρειάζεται επαναπιστοποίηση',
},
bankAccountStatus: {
active: 'Ενεργό',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 4909744831a..dc8f409bbc3 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -2617,7 +2617,7 @@ const translations: TranslationDeepObject<typeof en> = {
fixConnection: 'Veuillez corriger cette connexion',
fixConnectionIn: (companyCardsRoute: string) => `Veuillez corriger cette connexion dans <a href="${companyCardsRoute}">cartes d’entreprise</a>`,
askAdminToFixConnection: 'Veuillez demander à un administrateur de corriger cette connexion',
- reconnectBank: 'Veuillez reconnecter votre banque',
+ reconnectBank: 'Votre connexion bancaire doit être réauthentifiée',
},
bankAccountStatus: {
active: 'Actif',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 707dc47bf52..f8d7d8acfd7 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -2604,7 +2604,7 @@ const translations: TranslationDeepObject<typeof en> = {
fixConnection: 'Sistema questa connessione per favore',
fixConnectionIn: (companyCardsRoute: string) => `Correggi questa connessione in <a href="${companyCardsRoute}">carte aziendali</a>`,
askAdminToFixConnection: 'Chiedi a un amministratore di correggere questa connessione',
- reconnectBank: 'Ricollega la tua banca',
+ reconnectBank: 'La connessione con la tua banca deve essere nuovamente autenticata',
},
bankAccountStatus: {
active: 'Attiva',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 0693fa38476..4e423f5d695 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -2581,7 +2581,7 @@ const translations: TranslationDeepObject<typeof en> = {
fixConnection: 'この接続を修正してください',
fixConnectionIn: (companyCardsRoute: string) => `この接続を<a href="${companyCardsRoute}">会社カード</a>で修正してください`,
askAdminToFixConnection: '管理者にこの接続の修正を依頼してください',
- reconnectBank: '銀行を再接続してください',
+ reconnectBank: '銀行連携の再認証が必要です',
},
bankAccountStatus: {
active: 'アクティブ',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index ce120e8613f..4ebb9de7b80 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -2606,7 +2606,7 @@ const translations: TranslationDeepObject<typeof en> = {
fixConnection: 'Repareer deze verbinding alsjeblieft',
fixConnectionIn: (companyCardsRoute: string) => `Repareer deze verbinding in <a href="${companyCardsRoute}">bedrijfskaarten</a>`,
askAdminToFixConnection: 'Vraag een/beheerder om deze verbinding te herstellen',
- reconnectBank: 'Verbind je bank opnieuw',
+ reconnectBank: 'Je bankverbinding moet opnieuw worden geverifieerd',
},
bankAccountStatus: {
active: 'Actief',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index b0cdb204eb2..a7bb5c4df23 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -2597,7 +2597,7 @@ const translations: TranslationDeepObject<typeof en> = {
fixConnection: 'Napraw to połączenie',
fixConnectionIn: (companyCardsRoute: string) => `Napraw to połączenie w <a href="${companyCardsRoute}">firmowe karty</a>`,
askAdminToFixConnection: 'Poproś administratora o naprawienie tego połączenia',
- reconnectBank: 'Połącz ponownie swój bank',
+ reconnectBank: 'Twoje połączenie z bankiem wymaga ponownego uwierzytelnienia',
},
bankAccountStatus: {
active: 'Aktywne',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 67b33a44bfc..b66f3105c7d 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -2598,7 +2598,7 @@ const translations: TranslationDeepObject<typeof en> = {
fixConnection: 'Corrija esta conexão',
fixConnectionIn: (companyCardsRoute: string) => `Corrija esta conexão em <a href="${companyCardsRoute}">cartões corporativos</a>`,
askAdminToFixConnection: 'Peça para um administrador corrigir essa conexão',
- reconnectBank: 'Por favor, reconecte seu banco',
+ reconnectBank: 'Sua conexão bancária precisa ser autenticada novamente',
},
bankAccountStatus: {
active: 'Ativo',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index d484434e624..7cc369ee35d 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -2514,7 +2514,7 @@ const translations: TranslationDeepObject<typeof en> = {
fixConnection: '请修复此连接',
fixConnectionIn: (companyCardsRoute: string) => `请在<a href="${companyCardsRoute}">公司卡</a>中修复此连接`,
askAdminToFixConnection: '请联系管理员修复此连接',
- reconnectBank: '请重新连接您的银行',
+ reconnectBank: '您的银行连接需要重新验证',
},
bankAccountStatus: {
active: '活跃',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| BROKEN_CONNECTION_IGNORED_STATUSES: brokenConnectionScrapeStatuses, | ||
|
|
||
| // Scrape result codes where the connection is broken because the user needs to re-authenticate with their bank | ||
| REAUTH_SCRAPE_STATUSES: reauthScrapeStatuses, |
There was a problem hiding this comment.
| REAUTH_SCRAPE_STATUSES: reauthScrapeStatuses, | |
| REAUTH_SCRAPE_STATUSES: reauthScrapeStatuses, | |
| // Guard against an invalid scrapeMinDate: date-fns `format` throws `RangeError: Invalid time value` | ||
| // when `parseISO` can't parse the value, which crashes the whole page (e.g. for a broken/never-synced card) |
There was a problem hiding this comment.
| // Guard against an invalid scrapeMinDate: date-fns `format` throws `RangeError: Invalid time value` | |
| // when `parseISO` can't parse the value, which crashes the whole page (e.g. for a broken/never-synced card) | |
| // Guard against an invalid scrapeMinDate, since`format` throws `RangeError: Invalid time value` | |
| // when `parseISO` can't parse the value |
|
🎯 @dmkt9, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| const shouldShowMessage = isCardBroken || shouldShowRBR || isCardInactiveStatus; | ||
| const shouldUsePersonalCardFix = shouldShowMessage && isPersonalCardStatus; | ||
| const shouldUseCompanyCardsLink = shouldShowMessage && !isPersonalCardStatus && isAdminForCardPolicy && !!policyID; | ||
| const shouldUseReauthMessage = shouldShowMessage && !!isCardNeedsReauth && isPersonalCardStatus; |
There was a problem hiding this comment.
Should the isPersonalCardStatus instead be part of doesCardConnectionNeedReauth()?
There was a problem hiding this comment.
No because re-authentication also applies to company cards. Though not sure if that really answers your question
There was a problem hiding this comment.
Nah, that's fine. It answers it. Thanks!
This comment has been minimized.
This comment has been minimized.
|
Updated |
Co-authored-by: Carlos Alvarez <cead22@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
There's nothing to fix by pushing code here — all code checks are green. The only failing check is It just means the PR has no independent reviewer approval yet. It will clear once an independent Expensify employee approves the PR (the author and assignees don't count). Everything else passed — tests, So no push is needed from me; the PR is just waiting on a review approval. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 tgolen 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/tgolen in version: 9.4.53-0 🚀
|
|
🤖 I reviewed the changes in this PR against the help site files under Conclusion: No help site changes are required. This PR is a UI copy refinement — for personal (Wallet) cards whose The relevant help article,
The docs describe the broken-connection behavior at a flow level and don't enumerate exact per-scrape-code error strings, so the new message variant introduces nothing the article needs to reflect. Documenting one specific error-string variant would set a precedent of listing every code's copy, which isn't how these articles are written. I did not create a draft help site PR since none is needed. If you'd prefer to add an explicit note about the re-auth message anyway, reply and I'll draft one. |
|
@cead22 could you QA this one, please? |


Explanation of Change
Card scrape codes 438 (account refresh required) and 532 (session expired) both mean the bank connection needs to be re-authenticated by the user, as opposed to a generic broken connection. On the Wallet cards surface, NewDot currently shows the same generic "Please fix this connection" copy for these as for any other broken code.
This PR adds a distinct "needs re-auth" message for these two codes on the card-level Wallet surface
Fixed Issues
PROPOSAL: see slack (internal only)
Tests
I manually updated a company card I had on dev with
lastScrapeResult = 532I then manually updated it with

fundID = 0to turn it into a personal cardOffline tests
Same as tests
QA Steps
lastScrapeResult = 532andfundID != 0using logs and database queries if needed (ping @cead22 if you need help) and confirm the error message looks like the first screenshot abovelastScrapeResult = 532andfundID = 0using logs and database queries if needed (ping @cead22 if you need help) and confirm the error message looks like the second screenshot abovePR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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