Fix duplicate broken company card feed time-sensitive tasks#93406
Conversation
Show at most one Fix company card connection task per broken direct OAuth/Plaid feed and exclude commercial feeds that are not user-fixable via bank login. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Convert to a hook under TimeSensitiveSection/hooks and fix test lint/typing. Co-authored-by: Cursor <cursoragent@cursor.com>
Reset submodule pointer to match main; unrelated to broken feed task fix. Co-authored-by: Cursor <cursoragent@cursor.com>
…sForAdmin Co-authored-by: Cursor <cursoragent@cursor.com>
|
@codex review |
There was a problem hiding this comment.
Pull request overview
This PR fixes duplicated “Fix company card connection” tasks in the Home Time sensitive section by grouping broken company card connections at the feed level (instead of per-card) and excluding non-fixable commercial feeds, aligning the UI behavior with the intended “one task per broken direct feed” experience for workspace admins.
Changes:
- Deduplicates broken company card connection tasks by
feedNameWithDomainID(feed key). - Filters to only show tasks for direct (OAuth/Plaid) feeds via
isDirectFeed. - Extracts the selection logic into a dedicated hook and adds unit tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/pages/home/TimeSensitiveSection/index.tsx |
Uses the new hook and updates the rendered task keys to dedupe by feed. |
src/pages/home/TimeSensitiveSection/hooks/useBrokenDirectCompanyCardFeedsForAdmin.ts |
New hook that filters to direct feeds, maps cards to admin policies, and dedupes by feed key. |
tests/unit/hooks/useBrokenDirectCompanyCardFeedsForAdmin.test.ts |
Adds unit coverage for dedupe behavior, direct-vs-commercial filtering, and missing-policy cases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
@youssef-lr 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] |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Change is good for product 👍
This comment was marked as resolved.
This comment was marked as resolved.
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-06-15.at.18.43.09.mov |
|
@mountiny Mind triggering an web-only adhoc build here so @PedroEspinoza1999 can verify the fix ? Thanks! |
|
Done @ikevin127 |
|
🚧 @youssef-lr has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
ikevin127
left a comment
There was a problem hiding this comment.
🟢 LGTM
Since I cannot easily reproduce the BE error, I tested locally by modifying Onyx state in browser console with:
Onyx.merge('cardList', {
'cardID': {
lastScrapeResult: 403,
}
});did this for 2 different cards and verified that there's no duplicate error in Home > Time sensitive section.
I asked for others to verify using the above-generated adhoc build via Slack in case double-checking is needed before merging ✅
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @youssef-lr has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 9.4.10-0 🚀
Bundle Size Analysis (Sentry): |
Help site review — no changes requiredI reviewed this PR against What this PR changes (user-facing):
Why the docs already hold:
None of the articles document a one-task-per-card behavior, so the dedup change contradicts nothing. The feed-type scoping aligns the product with the existing (direct-feed-oriented) help content rather than introducing a new user-facing concept. If you'd prefer an explicit clarification — e.g. a sentence in the broken-connection article stating the Time Sensitive fix task surfaces for direct (OAuth/Plaid) feeds only — I'm happy to open a draft docs PR for that. Just let me know. @mountiny, please confirm whether you agree no help site changes are required, or reply if you'd like the explicit clarification above and I'll create the draft PR. |
|
@mountiny @youssef-lr Is there a specific account with a broken direct company card feed we can use for QA? |
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 9.4.12-0 🚀
Bundle Size Analysis (Sentry): |
🤖 Help site review — docs update requiredThis PR changes user-facing behavior of the Time Sensitive section on Home, so a help site update is warranted:
The existing article Draft help site PR: #93892 It clarifies that the Time Sensitive task is shown once per direct (bank-login) feed, and points admins of commercial feeds to the red dot indicator and the Concierge #admins message instead. No other help articles required changes — the dedup itself is invisible to docs, and the @mountiny, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 9.4.14-0 🚀
Bundle Size Analysis (Sentry): |
|
The customer who experienced this issue no longer experiences it, we could mock the data, but that is same as the unit tests so I think we can check it off and see if we can find any other bugs in these flows from FS |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.4.14-1 🚀
|
Explanation of Change
The Home Time sensitive section was showing one Fix company card connection task per broken assigned card, producing duplicate identical rows for the same feed. It also surfaced tasks for commercial feeds (VCF/CDF), which are file-based and not user-fixable via bank login.
This change:
feedNameWithDomainID)isDirectFeed)getBrokenDirectCompanyCardFeedsForAdminwith unit testsFixed Issues
$ #93187
PROPOSAL:
Tests
npm run test -- --testPathPattern=getBrokenDirectCompanyCardFeedsForAdminTestlastScrapeResultOffline tests
Same as Tests — broken feed tasks should render from existing Onyx card data without requiring network.
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Made with Cursor