You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-03-04] [$250] Company card - Company cards page loads each time opening it, error when opened offline #81080
Version Number: 9.3.11-17 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#80734 Email or phone of affected tester (no customers):applausetester+khcategory20@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.1 / Chrome App Component: Workspace Settings
Action Performed:
Precondition:
Workspace has a direct feed in Company cards page.
Go to staging.new.expensify.com
Go to workspace settings.
Go to Company cards.
Go to Categories.
Go to Company cards.
Go offline.
Go to Categories.
Go to Company cards.
Expected Result:
In Step 5, Company cards page will not load each time opening it.
In Step 8, no error will show up when opening Company cards page offline.
Actual Result:
In Step 5, Company cards page loads each time opening it.
In Step 8, error show sup when opening Company cards page offline.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #80734 - "feat: Add frontend error for card feed backend load issue (AFTER REVERT)" by @chrispader (High confidence) Related Issues: None
Recommendation: REVERT
PR #80734 introduced error handling for failing OpenPolicyCompanyCardsFeed and OpenPolicyCompanyCardsPage API requests. However, the implementation has caused two issues:
Page reloads each time: The useEffect in WorkspaceCompanyCardsPage.tsx (lines 57-63) has loadPolicyCompanyCardsPage in its dependency array. This creates unnecessary re-renders because the callback is recreated whenever its dependencies change, triggering the effect to run again.
Offline error persists: When the page loads while offline, error handling sets an error in Onyx via the failureData in openPolicyCompanyCardsPage. However, there is no mechanism to clear this error when the user goes back online and navigates back to the Company cards page.
Labels: Removing DeployBlockerCash is NOT appropriate - this is a frontend bug that requires changes to App to fix.
Added error handling for OpenPolicyCompanyCardsPage and OpenPolicyCompanyCardsFeed API calls
Modified WorkspaceCompanyCardsPage.tsx to wrap API calls in useCallback hooks
Added these callbacks to the dependency arrays of useEffect hooks
Verification
Files affected by the bug:
src/pages/workspace/companyCards/WorkspaceCompanyCardsPage.tsx - The main page component
src/libs/actions/CompanyCards.ts - The action that calls the API
src/pages/workspace/companyCards/WorkspaceCompanyCardsTable/index.tsx - The table component that displays errors
PR #80734 modifies all of these files, specifically:
Lines 45-63 in WorkspaceCompanyCardsPage.tsx show the problematic useEffect with loadPolicyCompanyCardsPage in dependencies
Lines 842-882 in CompanyCards.ts show the openPolicyCompanyCardsPage function that sets errors in failureData
Root Cause
Reload issue: The useEffect dependency on loadPolicyCompanyCardsPage causes the effect to re-run whenever the callback is recreated. This happens every time the component mounts or when any of the callback's dependencies change, causing unnecessary API calls.
Offline error: The error is set in Onyx through failureData when the API call fails offline, but the PR does not include logic to clear this error when:
The user goes back online
The user navigates away and back to the page
The user manually retries
The "Try again" button calls onReloadPage which triggers openPolicyCompanyCardsPage again, but if you're offline, it just sets the same error again.
changed the title [-][$250] Company card - Company cards page loads each time opening it, error when opened offline[/-][+][Due for payment 2026-03-04] [$250] Company card - Company cards page loads each time opening it, error when opened offline[/+]on Feb 25, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.25-13 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@ZhenjaHorbach@kadiealexander The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
Workspace has a direct feed in Company cards page.
Activity
melvin-bot commentedon Jan 31, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #80734
melvin-bot commentedon Jan 31, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Jan 31, 2026
Triggered auto assignment to @kadiealexander (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.github-actions commentedon Jan 31, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
OSBotify commentedon Jan 31, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #80734 - "feat: Add frontend error for card feed backend load issue (AFTER REVERT)" by @chrispader (High confidence)
Related Issues: None
Recommendation: REVERT
PR #80734 introduced error handling for failing
OpenPolicyCompanyCardsFeedandOpenPolicyCompanyCardsPageAPI requests. However, the implementation has caused two issues:Page reloads each time: The
useEffectinWorkspaceCompanyCardsPage.tsx(lines 57-63) hasloadPolicyCompanyCardsPagein its dependency array. This creates unnecessary re-renders because the callback is recreated whenever its dependencies change, triggering the effect to run again.Offline error persists: When the page loads while offline, error handling sets an error in Onyx via the
failureDatainopenPolicyCompanyCardsPage. However, there is no mechanism to clear this error when the user goes back online and navigates back to the Company cards page.Labels: Removing
DeployBlockerCashis NOT appropriate - this is a frontend bug that requires changes to App to fix.Detailed Analysis
Evidence
The bug was introduced in PR #80734 which:
OpenPolicyCompanyCardsPageandOpenPolicyCompanyCardsFeedAPI callsWorkspaceCompanyCardsPage.tsxto wrap API calls inuseCallbackhooksuseEffecthooksVerification
Files affected by the bug:
src/pages/workspace/companyCards/WorkspaceCompanyCardsPage.tsx- The main page componentsrc/libs/actions/CompanyCards.ts- The action that calls the APIsrc/pages/workspace/companyCards/WorkspaceCompanyCardsTable/index.tsx- The table component that displays errorsPR #80734 modifies all of these files, specifically:
WorkspaceCompanyCardsPage.tsxshow the problematicuseEffectwithloadPolicyCompanyCardsPagein dependenciesCompanyCards.tsshow theopenPolicyCompanyCardsPagefunction that sets errors infailureDataRoot Cause
Reload issue: The
useEffectdependency onloadPolicyCompanyCardsPagecauses the effect to re-run whenever the callback is recreated. This happens every time the component mounts or when any of the callback's dependencies change, causing unnecessary API calls.Offline error: The error is set in Onyx through
failureDatawhen the API call fails offline, but the PR does not include logic to clear this error when:The "Try again" button calls
onReloadPagewhich triggersopenPolicyCompanyCardsPageagain, but if you're offline, it just sets the same error again.37 remaining items
[-][$250] Company card - Company cards page loads each time opening it, error when opened offline[/-][+][Due for payment 2026-03-04] [$250] Company card - Company cards page loads each time opening it, error when opened offline[/+]melvin-bot commentedon Feb 25, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Feb 25, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.25-13 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-03-04. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Feb 25, 2026
@ZhenjaHorbach @kadiealexander The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
ZhenjaHorbach commentedon Mar 3, 2026
BugZero Checklist:
It's came from this PR
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-e9b5-abf5-5dfe-ffc799fe35f4kadiealexander commentedon Mar 5, 2026
Payment Summary
garrettmknight commentedon Mar 6, 2026
$250 approved for @ZhenjaHorbach