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-02-17] Showing company cards upgrade page in RHP when trying to assign cards #80799
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review
Version Number: Reproducible in staging?: Needs Reproduction (Blocked, Credentials N/A for wells forgo) Reproducible in production?: Needs Reproduction If this was caught during regression testing, add the test name, ID and link from BrowserStack: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@joekaufmanexpensify Slack conversation (hyperlinked to channel name): #Expensify Bugs
Action Performed:
Connect a direct (not Plaid) company card feed on a collect workspace.
Wait the period of time before reauthentication is required to assign cards (usually 15 min).
Tap to assign a card.
Expected Result:
You're prompted to reauthenticate with the bank AND RHP on web shows page about popup window opening.
Actual Result:
You're prompted to reauthenticate with the bank but RHP shows company card upgrade page. We should only show the upgrade page if you try to add a second card feed on a collect workspace, not to assign a card.
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
🚨 Edited by proposal-police: This proposal was edited at 2026-01-28 21:55:27 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On a Collect workspace that already has a direct (non-Plaid) company card feed connected, when a user tries to assign a card that requires reauthentication (after the ~15 min expiry), the RHP shows the company card upgrade page instead of the bank reauthentication flow. The upgrade page should only appear when trying to add a second card feed, not when assigning or reauthenticating a card on an existing feed.
What is the root cause of that problem?
The BankConnection component serves two distinct flows: adding a new card feed and assigning a card (which may require reauthenticating an existing feed). The component distinguishes between these flows using the feed prop — when feed is present, the user is in the assign card flow, triggered through BrokenCardFeedConnectionPage to reauthenticate an existing feed rather than add a new one.
The problem is that the isBlockedToAddNewFeeds guard is applied unconditionally across the entire component, without considering which flow is active. This manifests in three places.
First, a useEffect in both platform files fires a hard redirect to the upgrade page whenever isBlockedToAddNewFeeds is true, regardless of whether the user is assigning a card or adding a feed:
Second, the main effect in the web version includes isBlockedToAddNewFeeds as an early-return condition, which prevents the bank connection window from opening even during the assign card flow:
Third, the rendering logic uses isBlockedToAddNewFeeds to decide whether to show the bank connection UI or a loading spinner. On web, getContent() falls through to the ActivityIndicator when isBlockedToAddNewFeeds is true:
In all three locations, the feed prop — which clearly signals the assign card flow — is never consulted. So a Collect workspace user reauthenticating an existing card feed gets treated identically to someone trying to add a second feed, and is incorrectly bounced to the upgrade page.
What changes do you think we should make in order to solve the problem?
The fix is to make every isBlockedToAddNewFeeds check feed-aware. When the feed prop is present, the user is reauthenticating an existing feed and the upgrade gate should be skipped entirely. The concept is simple: replace isBlockedToAddNewFeeds with isBlockedToAddNewFeeds && !feed wherever it acts as a gate, so that the blocking logic only applies to the "add new feed" flow.
In src/pages/workspace/companyCards/BankConnection/index.tsx (web):
Please re-state the problem that we are trying to solve in this issue.
When trying to assign a company card after reauthentication is required (usually after 15 minutes), the RHP incorrectly shows the company cards upgrade page instead of allowing the card assignment flow to proceed. The upgrade page should only be shown when trying to add a second card feed on a Collect workspace, not when assigning a card from an existing feed.
What is the root cause of that problem?
The BankConnection component checks isBlockedToAddNewFeeds to determine if it should navigate to the upgrade page, but this check runs regardless of whether the user is adding a new feed or assigning a card. When isBlockedToAddNewFeeds is true (Collect plan with existing feed), the component navigates to the upgrade page even during the assign card flow, which should be allowed.
The component can distinguish between these flows using the feed prop - when feed exists, it's the assign card flow; when feed is undefined, it's the add new feed flow.
What changes do you think we should make in order to solve the problem?
Update the BankConnection component (both web and native versions) to only check isBlockedToAddNewFeeds when adding a new feed, not when assigning a card. The component already receives a feed prop that distinguishes between flows
When feed exists, it's the assign card flow; when feed is undefined, it's the add new feed flow.
Changes in BankConnection/index.tsx:
Update the upgrade page navigation useEffect to skip when assigning a card:
useEffect(()=>{// Only show upgrade page when adding a new feed, not when assigning a cardif(!policyID||!isBlockedToAddNewFeeds||feed){return;}Navigation.navigate(ROUTES.WORKSPACE_UPGRADE.getRoute(...),{forceReplace: true,});},[isBlockedToAddNewFeeds,policyID,feed]);
Update the main bank connection useEffect to only block when adding a new feed:
useEffect(()=>{// Only block when adding a new feed, not when assigning a cardconstshouldBlock=(!url&&!isPlaid)||isOffline||isNewFeedHasError||isAllFeedsResultLoading||(!feed&&isBlockedToAddNewFeeds);if(shouldBlock){return;}// ... rest of the flow},[...]);
Update getContent to allow bank connection UI when assigning a card:
// Show pending bank view when not blocked (or when assigning a card)if(!isPlaid&&!isAllFeedsResultLoading&&(!isBlockedToAddNewFeeds||feed)){return<BlockingView ... />;}
Changes in BankConnection/index.native.tsx (native):
Similar changes to the native version:
Update upgrade page navigation useEffect to skip when feed exists
@hungvu193 There's probably no direct way to connect direct feed (not plaid) if we don't have access to it, But we'll ping joekaufmanexpensify in PR to run ad-hoc build and test the changing with real account.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
[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: N/A
[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.
changed the title [-]Showing company cards upgrade page in RHP when trying to assign cards[/-][+][Due for payment 2026-02-17] Showing company cards upgrade page in RHP when trying to assign cards[/+]on Mar 10, 2026
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review
Activity
melvin-bot commentedon Jan 28, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 (
External)melvin-bot commentedon Jan 28, 2026
Triggered auto assignment to @brianlee-expensify (
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.MobileMage commentedon Jan 28, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-01-28 21:55:27 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On a Collect workspace that already has a direct (non-Plaid) company card feed connected, when a user tries to assign a card that requires reauthentication (after the ~15 min expiry), the RHP shows the company card upgrade page instead of the bank reauthentication flow. The upgrade page should only appear when trying to add a second card feed, not when assigning or reauthenticating a card on an existing feed.
What is the root cause of that problem?
The
BankConnectioncomponent serves two distinct flows: adding a new card feed and assigning a card (which may require reauthenticating an existing feed). The component distinguishes between these flows using thefeedprop — whenfeedis present, the user is in the assign card flow, triggered throughBrokenCardFeedConnectionPageto reauthenticate an existing feed rather than add a new one.The problem is that the
isBlockedToAddNewFeedsguard is applied unconditionally across the entire component, without considering which flow is active. This manifests in three places.First, a
useEffectin both platform files fires a hard redirect to the upgrade page wheneverisBlockedToAddNewFeedsis true, regardless of whether the user is assigning a card or adding a feed:App/src/pages/workspace/companyCards/BankConnection/index.tsx
Lines 85 to 92 in 6a49844
App/src/pages/workspace/companyCards/BankConnection/index.native.tsx
Lines 76 to 83 in 6a49844
Second, the main effect in the web version includes
isBlockedToAddNewFeedsas an early-return condition, which prevents the bank connection window from opening even during the assign card flow:App/src/pages/workspace/companyCards/BankConnection/index.tsx
Line 119 in 6a49844
Third, the rendering logic uses
isBlockedToAddNewFeedsto decide whether to show the bank connection UI or a loading spinner. On web,getContent()falls through to theActivityIndicatorwhenisBlockedToAddNewFeedsis true:App/src/pages/workspace/companyCards/BankConnection/index.tsx
Line 204 in 6a49844
On native, the same flag controls whether the
WebViewrenders or theActivityIndicatorshows:App/src/pages/workspace/companyCards/BankConnection/index.native.tsx
Line 172 in 6a49844
App/src/pages/workspace/companyCards/BankConnection/index.native.tsx
Line 188 in 6a49844
In all three locations, the
feedprop — which clearly signals the assign card flow — is never consulted. So a Collect workspace user reauthenticating an existing card feed gets treated identically to someone trying to add a second feed, and is incorrectly bounced to the upgrade page.What changes do you think we should make in order to solve the problem?
The fix is to make every
isBlockedToAddNewFeedscheck feed-aware. When thefeedprop is present, the user is reauthenticating an existing feed and the upgrade gate should be skipped entirely. The concept is simple: replaceisBlockedToAddNewFeedswithisBlockedToAddNewFeeds && !feedwherever it acts as a gate, so that the blocking logic only applies to the "add new feed" flow.In
src/pages/workspace/companyCards/BankConnection/index.tsx(web):useEffect(() => { - if (!policyID || !isBlockedToAddNewFeeds) { + if (!policyID || !isBlockedToAddNewFeeds || feed) { return; } ... -}, [isBlockedToAddNewFeeds, policyID]); +}, [isBlockedToAddNewFeeds, policyID, feed]); ... useEffect(() => { - if ((!url && !isPlaid) || isOffline || isNewFeedHasError || isAllFeedsResultLoading || isBlockedToAddNewFeeds) { + if ((!url && !isPlaid) || isOffline || isNewFeedHasError || isAllFeedsResultLoading || (isBlockedToAddNewFeeds && !feed)) { return; } ... - if (!isPlaid && !isAllFeedsResultLoading && !isBlockedToAddNewFeeds) { + if (!isPlaid && !isAllFeedsResultLoading && (!isBlockedToAddNewFeeds || !!feed)) {In
src/pages/workspace/companyCards/BankConnection/index.native.tsx(native):useEffect(() => { - if (!policyID || !isBlockedToAddNewFeeds) { + if (!policyID || !isBlockedToAddNewFeeds || feed) { return; } ... -}, [isBlockedToAddNewFeeds, policyID]); +}, [isBlockedToAddNewFeeds, policyID, feed]); ... -{!!url && !isConnectionCompleted && !isPlaid && !isNewFeedHasError && !isAllFeedsResultLoading && !isBlockedToAddNewFeeds && ( +{!!url && !isConnectionCompleted && !isPlaid && !isNewFeedHasError && !isAllFeedsResultLoading && (!isBlockedToAddNewFeeds || !!feed) && ( ... -{(isAllFeedsResultLoading || isBlockedToAddNewFeeds || isConnectionCompleted || isPlaid) && !isNewFeedHasError && ( +{(isAllFeedsResultLoading || (isBlockedToAddNewFeeds && !feed) || isConnectionCompleted || isPlaid) && !isNewFeedHasError && (What alternative solutions did you explore? (Optional)
samranahm commentedon Jan 28, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When trying to assign a company card after reauthentication is required (usually after 15 minutes), the RHP incorrectly shows the company cards upgrade page instead of allowing the card assignment flow to proceed. The upgrade page should only be shown when trying to add a second card feed on a Collect workspace, not when assigning a card from an existing feed.
What is the root cause of that problem?
The
BankConnectioncomponent checksisBlockedToAddNewFeedsto determine if it should navigate to the upgrade page, but this check runs regardless of whether the user is adding a new feed or assigning a card. WhenisBlockedToAddNewFeedsis true (Collect plan with existing feed), the component navigates to the upgrade page even during the assign card flow, which should be allowed.The component can distinguish between these flows using the
feedprop - whenfeedexists, it's the assign card flow; whenfeedis undefined, it's the add new feed flow.What changes do you think we should make in order to solve the problem?
Update the
BankConnectioncomponent (both web and native versions) to only checkisBlockedToAddNewFeedswhen adding a new feed, not when assigning a card. The component already receives afeedprop that distinguishes between flowsWhen
feedexists, it's the assign card flow; whenfeedis undefined, it's the add new feed flow.Changes in
BankConnection/index.tsx:useEffectto skip when assigning a card:useEffectto only block when adding a new feed:getContentto allow bank connection UI when assigning a card:Changes in
BankConnection/index.native.tsx(native):Similar changes to the native version:
useEffectto skip whenfeedexists(!isBlockedToAddNewFeeds || feed)(!feed && isBlockedToAddNewFeeds)This ensures that Collect plan workspaces can still assign cards from their existing feed, while preventing them from adding additional feeds.
What alternative solutions did you explore? (Optional)
None
hungvu193 commentedon Jan 29, 2026
@MobileMage @samranahm How do you guys connect the direct feed (not plaid) ?
samranahm commentedon Jan 29, 2026
@hungvu193 There's probably no direct way to connect direct feed (not plaid) if we don't have access to it, But we'll ping joekaufmanexpensify in PR to run ad-hoc build and test the changing with real account.
hungvu193 commentedon Jan 30, 2026
I see. Thanks I'll add some onyx mock data to test the proposals.
hungvu193 commentedon Feb 2, 2026
Still evaluating proposals
17 remaining items
melvin-bot commentedon Mar 5, 2026
This issue has not been updated in over 15 days. @yuwenmemon, @hungvu193, @MobileMage, @brianlee-expensify eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
hungvu193 commentedon Mar 6, 2026
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: https://github.com/Expensify/App/pull/74557/changes#r2893403502
[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: N/A
[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.
[BugZero] link to QA - https://github.com/Expensify/Expensify/issues/609874
Regression Test Proposal
Test:
Do we agree 👍 or 👎
hungvu193 commentedon Mar 10, 2026
Hey @brianlee-expensify, this one is ready for payment
[-]Showing company cards upgrade page in RHP when trying to assign cards[/-][+][Due for payment 2026-02-17] Showing company cards upgrade page in RHP when trying to assign cards[/+]brianlee-expensify commentedon Mar 10, 2026
@MobileMage can you share your Upwork profile here? will send you the $250 payment via this Upwork job posting
MobileMage commentedon Mar 10, 2026
It's this @brianlee-expensify https://www.upwork.com/freelancers/~018bc4a19179469daa
brianlee-expensify commentedon Mar 10, 2026
@MobileMage thanks, just sent you the offer!
MobileMage commentedon Mar 10, 2026
Accepted @brianlee-expensify
brianlee-expensify commentedon Mar 10, 2026
Payment Summary
twisterdotcom commentedon Mar 11, 2026
@hungvu193 has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Zapier Logs
Run ID: 00040eee-018f-a872-1dae-5d18258a2e14