feat: show connection status and last sync time for bank accounts and cards#93852
Conversation
|
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 |
|
@mkhutornyi 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] |
| // The card should be grouped to a specific domain and such domain already exists in a assignedCardsGrouped | ||
| if (assignedCardsGrouped.some((item) => item.isGroupedCardDomain && item.description === card.domainName) && !isAdminIssuedVirtualCard) { | ||
| const domainGroupIndex = assignedCardsGrouped.findIndex((item) => item.isGroupedCardDomain && item.description === card.domainName); | ||
| const assignedCardsGroupedItem = assignedCardsGrouped.at(domainGroupIndex); | ||
| if (domainGroupIndex >= 0 && assignedCardsGroupedItem) { | ||
| assignedCardsGroupedItem.errors = {...assignedCardsGrouped.at(domainGroupIndex)?.errors, ...card.errors}; | ||
| if ( | ||
| card.fraud === CONST.EXPENSIFY_CARD.FRAUD_TYPES.DOMAIN || | ||
| card.fraud === CONST.EXPENSIFY_CARD.FRAUD_TYPES.INDIVIDUAL || | ||
| Object.keys(assignedCardsGroupedItem.errors).length > 0 | ||
| ) { | ||
| assignedCardsGroupedItem.brickRoadIndicator = CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR; | ||
| } | ||
| } | ||
| continue; | ||
| } |
There was a problem hiding this comment.
Are you able to test this domain flow? I am not sure we should remove this entire domain card grouping logic.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 987214eef9
ℹ️ 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".
ReviewThanks for the PR! The feature looks well-organized, but CI is currently red across 4 checks (typecheck, ESLint, test, checklist) and every failure traces back to this diff. These are all blocking and need to be addressed before review can proceed. 🔴 Must fix (blocking CI)1. Translation keys only added to 2. 3. 4. Nested ternaries (ESLint
Extract these into helper functions or 🟡 Worth a look (logic/design — please verify)Details
Note on pushing a fixI'm not the PR author or an assignee, so I can't push these fixes to the branch myself. The author can knock out items 1–4 to get CI green; if you'd like me to take a pass at them, add me as an assignee and reply with |
|
@mkhutornyi, I am checking all feedback in order. thanks. |
|
I know it's hard to test all cases of bank account and card flow so in Tests steps, please add hardcoded mock Onyx data which has all cases shown in design. It should have 9 bank/card connections below:
|
|
How about adding beta until this feature is fully QA'ed by internal team and QA? So non-beta users still see old UI. |
| brickRoadIndicator={hasReimburserError ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined} | ||
| /> | ||
| {canAccessSubmit2026Features ? ( | ||
| <Hoverable> |
There was a problem hiding this comment.
I am not sure this is the right approach.
Hoverable means trigger action when clicked right?
But when click error message, nothing happens.
I think error message should not be hoverable. @Expensify/design what do you think? Screen.Recording.2026-07-17.at.12.16.19.PM.mov |
@mkhutornyi, we checked this with design here: #93852 (comment) Design team was okay with keeping the error message inside the hover area, with the spacing adjustment:
So I kept the error message inside the hover area and applied the spacing polish based on that feedback. |
The The only extra requirement is for Workflows: it also needs to be tested with a Submit workspace |
Can you share permalink on Wallet page where this beta is used? |
Wallet rows are always shown — the beta only gates the new connection-status / last-sync UI:
|
@mkhutornyi, added this with unit tests. |
|
Regression analysis from AI: 🔴 1. The beta gate is too broad — two undocumented surfaces inherit the feature
Neither of the latter two passes
That button routes to Suggested fix: hoist the gate to a prop (e.g. 🟠 2. "Unlock" in the Invoices section doesn't unlock
That function has zero LOCKED handling — it only calls To be precise about severity: 🟡 3. The "Review" badge disappears for setup-state bank accountsif (connectionStatus) {
badgeText = shouldShowDefaultBadge ? translate('paymentMethodList.defaultPaymentMethod') : undefined;
} else if (isInLockedState) { … } else if (isNeedingAction) { badgeText = translate('common.review'); }
The Plausibly the intent, but it's a deliberate copy/color change that isn't called out anywhere. Worth confirming with design. Also worth a look (not a regression)The translation-key string dispatch is back in if (cardConnectionStatusDisplay.messageKey === 'walletPage.cardStatus.fixConnectionIn' && policyIDForCard) { … }
else if (cardConnectionStatusDisplay.messageKey === 'walletPage.cardStatus.fixConnection') { … }
else if (cardConnectionStatusDisplay.messageKey === 'walletPage.cardStatus.askAdminToFixConnection') { … }This is the same pattern that was flagged for if (cardConnectionStatusDisplay.shouldUseCompanyCardsLink && policyIDForCard) {
cardConnectionMessage = translate('walletPage.cardStatus.fixConnectionIn', `${environmentURL}/${ROUTES.WORKSPACE_COMPANY_CARDS.getRoute(policyIDForCard)}`);
} else if (cardConnectionStatusDisplay.shouldUsePersonalCardFix) {
cardConnectionMessage = translate('walletPage.cardStatus.fixConnection');
} else if (cardConnectionStatusDisplay.messageKey) {
cardConnectionMessage = translate('walletPage.cardStatus.askAdminToFixConnection');
} |
|
Can we try to have this ready by next week? It's been a while since we opened this issue, and we have other issues blocked on this one. |
|
We're almost close. |
|
@mkhutornyi, could you check again when you get a chance? Thanks!
This is intentional based on the issue requirements:
|
|
@codex review |
|
@MelvinBot review |
ReviewSolid PR — cleanly gated behind the One thing worth addressing plus a couple of minor nits: 1. Card status message logic is duplicated (DRY)
Compare the bank flow, which does this cleanly: the util returns keys and 2. Minor
Nothing blocking. The DRY consolidation in #1 is the main one I'd like to see before merge. |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ 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". |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to # as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to # as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to # as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
Something went wrong with pullbear auto assignment. @Gonals all yours |
Regression scanNo regressions found for users without the What I checked (shared paths that run for all users)Verified equivalent (safe):
Recommended QA focus (non-beta accounts)Since the shared components were restructured, please verify these still behave as before for accounts without the beta:
If those four are unchanged with the beta off, this PR is regression-clean on existing behavior. |
|
@Gonals, could you please take a look at this pr when you get a chance. thanks. |


Explanation of Change
This PR adds connection health visibility for bank accounts and cards in the wallet/payment connection surfaces.
For bank accounts, it updates the displayed statuses and related RBR/action copy so users can see whether an account is Active, Incomplete, Pending, Verifying, or Locked, and take the appropriate existing action when needed.
For cards, it adds Active/Inactive connection status, last sync information for direct-feed and personal cards, and the issue-specific RBR/action behavior for broken personal card and company card connections.
Fixed Issues
$ #91300
PROPOSAL:
Tests
Precondition:
walletConnectionStatusbeta account.Card Flows
Settings > Wallet > Cards.ActiveandSynced [relative date].Settings > Wallet > Cards.ActiveandNever synced.Settings > Wallet > Cards.Inactive,Please fix this connection, and theFixbutton.Settings > Wallet > Cards.Inactive,Please fix this connection in company cards, and noFixbutton.Settings > Wallet > Cards.Inactive,Please ask an admin to fix this connection, and noFixbutton orcompany cardslink.Bank Account Flows
Settings > Wallet > Bank accounts.Activewith no RBR/action.Settings > Wallet > Bank accounts.Incomplete,Finish adding bank account, and theFinishbutton.Settings > Wallet > Bank accounts.Pending,Please confirm test transactions, and theConfirmbutton.Settings > Wallet > Bank accounts.Verifyingwith the tooltipWe're reviewing your documentationand no RBR/action.Settings > Wallet > Bank accounts.Locked,This account requires attention, and theUnlockbutton.Workflow Bank Account Flows
Settings > Workspaces > [Workspace] > Workflows.ActiveActivewith no RBR/action.IncompleteIncomplete,Finish adding bank account, andFinish.PendingPending,Please confirm test transactions, andConfirm.VerifyingVerifyingwith the tooltipWe're reviewing your documentationand no RBR/action.LockedLocked,This account requires attention, andUnlock.Offline tests
Same as tests
QA Steps
Same as tests
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Card Flows
One
Two
Three
Four
Five
Bank Account Flows
One
Two
Three
Four
Five
Workflow Bank Account Flows
One
Android: mWeb Chrome
Card Flows
One
Two
Three
Four
Five
Bank Account Flows
One
Two
Three
Four
Five
Workflow Bank Account Flows
One
iOS: Native
Card Flows
One
Two
Three
Four
Five
Bank Account Flows
One
Two
Three
Four
Five
Workflow Bank Account Flows
One
iOS: mWeb Safari
Card Flows
One
Two
Three
Four
Five
Bank Account Flows
One
Two
Three
Four
Five
Workflow Bank Account Flows
One
MacOS: Chrome / Safari
Card Flows
One
Two
Three
Four
Five
Bank Account Flows
One
Two
Three
Four
Screen.Recording.2026-06-20.at.12.06.17.AM.mov
Five
Workflow Bank Account Flows
One