Add Assign new cards option for direct card feeds#84313
Add Assign new cards option for direct card feeds#84313carlosmiceli merged 33 commits intoExpensify:mainfrom
Assign new cards option for direct card feeds#84313Conversation
Direct card feeds cache their accountList at initial connection, so newly issued cards don't appear in the assignment UI. This adds a menu item in the feed settings page (only for direct/OAuth/Plaid feeds) that triggers the existing bank reconnection flow to refresh the card list.
Create a dedicated RefreshCardFeedConnectionPage that reuses BankConnection/PlaidConnectionStep with an isRefreshFlow prop. When isRefreshFlow is true, BankConnection always opens the bank auth and dismisses the modal after re-auth instead of proceeding to the assign card flow.
|
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 |
Enhance user experience by adding success messages for refreshed bank connections in both English and Spanish translations. Update the RefreshCardFeedConnectionPage and related components to handle the new success state, ensuring proper navigation and user feedback upon successful re-authentication.
…on component Update the BankConnection component to ensure proper navigation when a feed connection is broken. The logic for handling broken connections has been streamlined to avoid redundancy, improving code clarity and maintainability. Additionally, adjust header titles to reflect the correct context based on the refresh connection flow.
|
@MelvinBot Please generateTranslations for this PR. |
|
All translations for this PR are already present in both
The Spanish translations look accurate. No missing translations were found — all |
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.
|
Introduce a new test file for the RefreshCardFeedConnection component, implementing various test cases to ensure correct rendering and functionality based on different connection steps. The tests cover loading states, bank connection rendering, and plaid connection handling, enhancing overall test coverage and reliability.
|
@carlosmiceli Could you please trigger the translation script for this PR: #84313 (comment) |
|
@MelvinBot Review this PR |
Code Review — PR #84313Overall the PR is well-structured and follows established patterns (mirrors 1. Split
|
Updated the logic for handling broken feed connections in the BankConnection component. The update ensures that the `updateBrokenConnection` function is called appropriately during both the assign card flow and the refresh connection flow, improving the reliability of the connection handling. Additionally, modified the header title logic to reflect the current flow more accurately.
|
@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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1329a71f3a
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@joekaufmanexpensify @carlosmiceli I have updated the logic in 3cf060b . This will enforce refreshing the feed regardless of the auth expiration time. |
Great! That's actually a much better solution, I agree, consistent behavior. Thanks Fedi! |
Nice! Just to make sure I am following, that means:
Is that right @fedirjh ? |
@joekaufmanexpensify No. You'll be prompted to auth as well, after which we will also try to get new cards. |
|
@fedirjh I see. Is that because once we've pulled the list, auth is required to get a new list from the bank, even if the token hasn't expired for assigning cards we already have? |
|
@joekaufmanexpensify I think the UX that Fedi implemented is correct: just because you're authenticated, we can't fetch any new cards after the authentication flow is complete. If you're authenticated from minute 0 to 15, if there would be a new card to assign in the feed from minute 5, we can't see it. Each fetch needs the authentication to happen again. @fedirjh wanna ask Melvin to fix tests and/or merge main? |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Sounds good, change is fine from my perspective then 👍
|
🚧 @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.40-0 🚀
|
|
🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.3.40-0 🚀
|
|
Deploy Blocker #85676 was identified to be related to this PR. |
|
Deploy Blocker ##85693 was identified to be related to this PR. |
|
@fedirjh we had to revert this PR because it caused some blockers that couldn't be quickly fixed. Mainly, we should reimplement this feature but include:
|
|
🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.3.41-0 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Direct card feeds cache their
accountListat 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.Changes:
MenuIteminWorkspaceCompanyCardsSettingsPage, conditionally rendered for direct feeds onlyRefreshCardFeedConnectionPageroute and component that reusesBankConnection/PlaidConnectionStepisRefreshFlowprop toBankConnectionso it always opens bank auth and dismisses the modal after re-auth (instead of proceeding to assign card steps)Fixed Issues
$ https://github.com/Expensify/Expensify/issues/594594
$ #79383
PROPOSAL:
Tests
Offline tests
QA Steps
// 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
CleanShot.2026-03-05.at.21.24.01.mp4
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari