feat: Add frontend error for card feed backend load issue (AFTER REVERT)#80734
Conversation
This reverts commit 52e940a.
|
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 |
|
The error reported by @MarioExpensify has been fixed in the latest commit: Screen.Recording.2026-01-28.at.13.02.03.movThe issue was that the error was set in the |
|
@dukenv0307 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] |
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.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9637762e93
ℹ️ 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".
| feedErrorReloadAction = onReloadFeed; | ||
| } | ||
|
|
||
| const isLoadingFeed = (!feedName && isInitiallyLoadingFeeds) || !isPolicyLoaded || isLoadingOnyxValue(lastSelectedFeedMetadata) || !!selectedFeedStatus?.isLoading; |
There was a problem hiding this comment.
Avoid hiding cached cards when read is dropped offline
isLoadingFeed now depends on selectedFeedStatus?.isLoading, which is set optimistically by openPolicyCompanyCardsFeed. Because API.read requests are discarded when the app is offline, that flag never clears in offline mode, so showCards stays false and the cached cards list is hidden indefinitely until a reconnect triggers another read. This regression will show a blank page for offline users who already have cached cards. Consider skipping the selectedFeedStatus.isLoading gate when isOffline, or using a finallyData/offline guard so the loading flag doesn’t stick.
Useful? React with 👍 / 👎.
|
Should we show the error page in offline mode? Currently, we don't show the error on the Expensify card page, so if we show the error in company card page, it can cause the inconsistency Screen.Recording.2026-01-28.at.23.07.21.mov |
|
cc @Expensify/design - does the magnifying glass look a little big here? I feel like we use it elsewhere and I recall seeing @dannymcclain provide specific dimensions for it, in case we want to make sure this one is using the same size too. |
|
Bug:
Screen.Recording.2026-01-28.at.23.07.52.mov |
@shawnborton @Expensify/design sorry the screenshots for this PR are outdated. This is actually how it looks like, as this has been fixed in the previous PR already:
|
fixed! Thanks for the catch! 🙌🏼 |
I gave the same feedback as Shawn in this other PR and we ended up fixing it. Why isn't it applied here? This was where we landed then: |
It is applied here actually. This is how it looks like right now:
|
|
@dukenv0307 feel free to finish review on this! 🙌🏼 |
|
on it now |
|
@chrispader Is it expected to show the error in offline mode? I mentioned this issue here
|
|
Wonderful, thanks for confirming! |
@dukenv0307 addressed your comment. This error will not show in offline mode, we'll just show what data we have in store locally. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-01-29.at.10.27.03.movAndroid: mWeb ChromeScreen.Recording.2026-01-29.at.10.23.35.moviOS: HybridAppScreen.Recording.2026-01-29.at.10.27.54.moviOS: mWeb SafariScreen.Recording.2026-01-29.at.10.22.24.movMacOS: Chrome / SafariScreen.Recording.2026-01-29.at.10.21.31.mov |
|
🎯 @dukenv0307, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #80845. |
|
✋ 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 🚀
|
|
This PR failing because of the issue |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.3.12-1 🚀
|
| const isLoadingFeed = (!feedName && isInitiallyLoadingFeeds) || !isPolicyLoaded || isLoadingOnyxValue(lastSelectedFeedMetadata); | ||
|
|
||
| const areWorkspaceCardFeedsLoading = !!workspaceCardFeedsStatus?.[domainOrWorkspaceAccountID]?.isLoading; | ||
| const workspaceCardFeedsErrors = workspaceCardFeedsStatus?.[domainOrWorkspaceAccountID]?.errors; |





@carlosmiceli @joekaufmanexpensify
Explanation of Change
Adds a frontend fix for failing backend
OpenPolicyCompanyCardsFeedandOpenPolicyCompanyCardsPageAPI requests. This PR adds logic that if any of the requests fails, will add an error to the workspace and or card feed and show it appropriately in the UI.Fixed Issues
https://github.com/Expensify/Expensify/issues/587676
$ https://github.com/Expensify/Expensify/issues/594856
PROPOSAL:
Tests
Preparation:
Test case 1:
Make sure that the new error UI is shown
Test case 2:
Make sure that the new error UI is shown
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
MacOS: Chrome / Safari
OpenPolicyCompanyCardsPageerror (all card feeds affected):Screen.Recording.2026-01-20.at.12.36.26.mov
OpenPolicyCompanyCardsFeederror (only one specific feed affected):Screen.Recording.2026-01-20.at.12.36.01.mov