Skip to content

[Payment due @nyomanjyotisa] Fix personal card reconnection for error 434 - #101045

Merged
amyevans merged 2 commits into
mainfrom
cm-fix-personal-card-434
Sep 17, 2026
Merged

amyevans merged 2 commits into
mainfrom
cm-fix-personal-card-434

Conversation

@carlosmiceli

@carlosmiceli carlosmiceli commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

434 (account not found) is ignored when evaluating company card feed health, but the same shared predicate hid a personal card's existing broken-connection message and Fix card action. Treat 434 as actionable for personal cards while preserving the company-feed behavior.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/678013
PROPOSAL: https://github.com/Expensify/Expensify/issues/678013#issuecomment-5656167702

Tests

Screen.Recording.2026-09-14.at.1.11.19.PM.mov
  • Verify that no errors appear in the JS console

Offline tests

N/A. This changes locally derived card state only. The existing Fix card button remains disabled offline.

QA Steps

Same as in the video above, you need a card with a 434 error (I will QA it, but logged in as the user by pointing dev to prod and looks correct):

Screenshot 2026-09-14 at 6 28 02 PM Screenshot 2026-09-14 at 6 27 53 PM
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified that there are no console errors related to this PR
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines, and is either coming verbatim from figma or has been approved by marketing.
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by these changes
  • If any new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

N/A - shared state change

Android: mWeb Chrome

N/A - shared state change

iOS: Native

N/A - shared state change

iOS: mWeb Safari

N/A - shared state change

MacOS: Chrome / Safari

Verified locally with the seeded personal Mock Bank card with scrape result 434.

@carlosmiceli
carlosmiceli requested review from a team as code owners September 13, 2026 21:11
@melvin-bot
melvin-bot Bot requested a review from dylanexpensify September 13, 2026 21:11
@melvin-bot
melvin-bot Bot requested review from nyomanjyotisa and removed request for a team September 13, 2026 21:11
@melvin-bot

melvin-bot Bot commented Sep 13, 2026

Copy link
Copy Markdown

@nyomanjyotisa 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]

@melvin-bot
melvin-bot Bot requested review from a team and joekaufmanexpensify and removed request for a team September 13, 2026 21:11
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-09-13T21:11:20.438868Z aa32af7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

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.

Files with missing lines Coverage Δ
src/CONST/index.ts 91.52% <ø> (ø)
src/libs/CardUtils.ts 85.73% <100.00%> (+0.03%) ⬆️
...libs/actions/OnyxDerived/configs/cardFeedErrors.ts 97.87% <100.00%> (ø)
.../pages/settings/Wallet/PersonalCardDetailsPage.tsx 0.00% <0.00%> (ø)
...CardConnectionPage/useFixPersonalCardConnection.ts 0.00% <0.00%> (ø)
src/pages/settings/Wallet/PaymentMethodList.tsx 42.24% <0.00%> (-0.37%) ⬇️
... and 12 files with indirect coverage changes

@nyomanjyotisa

nyomanjyotisa commented Sep 14, 2026

Copy link
Copy Markdown
Member

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Local testing with a Mock Bank card and seeded scrape result 434. The mWeb recordings show offline behavior and reconnect navigation, not completed bank authentication.

Android: HybridApp
Android-pr101045-redo.mp4
Android: mWeb Chrome
Android-mWeb-pr101045-reconnect.mp4
iOS: HybridApp
ios-pr101045.mp4
iOS: mWeb Safari
ios-mWeb-pr101045.mp4
MacOS: Chrome / Safari
Chrome-pr101045-user.mp4

@joekaufmanexpensify joekaufmanexpensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good for product.

@carlosmiceli carlosmiceli added the InternalQA This pull request required internal QA label Sep 14, 2026
@carlosmiceli

Copy link
Copy Markdown
Contributor Author

@nyomanjyotisa this is ready to review.

@nyomanjyotisa

Copy link
Copy Markdown
Member

@carlosmiceli Could you add the local and QA test steps?

@nyomanjyotisa

Copy link
Copy Markdown
Member

@joekaufmanexpensify @carlosmiceli I noticed a pre-existing offline inconsistency for the same personal card: Wallet’s Fix button opens the offline screen, while Fix card in card details is disabled.

Should both be disabled offline, or open the offline screen? If this qualifies under the C+ small-fix process, I can handle it in a separate PR.

ios-pr101045-offline-inconsistency.mp4

@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

I would vote to do nothing. One could argue it is a minor UX inconsistency, however the end result is the same, and it may just be we standardized on a different pattern on wallet vs card details. Thanks for raising though!

@carlosmiceli

Copy link
Copy Markdown
Contributor Author

@KJ21-ENG I will do the QA because it's easier to test having internal access, the steps are like in the video (but you need a card with a 434 error): Wallet -> See card with error and Fix button -> Open card and also see the Fix button displayed.

@dylanexpensify
dylanexpensify removed their request for review September 16, 2026 16:16

@nyomanjyotisa nyomanjyotisa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@melvin-bot melvin-bot Bot changed the title Fix personal card reconnection for error 434 [Payment due @nyomanjyotisa] Fix personal card reconnection for error 434 Sep 16, 2026
@melvin-bot

melvin-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

🎯 @nyomanjyotisa, thanks for reviewing and testing this PR! 🎉

A payment issue will be created for your review once this PR is deployed to production.
E/E issue linked to the PR - https://www.github.com/Expensify/Expensify/issues/678013.

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.

@amyevans amyevans left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @carlosmiceli!

@amyevans
amyevans merged commit 899fc6c into main Sep 17, 2026
45 of 48 checks passed
@amyevans
amyevans deleted the cm-fix-personal-card-434 branch September 17, 2026 18:31
@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

Copy link
Copy Markdown
Contributor

🚧 amyevans has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/amyevans in version: 9.4.82-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 cancelled 🔪
🍎 iOS 🍎 cancelled 🔪

@MelvinBot

MelvinBot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Yes — one help site article needed an update, and I opened a draft PR for it: Docs updates for E/A#101045 Add changed card number as broken connection cause

Why: this PR makes the "account not found" scrape result actionable for personal cards, so such a card now shows the broken connection error plus Fix card on the Card details page instead of quietly stopping imports. Manage-Personal-Cards.md listed four causes of a broken personal card connection, and none of them covered this one — so a member hitting it wouldn't find their situation described.

What the docs PR changes (one file, docs/articles/new-expensify/connect-credit-cards/Manage-Personal-Cards.md):

  • Why a personal card connection can break — adds Your card number changed, or the account is no longer active at your bank.
  • FAQ — adds What should I do if my card number changed at the bank?, covering the red dot in Wallet, Fix card on Card details, and what to do if the account is closed for good.
  • Metadata — adds card number changed and account not found to keywords.

The wording matches how Fix-a-Broken-Company-Card-Feed-Connection.md already describes the same error for company cards ("Account not found / Card number changed"), so the two articles stay consistent.

What I checked and what I left alone
  • Applied docs/HELPSITE_NAMING_CONVENTIONS.md, docs/HELP_AUTHORING_GUIDELINES.md, and docs/TEMPLATE.md: single # title plus # FAQ, only ## sections, new FAQ heading is a question, UI labels bolded in Sentence case, relative cross-link placed outside procedural steps.
  • Verified labels against the live New Expensify web UI — Account, Wallet, Cards, Add personal card were read back from the running app — and against src/languages/en.ts for Fix card, Update card, Card details, and Transaction start date.
  • No change needed for the existing How to fix a broken personal card connection steps or the 90-day reminder FAQ — this PR doesn't alter either. The pending-sync suppression you added for personal cards already matched isCardConnectionBroken behavior, which the article already describes.
  • Connect-Personal-Cards.md and the company card articles need no edits — company feed health is unchanged by this PR.
  • npm run spell-changed passes on the edited article.

@carlosmiceli, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review


view run · view recording

@amyevans

Copy link
Copy Markdown
Contributor

QA ✅

2026-09-18_10-55-38

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/amyevans in version: 9.4.86-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/amyevans in version: 9.4.89-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/luacmartins in version: 9.4.89-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 failure ❌

Bundle Size Analysis (Sentry):

@melvin-bot

melvin-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown

🤖 Payment issue created: #101624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

InternalQA This pull request required internal QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants