Fix Company Cards error UI not shown with invalid workspace account ID#81978
Conversation
When a workspace is created optimistically with failing network requests, workspaceAccountID is undefined and falls back to 0. Onyx silently discards writes to collection keys with member ID '0', so the error data from openPolicyCompanyCardsPage never reaches the UI. Guard loadPolicyCompanyCardsPage to skip the API call when domainOrWorkspaceAccountID is DEFAULT_NUMBER_ID, and synthesize the error locally in the table component so the error BlockingView renders. Fixes Expensify#81115
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
trjExpensify
left a comment
There was a problem hiding this comment.
Follow-up PR to a BYOC bulk assign bug fix 👍
Reviewer Checklist
Screenshots/Videos |
Ollyws
left a comment
There was a problem hiding this comment.
LGTM, but me might want to add some explanatory comments.
|
Agree with @Ollyws, could we add some comments? |
|
✋ 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.21-0 🚀
|
|
Hi @MobileMage, QA team failed this PR with an original issue 1771377821485.bandicam_2026-02-18_04-19-43-834.mp4 |
|
@IuliiaHerets I think the expected behaviour is to not show when the user is offline as outlined in the original implementation of this feature #80734 (comment) |
|
Yes, @chrispader confirms that's expected 👍 |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.21-4 🚀
|





Explanation of Change
When a workspace is created optimistically with failing network requests, the
workspaceAccountIDis undefined and falls back to0(DEFAULT_NUMBER_ID). Onyx silently discards writes to collection keys with member ID'0', so the error data fromopenPolicyCompanyCardsPagenever reaches the UI.This fix:
loadPolicyCompanyCardsPageto skip the API call whendomainOrWorkspaceAccountIDisDEFAULT_NUMBER_IDWorkspaceCompanyCardsTableso the errorBlockingViewrenders correctlyFixed Issues
$ #81115
PROPOSAL: #81115 (comment)
Tests
Offline tests
QA Steps
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
81115-a.mp4
Android: mWeb Chrome
iOS: Native
81115-i.mp4
iOS: mWeb Safari
81115-wi.mp4
MacOS: Chrome / Safari
81115.mp4