Skip to content

Revert "[Internal QA] Don't count CSV uploads in Classic as a feed in ND"#79206

Merged
arosiclair merged 1 commit intoExpensify:mainfrom
allgandalf:revert-77117-allowAddingFeedForCollectCSV
Jan 9, 2026
Merged

Revert "[Internal QA] Don't count CSV uploads in Classic as a feed in ND"#79206
arosiclair merged 1 commit intoExpensify:mainfrom
allgandalf:revert-77117-allowAddingFeedForCollectCSV

Conversation

@allgandalf
Copy link
Contributor

@allgandalf allgandalf commented Jan 9, 2026

Reverts #77117 to fix #79182

Straight revert

@allgandalf allgandalf requested review from a team as code owners January 9, 2026 14:50
@melvin-bot melvin-bot bot requested review from trjExpensify and removed request for a team January 9, 2026 14:50
@allgandalf allgandalf requested review from a team, MariaHCD, mountiny and nkuoch and removed request for trjExpensify January 9, 2026 14:50
@melvin-bot melvin-bot bot requested review from amyevans and joekaufmanexpensify and removed request for a team January 9, 2026 14:50
@melvin-bot
Copy link

melvin-bot bot commented Jan 9, 2026

@amyevans 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]

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c44cacf6b0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +33 to +36
const connectedFeeds = Object.entries(companyFeeds)?.length;
setPrevCompanyFeedsLength(connectedFeeds);
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps -- we don't want this effect to run again
}, [isLoading]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recompute blocked state when company feeds change

The blocked state is now cached from the first non-loading render because the effect only depends on isLoading. If card feeds change later while isLoading stays false (e.g., a new feed is added or an existing one is removed via Onyx updates), prevCompanyFeedsLength never updates, so isBlockedToAddNewFeeds stays stale. This can leave Collect workspaces unblocked after their first feed is connected or keep them blocked after a feed is removed.

Useful? React with 👍 / 👎.

Comment on lines 86 to 90
useEffect(() => {
// Only redirect if blocked AND we're not in the middle of adding a feed (i.e., no feed selected and not a new feed)
// If feed is defined, user is assigning cards to an existing feed, so don't redirect
// If isNewFeedConnected is true, user just successfully added a feed, so don't redirect
if (!policyID || !isBlockedToAddNewFeeds || feed || isNewFeedConnected) {
if (!policyID || !isBlockedToAddNewFeeds) {
return;
}
Navigation.navigate(ROUTES.WORKSPACE_UPGRADE.getRoute(policyID, CONST.UPGRADE_FEATURE_INTRO_MAPPING.companyCards.alias, ROUTES.WORKSPACE_COMPANY_CARDS.getRoute(policyID)), {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Skip upgrade redirect during assign-card flow

This redirect now triggers whenever isBlockedToAddNewFeeds is true, even when BankConnection is opened with a feed to assign cards to an existing connection. For Collect workspaces that already have a feed (the normal case), the effect will immediately navigate to the upgrade screen, preventing users from assigning cards or completing an existing feed’s flow. The previous guard for the assign flow is gone, so this change blocks a valid use case.

Useful? React with 👍 / 👎.

@codecov
Copy link

codecov bot commented Jan 9, 2026

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.

Files with missing lines Coverage Δ
src/hooks/useIsBlockedToAddFeed.ts 100.00% <100.00%> (ø)
src/libs/CardUtils.ts 62.62% <ø> (-8.48%) ⬇️
...es/workspace/companyCards/BankConnection/index.tsx 0.00% <0.00%> (ø)
...s/workspace/companyCards/addNew/AddNewCardPage.tsx 0.00% <0.00%> (ø)
... and 270 files with indirect coverage changes

@arosiclair arosiclair merged commit d7704c8 into Expensify:main Jan 9, 2026
29 of 34 checks passed
@melvin-bot melvin-bot bot added the Emergency label Jan 9, 2026
@melvin-bot
Copy link

melvin-bot bot commented Jan 9, 2026

@arosiclair looks like this was merged without a test passing. Please add a note explaining why this was done and remove the Emergency label if this is not an emergency.

@arosiclair
Copy link
Contributor

straight revert

@OSBotify
Copy link
Contributor

OSBotify commented Jan 9, 2026

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

OSBotify pushed a commit that referenced this pull request Jan 9, 2026
…dForCollectCSV

Revert "[Internal QA] Don't count CSV uploads in Classic as a feed in ND"

(cherry picked from commit d7704c8)

(cherry-picked to staging by arosiclair)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Jan 9, 2026
@OSBotify
Copy link
Contributor

OSBotify commented Jan 9, 2026

🚀 Cherry-picked to staging by https://github.com/arosiclair in version: 9.2.96-5 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Jan 9, 2026

🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.96-6 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 failure ❌

@OSBotify
Copy link
Contributor

OSBotify commented Jan 9, 2026

🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.96-6 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Jan 9, 2026

🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.96-6 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Jan 9, 2026

🚀 Cherry-picked to staging by https://github.com/arosiclair in version: 9.2.97-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify
Copy link
Contributor

🚀 Cherry-picked to staging by https://github.com/arosiclair in version: 9.2.99-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/francoisl in version: 9.2.99-8 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Company cards - Infinite loading on Add cards page when adding direct feed

5 participants