Repository navigation
Enhance card mapping to include assigned cards for OAuth feeds - #82179
Conversation
|
🚧 @trjExpensify has triggered a test Expensify/App build. You can view the workflow run here. |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
… cardList is stale or missing
This comment has been minimized.
This comment has been minimized.
|
@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] |
|
@QichenZhu 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] |
|
@MelvinBot could you please review this PR? |
|
@fedirjh I think it'd be good to have a video example in this PR's description (web and mobile), what do you think? |
🔍 PR ReviewSummary: This PR adds a defensive fallback in Code Changes
AssessmentCorrectness: The approach is sound. The No mutation/race concerns: The mapping object is created fresh each render (line 59) and all modifications happen synchronously before it's returned. The Complexity: The loop is O(assignedCards × mappingEntries) due to Test quality: Comprehensive and well-structured. The tests cover the important edge cases including normalization behavior with special characters. Minor Observations
Overall this looks good to me. The change is minimal, defensive, and well-tested. |
@fedirjh seems like this is something we could also fix, what do you think? |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good from product
…yCardEntries function and updating related mappings
|
@carlosmiceli @hungvu193 Ready for another review.
Yep, but reproducing the behaviour ( |
|
Joe took the product review. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-02-13.at.10.47.40.movAndroid: mWeb ChromeScreen.Recording.2026-02-13.at.10.51.58.moviOS: HybridAppScreen.Recording.2026-02-13.at.10.41.47.moviOS: mWeb SafariScreen.Recording.2026-02-13.at.10.42.29.movMacOS: Chrome / SafariScreen.Recording.2026-02-13.at.10.32.27.mov |
|
🎯 @hungvu193, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #82349. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @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.19-0 🚀
|
|
Hi @fedirjh Could you please share steps for QA team? |
@izarutskaya Here is it, the steps in chrome
// Auto-detect and add test card
const c1 = Onyx.connect({
key: 'policy_',
waitForCollectionCallback: true,
callback: (policies) => {
Onyx.disconnect(c1);
const policy = Object.values(policies || {}).find(p => p?.areCompanyCardsEnabled);
if (!policy) { console.log('❌ No policy with cards'); return; }
const wsID = policy.workspaceAccountID;
const domainKey = `sharedNVP_private_domain_member_${wsID}`;
const c2 = Onyx.connect({
key: domainKey,
callback: (domain) => {
Onyx.disconnect(c2);
if (!domain) { console.log('❌ No domain data'); return; }
const oAuthDetails = domain?.settings?.oAuthAccountDetails || {};
const [feed, details] = Object.entries(oAuthDetails).find(([_, d]) => d?.accountList?.length) || [];
if (!feed) { console.log('❌ No OAuth feed found'); return; }
const list = details.accountList;
console.log('Feed:', feed, '| Current cards:', list.length);
Onyx.merge(domainKey, {
settings: { oAuthAccountDetails: { [feed]: { accountList: [...list, `Test Card - ${Date.now()}`] }}}
});
console.log('✅ Added test card. Check the page to verify.');
}
});
}
});
CleanShot.2026-02-13.at.22.15.50.mp4 |
|
@fedirjh We need to check only Web, right? |
|
@izarutskaya yes |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.19-5 🚀
|
Explanation of Change
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/599155
PROPOSAL:
Tests
Set up Amex feed in new Dot
Assign all the cards within the feed
Open the Amex feed dashboard and update the card list
Fetch the feed again in newDot and verify the assigned cards are displayed correctly, and you get new unassigned cards as well
Verify that no errors appear in the JS console
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 stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari