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 2025-09-16] [$250] New user disables company cards during onboarding, but we still show Connect your corporate card as an onboarding task #68928
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: 9.1.97-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@dylanexpensify Slack conversation (hyperlinked to channel name): #Expensify Bugs
Action Performed:
Sign up for New Expensify under Manage my team intent
Select 11-50 size
Select QBO as accounting integration
Input personal details
De-select company cards in features modal
Expected Result:
Connect your corporate card as an onboarding task is not shown
Actual Result:
Connect your corporate card as an onboarding task is shown
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Platforms Tested:
On which of our officially supported platforms was this issue tested:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidenceRecording.1541.mp4
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update prepareOnboardingOnyxData unit test to verify that the onboarding task doesn't contain the task related to a disabled feature.
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
changed the title [-]New user disables company cards during onboarding, but we still show Connect your corporate card as an onboarding task[/-][+][$250] New user disables company cards during onboarding, but we still show Connect your corporate card as an onboarding task[/+]on Aug 22, 2025
📣 @yuta147586! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
changed the title [-][$250] New user disables company cards during onboarding, but we still show Connect your corporate card as an onboarding task[/-][+][Due for payment 2025-09-16] [$250] New user disables company cards during onboarding, but we still show Connect your corporate card as an onboarding task[/+]on Sep 9, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.2-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@hungvu193@jliexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[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.
Regression Test Proposal
Test:
Sign up for New Expensify under Manage my team intent
Select 11-50 size
Select QBO as accounting integration
Input personal details
De-select company cards in the features modal and complete the onboarding.
Verify that the Connect your corporate card task doesn't appear
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Aug 21, 2025
Triggered auto assignment to @jliexpensify (
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.daledah commentedon Aug 21, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Connect your corporate card as an onboarding task is shown
What is the root cause of that problem?
With Manage Team selection, we define the tasks here
App/src/libs/actions/Welcome/OnboardingFlow.ts
Lines 339 to 342 in 19c88b2
App/src/libs/actions/Welcome/OnboardingFlow.ts
Line 379 in 19c88b2
And not filter here
App/src/libs/ReportUtils.ts
Lines 10352 to 10357 in 19c88b2
What changes do you think we should make in order to solve the problem?
We should filter
connectCorporateCardTaskwhen the company card is not enabledprepareOnboardingOnyxDatafunctionconnectCorporateCardTaskwhen the company card is not enabledApp/src/libs/ReportUtils.ts
Lines 10352 to 10357 in 19c88b2
areCompanyCardsEnabledfrom theBaseOnboardingInterestedFeaturescomponent ->completeOnboardingfunction ->prepareOnboardingOnyxDatafunctionApp/src/pages/OnboardingInterestedFeatures/BaseOnboardingInterestedFeatures.tsx
Lines 203 to 212 in 19c88b2
Note: Above is the logic for company card feature, we can do the same with other features.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
Or we can pass all
featuresMaptoprepareOnboardingOnyxDatafunctionmkzie2 commentedon Aug 21, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
New user disables company cards during onboarding, but we still show Connect your corporate card as an onboarding task
What is the root cause of that problem?
We don't have the logic to filter out the corporate card task if the current user doesn't select company cards feature
What changes do you think we should make in order to solve the problem?
selectedInterestedFeaturesand pass it toprepareOnboardingOnyxDatafunctionApp/src/libs/actions/Report.ts
Line 4207 in 73c4200
selectedInterestedFeatureslist; we should filter out this task.App/src/libs/ReportUtils.ts
Lines 10363 to 10365 in 73c4200
completeOnboardingfunction hereApp/src/pages/OnboardingInterestedFeatures/BaseOnboardingInterestedFeatures.tsx
Line 203 in 73c4200
App/src/libs/ReportUtils.ts
Line 10269 in 73c4200
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update
prepareOnboardingOnyxDataunit test to verify that the onboarding task doesn't contain the task related to a disabled feature.What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
[-]New user disables company cards during onboarding, but we still show Connect your corporate card as an onboarding task[/-][+][$250] New user disables company cards during onboarding, but we still show Connect your corporate card as an onboarding task[/+]melvin-bot commentedon Aug 22, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021958681389059326901
melvin-bot commentedon Aug 22, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (
External)yuta147586 commentedon Aug 22, 2025
Proposal — Gate “Connect your corporate card” task behind a single source-of-truth flag
Hypothesis
Task visibility reads a stale/wrong flag (Policy vs onboarding NVP) and isn’t re-evaluated after the features modal updates Onyx.
Plan
Add guarded selector shouldShowCorporateCardTask(policyID) that:
– Reads the canonical Policy.features.companyCardsEnabled
– Applies role guard (admins only)
– Uses safe default (missing ⇒ false)
Replace ad-hoc checks in onboarding task builder with this selector.
After modal save, invalidate/bust Onyx keys so the selector re-evaluates.
Tests: unit (enabled/disabled/missing/roles) + smoke/E2E (disable ⇒ hidden, re-enable ⇒ shown) across Web/Desktop/iOS/Android.
Acceptance criteria
Cards disabled ⇒ task not rendered for any role
Cards enabled ⇒ task shown for eligible admins only
Toggle reflects immediately after save (no stale UI)
All tests pass; no regressions to other onboarding tasks
Estimate: 4–6 hours incl. tests & screenshots.
If approved, I’ll implement on a fork/branch and open a PR.
cc @s77rt
melvin-bot commentedon Aug 22, 2025
📣 @yuta147586! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
38 remaining items
[-][$250] New user disables company cards during onboarding, but we still show Connect your corporate card as an onboarding task[/-][+][Due for payment 2025-09-16] [$250] New user disables company cards during onboarding, but we still show Connect your corporate card as an onboarding task[/+]melvin-bot commentedon Sep 9, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Sep 9, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.2-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-09-16. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Sep 9, 2025
@hungvu193 @jliexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
jliexpensify commentedon Sep 15, 2025
Bumping @hungvu193 for the checklist please!
hungvu193 commentedon Sep 15, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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/59386/files#r2348193608
[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.
Regression Test Proposal
Test:
Do we agree 👍 or 👎
jliexpensify commentedon Sep 15, 2025
Payment Summary
Upwork job
hungvu193 commentedon Sep 16, 2025
Requested on ND
JmillsExpensify commentedon Sep 16, 2025
$250 approved for @hungvu193
jliexpensify commentedon Sep 16, 2025
Paid and job closed!