Revert "[Internal QA] Don't count CSV uploads in Classic as a feed in ND"#79206
Conversation
There was a problem hiding this comment.
💡 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".
| 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]); |
There was a problem hiding this comment.
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 👍 / 👎.
| 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)), { |
There was a problem hiding this comment.
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 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.
|
|
@arosiclair looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
straight revert |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…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)
|
🚀 Cherry-picked to staging by https://github.com/arosiclair in version: 9.2.96-5 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.96-6 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.96-6 🚀
|
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.2.96-6 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/arosiclair in version: 9.2.97-0 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/arosiclair in version: 9.2.99-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.2.99-8 🚀
|
Reverts #77117 to fix #79182
Straight revert