Fix company cards endless skeleton for domain feeds#79937
Fix company cards endless skeleton for domain feeds#79937carlosmiceli merged 22 commits intoExpensify:mainfrom
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@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] |
|
@fedirjh we have conflicts, probably because of a PR we juuuuuust merged from Chris 🙏 |
|
@carlosmiceli Just updated the PR. Should be ready. |
|
Ready for you @hungvu193 @joekaufmanexpensify ! |
|
@fedirjh conflicts again (I think because we had to revert @chrispader's PR from before) 🙏 |
|
🚧 @joekaufmanexpensify 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! 🧪🧪
|
…h cardNamesToEncryptedCardNumber assertions, ensuring accurate mapping for custom, OAuth, and Plaid feeds. Enhance test coverage for card name derivation and merging logic.
… ensure consistent code style.
|
@hungvu193 I think this is ready to review 💪 |
…e WorkspaceCompanyCardsPage to clarify API call dependencies, enhancing code readability and maintainability.
|
@fedirjh there's lint issues 😅 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-01-29.at.13.46.07.movAndroid: mWeb ChromeScreen.Recording.2026-01-29.at.13.46.07.moviOS: HybridAppScreen.Recording.2026-01-29.at.11.47.10.moviOS: mWeb SafariScreen.Recording.2026-01-29.at.11.25.15.movMacOS: Chrome / SafariScreen.Recording.2026-01-29.at.11.21.36.mov |
|
@fedirjh Can you resolve the conflict ? |
chrispader
left a comment
There was a problem hiding this comment.
LGTM once main is merged, i just have minor questions
| openPolicyCompanyCardsPage(policyID, domainOrWorkspaceAccountID); | ||
| }, [policyID, domainOrWorkspaceAccountID]); | ||
| // eslint-disable-next-line -- The API call is only needed when the policyID changes | ||
| }, [policyID]); |
There was a problem hiding this comment.
Why are we changing this effect to only fire on policyID change?
There was a problem hiding this comment.
There was a race condition between this call and openPolicyCompanyCardsFeed. If openPolicyCompanyCardsPage resolves after openPolicyCompanyCardsFeed, the latter would overwrite the Onyx data.
Since openPolicyCompanyCardsFeed only accepts policyID as a parameter, it should only be fetched when that parameter changes. However, it was also firing when domainOrWorkspaceAccountID changed, which was unnecessary.
There was a problem hiding this comment.
Don't both openPolicyCompanyCardsPage and openPolicyCompanyCardsFeed depend on domainOrWorkspaceAccountID?
There was a problem hiding this comment.
Nope, openPolicyCompanyCardsPage depends only on policyID. https://github.com/fedirjh/ExpensiApp/blob/a43303cc63db12696a0668d1e60fd702eacd8c57/src/libs/actions/CompanyCards.ts#L877-L879
There was a problem hiding this comment.
Ahh, ok got it, thanks!
…mberMapping for clarity Updated the naming convention in the useCompanyCards hook and related components to improve clarity. The variable cardNamesToEncryptedCardNumber has been renamed to cardNamesToEncryptedCardNumberMapping across the codebase, including tests, to better reflect its purpose. This change enhances code readability and consistency.
|
LGTM |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Tested and works well. However, I still think we should make it possible to assign domain feed cards in NewDot as a follow up. That not being possible isn't super ideal...
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.3.11-16 🚀
|
|
@fedirjh @carlosmiceli |
|
@fedirjh @carlosmiceli Any update on this? |
@m-natarajan Yes company card, It's a direct feed cards. |
Fix company cards endless skeleton for domain feeds (cherry picked from commit 3ee0968) (cherry-picked to production by lakchote)
|
Cancelling CP to prod |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.3.12-1 🚀
|
Explanation of Change
Fixed Issues
$ #79383
$ https://github.com/Expensify/Expensify/issues/587676
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 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
CleanShot.2026-01-20.at.01.14.22.mp4
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari