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-05-20] [$250] Workspaces - 'Collect' plan is displayed instead of 'Control' #59473
Version Number: 9.1.22-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/cases/view/2990420 Email or phone of affected tester (no customers):testexpensify9+onv5@gmail.com Issue reported by: Applause Internal Team Device used: Samsung A15, Android 14 | iPhone SE 3rd generation (2022), iOS 18.4 App Component: Other
Action Performed:
Open Hybrid app
Sign up
Tap on 'Manage my team's expenses' > '1-10 employees' > 'QuickBooks Desktop' > 'Continue'
Tap on 'Settings > 'Workspaces'
Expected Result:
The plan 'Control' should be displayed.
Actual Result:
The plan 'Collect' is displayed.
If concierge chat is not open, then the 'Collect' plan is shown in WS preview. if Concierge chat is opened, and you go to Workspaces, 'Control' plan is shown. Also, If you open the WS and go to ‘Overview’ it also corrects to ‘Control'.
It is also reproducible on bigger screens if their windows is resized.
Please re-state the problem that we are trying to solve in this issue.
After onboarding with integration purpose, 'Collect' plan is displayed instead of 'Control'
What is the root cause of that problem?
The CompleteGuidedSetup API called after onboarding does not return updated workspace plan
What changes do you think we should make in order to solve the problem?
Update backend to return updated policy type when an integration is selected
Also update the prepareOnboardingOnyxData function to change type of the policy to corporate for optimistic data and back to previous value for failure data
Note
Need to confirm with internal member if all integrations require control/corporate plan and workspace plan is only upgraded when user selects an integration. If this is not the case, we can update the conditions accordingly
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Check prepareOnboardingOnyxData returns correct value for poilcy type based on if an integration was passed or not
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 [-]Workspaces - 'Collect' plan is displayed instead of 'Control'[/-][+][$250] Workspaces - 'Collect' plan is displayed instead of 'Control'[/+]on Apr 1, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-04-02 04:07:29 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the Workspaces page, the 'Collect' plan is displayed instead of 'Control' after completing the onboarding flow.
What is the root cause of that problem?
After completing onboarding, we call the CompleteGuidedSetup API, which sets the policy type to corporate (Control) when appropriate (e.g., when integrations like NetSuite or QuickBooks Desktop are selected).
However, while the API call is still in progress, the frontend continues to display the policy as team (Collect) because we don’t optimistically set the policy type to corporate in the relevant Onyx merge:
What changes do you think we should make in order to solve the problem?
If the user selects netsuite, intacct, or quickbookDesktop during onboarding, we should optimistically set the policy type to corporate (Control) so the UI reflects the correct plan immediately.
For other integrations, the policy type should remain unchanged.
This logic should be implemented at the following location:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add unit tests for the prepareOnboardingOnyxData function to validate behavior when userReportedIntegration is quickbookDesktop, ensuring the policy is optimistically updated to corporate.
What alternative solutions did you explore? (Optional)
We could consider applying the full Onyx data configuration defined in:
The CompleteGuidedSetup API called after onboarding does not return updated workspace plan
Could you confirm if that's the case? This only works incorrectly for narrow screen layout, on Desktop and web desktop it works as expected. Why does this work incorrectly only for narrow screen layout?
cc: @jaydamani, @thelullabyy
Why does this work incorrectly only for narrow screen layout?
For web with wide screen, it comes from a GetMissingOnyxMessages called after ReadNewestAction which are not called in narrow screens. I am trying to investigate more but let me know your thoughts. @eVoloshchak
The backend response does not include the new plan but it gets updated due to other requests related to the policy. Also note that based on this, regular users will see #admin after onboarding so the workspace should get updated by the openApp request
This occurs on wide screen as well if we go offline before completing onboarding, so we would still need to update optimistic data
changed the title [-][$250] Workspaces - 'Collect' plan is displayed instead of 'Control'[/-][+][Due for payment 2025-05-20] [$250] Workspaces - 'Collect' plan is displayed instead of 'Control'[/+]on May 13, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.44-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@eVoloshchak@lschurr@eVoloshchak 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]
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[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: N/A, this wasn't implemented initially
[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: regression was not critical
[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 Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
Sign in with a new account
Tap on 'Manage my team's expenses' > '1-10 employees' > 'QuickBooks Desktop' > 'Continue'
Activity
melvin-bot commentedon Apr 1, 2025
Triggered auto assignment to @lschurr (
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.jaydamani commentedon Apr 1, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
After onboarding with integration purpose, 'Collect' plan is displayed instead of 'Control'
What is the root cause of that problem?
The
CompleteGuidedSetupAPI called after onboarding does not return updated workspace planWhat changes do you think we should make in order to solve the problem?
Update backend to return updated policy type when an integration is selected
Also update the prepareOnboardingOnyxData function to change
typeof the policy tocorporatefor optimistic data and back to previous value for failure dataNote
Need to confirm with internal member if all integrations require control/corporate plan and workspace plan is only upgraded when user selects an integration. If this is not the case, we can update the conditions accordingly
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Check prepareOnboardingOnyxData returns correct value for poilcy type based on if an integration was passed or not
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.
melvin-bot commentedon Apr 1, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021907171898904296032
[-]Workspaces - 'Collect' plan is displayed instead of 'Control'[/-][+][$250] Workspaces - 'Collect' plan is displayed instead of 'Control'[/+]melvin-bot commentedon Apr 1, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (
External)thelullabyy commentedon Apr 2, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-04-02 04:07:29 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
After completing onboarding, we call the
CompleteGuidedSetupAPI, which sets the policy type tocorporate(Control) when appropriate (e.g., when integrations like NetSuite or QuickBooks Desktop are selected).However, while the API call is still in progress, the frontend continues to display the policy as
team(Collect) because we don’t optimistically set the policy type tocorporatein the relevant Onyx merge:App/src/libs/actions/Report.ts
Line 4328 in b4df306
What changes do you think we should make in order to solve the problem?
If the user selects
netsuite,intacct, orquickbookDesktopduring onboarding, we should optimistically set the policy type tocorporate(Control) so the UI reflects the correct plan immediately.For other integrations, the policy type should remain unchanged.
This logic should be implemented at the following location:
App/src/libs/actions/Report.ts
Line 4328 in b4df306
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
prepareOnboardingOnyxDatafunction to validate behavior whenuserReportedIntegrationisquickbookDesktop, ensuring the policy is optimistically updated tocorporate.What alternative solutions did you explore? (Optional)
We could consider applying the full Onyx data configuration defined in:
App/src/libs/actions/Policy/Policy.ts
Line 3677 in d69ca16
instead of only setting
isPendingUpgradeandtypein the optimistic update.eVoloshchak commentedon Apr 6, 2025
@jaydamani's proposal:
Could you confirm if that's the case? This only works incorrectly for narrow screen layout, on Desktop and web desktop it works as expected.
Why does this work incorrectly only for narrow screen layout?
cc: @jaydamani, @thelullabyy
jaydamani commentedon Apr 6, 2025
For web with wide screen, it comes from a
GetMissingOnyxMessagescalled afterReadNewestActionwhich are not called in narrow screens. I am trying to investigate more but let me know your thoughts.@eVoloshchak
jaydamani commentedon Apr 6, 2025
After investigating,
The backend response does not include the new plan but it gets updated due to other requests related to the policy. Also note that based on this, regular users will see #admin after onboarding so the workspace should get updated by the openApp request
This occurs on wide screen as well if we go offline before completing onboarding, so we would still need to update optimistic data
Screen.Recording.2025-04-06.at.22.42.06.mov
31 remaining items
[-][$250] Workspaces - 'Collect' plan is displayed instead of 'Control'[/-][+][Due for payment 2025-05-20] [$250] Workspaces - 'Collect' plan is displayed instead of 'Control'[/+]melvin-bot commentedon May 13, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 13, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.44-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-05-20. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 13, 2025
@eVoloshchak @lschurr @eVoloshchak 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]
lschurr commentedon May 19, 2025
@eVoloshchak could you work on the checklist for this one?
eVoloshchak commentedon May 20, 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: N/A, this wasn't implemented initially
[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: regression was not critical
[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 Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
ControlplanDo we agree 👍 or 👎
lschurr commentedon May 20, 2025
Payment summary:
garrettmknight commentedon Dec 7, 2025
$250 approved for @eVoloshchak