Distinguish re-authentication scrape codes (438/532) in RTER violation copy - #98622
Draft
tgolen wants to merge 1 commit into
Draft
Distinguish re-authentication scrape codes (438/532) in RTER violation copy#98622tgolen wants to merge 1 commit into
tgolen wants to merge 1 commit into
Conversation
Contributor
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: The diff is too large to include in this comment (69KB), so I've created a gist for you: 📋 View the translation diff here 📋 Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
The RTER (Receipt Transaction Expense Reconciliation) violation collapses every non-
200card scrape result into one generic "broken bank connection" message. About 70% of affected users hit one of two re-authentication codes —438(ACCOUNTREFRESH) and532(SESSION_EXPIRED) — where the connection is not broken; the user or admin just needs to reconnect/re-consent with the bank. The generic copy makes it sound like an Expensify failure and drives avoidable support volume, especially for personal cards where the end user can fix it themselves.The backend (Auth) will start emitting a new
rterType,brokenCardConnectionReauth, for codes 438/532 (see the linked Auth PR). This PR teaches NewDot to recognize that newrterTypeand render re-authentication copy instead of "broken bank connection".This change is forward-compatible and inert until Auth emits the new value — no backend sends
brokenCardConnectionReauthyet, so none of the new branches run and current behavior is unchanged. It ships first so clients are ready before Auth starts sending the code.What changed:
CONST.RTER_VIOLATION_TYPES.BROKEN_CARD_CONNECTION_REAUTH.violations.rtercopy (personal-card and company/admin/member variants) across all language files, plus two banner strings (adminReauthConnectionError,memberReauthConnectionError) for the status-bar surface.TransactionUtils(isBrokenConnectionViolation,hasPendingRTERViolation) and inBrokenConnectionDescription/MoneyRequestHeader, so the existing banner and header still render — now with re-auth wording.Fixed Issues
For https://github.com/Expensify/Expensify/issues/669079
PROPOSAL:
Tests
Because no backend emits
brokenCardConnectionReauthyet, use Debug mode to inject the violation and verify the copy renders:Account > Troubleshootand enable Debug mode.{ "type": "violation", "name": "rter", "data": { "rterType": "brokenCardConnectionReauth", "isAdmin": true } }"isAdmin": falseand verify the member variant: "Bank connection needs re-authentication. Ask an admin to reconnect to match receipt.""data": { "rterType": "brokenCardConnectionReauth", "cardID": <a personal card's id (fundID = 0)> }and verify the personal-card variant: "Can't auto-match receipt because your bank connection needs re-authentication. Reconnect to match the receipt."rterTypeback tobrokenCardConnectionand verify the existing "Bank connection broken…" copy is unchanged (no regression).Offline tests
The violation copy is rendered from local Onyx data with no network dependency. With the device offline, repeat the Tests steps above and verify the re-authentication copy still renders correctly.
QA Steps
Same as tests (the Debug-mode steps above can be run on staging). The new copy is otherwise dormant until the linked Auth change is deployed, at which point cards with scrape codes 438/532 surface it in the normal flow.
PR 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