-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix company cards endless skeleton for domain feeds #79937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix company cards endless skeleton for domain feeds #79937
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! 🧪🧪
|
|
@fedirjh Lint is failing, could you merge main again? Btw, how can I "Connect an OAuth Feed in the old Dot"? |
…mproved readability
I think this should be tested internally. |
|
@fedirjh @carlosmiceli follow-up for the reverted PR is up here #80734, so once merged there should be no conflicts anymore |
…cryptedCardNumber for better data handling and update WorkspaceCompanyCardsTable to accommodate this change.
… code in WorkspaceCompanyCardsTable for improved clarity.
…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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we changing this effect to only fire on policyID change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't both openPolicyCompanyCardsPage and openPolicyCompanyCardsFeed depend on domainOrWorkspaceAccountID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
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