Allow linking an existing card feed to a non-USD workspace - #98509
Allow linking an existing card feed to a non-USD workspace#98509MelvinBot wants to merge 2 commits into
Conversation
Co-authored-by: Chuck Dries <chuckdries@users.noreply.github.com>
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
I looked into the failing checks — there's no code failure to fix here. Every code/CI check passes (typecheck, Bun tests, ESLint, Oxfmt, Storybook, all
I intentionally don't touch the author-checklist or approval checks — the To get this PR green: fill in the Tests/QA steps + tick the author-checklist boxes, then have a reviewer approve. (The perf-test jobs were still running when I checked; they're informational benchmarks, not blockers.) |
|
Re-checked — status is unchanged, and there's still no code failure I can push a fix for. All code/CI checks pass. The only two red checks are the same human-action ones:
Neither clears from a commit, so pushing to the branch won't turn these green. To get the PR mergeable: complete the author checklist + Tests/QA, then get an independent review approval. (The perf-test job is still running — informational benchmark, not a blocker.) |
…elector Co-authored-by: Chuck Dries <chuckdries@users.noreply.github.com>
|
I looked at the failing checks — there's nothing here I can fix by pushing code. Both failures are process gates that need a human:
Everything else is green: Bun tests, ESLint, Oxfmt, typecheck, React Compiler, Storybook, unit tests ( So no code change is warranted — the two red checks resolve on their own once the checklist is completed and a reviewer approves. |
|
Still nothing for me to push here — the check status is unchanged from my earlier comments. The two red checks are both human-only gates, not code failures:
Every automated check (Bun tests, ESLint, Oxfmt, typecheck, React Compiler, Storybook, all unit test jobs, builds, and perf tests) is passing. No code change is warranted; these clear once the checklist is completed and a reviewer approves. |
Explanation of Change
On a non-USD workspace, the Expensify Card empty-state CTA ran a currency check that forced the workspace to USD before it decided which flow to start. That check exists to protect enrolling a brand-new card program (which needs a USD bank account), but it fired unconditionally — so it also blocked the valid path of linking an existing card feed to a non-USD (e.g. CAD/GBP/EUR) workspace, which does not require USD.
This change skips the currency prompt when the workspace has accessible feeds (
hasAccessibleFeeds). In that case the CTA callsstartFlow()directly, which already routes to the feed selector so the admin can link an existing feed. The USD prompt still applies to the brand-new-program path (no accessible feeds). No new linking or currency logic is needed — the feed selector's "From other workspaces" section already callslinkCardFeedToPolicy, and the card UI already derives currency from the feed itself (from PR #93331).Fixed Issues
$ #98503
PROPOSAL: #98503 (comment)
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review".
// Please describe what tests you performed that validate your changes worked.
Offline tests
N/A
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas they need to test for regressions.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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