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
[$250] Workspace - Auto-approve and auto-pay still toggle on after downgrading the Workspace #78845
Version Number: v9.2.92-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: Exploratory #77188 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Windows 10/Chrome App Component: Workspace Settings
Action Performed:
Preconditions: The collect workspace has connected to a bank account
Open the NewDot app
Navigate to the Workflow section
Toggle on the Auto-approve compliant report
Click the Upgrade button on the RHP
Toggle on the Auto-pay approve report
Go to the Overview and downgrade the Workspace to Collect
Navigate back to the Workflow section
Toggle off and on the Auto-approve compliant report (observe that it has required an upgrade RHP)
Expected Result:
The Auto-approve compliant report and Auto-pay approve report are toggle off, because when toggle off and toggle on again, it requires upgrading the Workspace to Control
Actual Result:
The Auto-approve compliant report and Auto-pay approve report are still on after downgrading the Workspace to Collect
Please re-state the problem that we are trying to solve in this issue.
The Auto-approve compliant report and Auto-pay approve report are still on after downgrading the Workspace to Collect
What is the root cause of that problem?
When downgrading workspace, we don't optimistically set policy.shouldShowAutoApprovalOptions and policy.shouldShowAutoReimbursementLimitOption to false, and also BE doesn't update that.
What changes do you think we should make in order to solve the problem?
BE should return policy.shouldShowAutoApprovalOptions and policy.shouldShowAutoReimbursementLimitOption as false for Policy_DowngradeToTeam API
FE should optimistically set policy.shouldShowAutoApprovalOptions and policy.shouldShowAutoReimbursementLimitOption to false for Policy_DowngradeToTeam API:
Also modify successData and failureData, respectively.
We should consider resetting related props, like preventSelfApproval, autoApproval, autoReimbursement to default values.
We should also check and disable all control-only features for this API.
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 [-]Workspace - Auto-approve and auto-pay still toggle on after downgrading the Workspace[/-][+][$250] Workspace - Auto-approve and auto-pay still toggle on after downgrading the Workspace[/+]on Jan 6, 2026
Please re-state the problem that we are trying to solve in this issue.
After a workspace is downgraded from Control to Collect (TEAM), the auto-approve and auto-pay toggles in the Workflow section can remain “on” even though they should no longer be available.
The toggles appear enabled because the client Onyx entry still contains stale Control-only fields.
What is the root cause of that problem?
The server sends a downgraded Collect (TEAM) policy payload without Control-only fields.
Onyx.METHOD.MERGE is used to apply the update, which preserves existing keys in the current Onyx entry.
As a result, fields like shouldShowAutoApprovalOptions and shouldShowAutoReimbursementLimitOption remain in Onyx, making the UI think the toggles are still available.
The Onyx policy entry is now a mix of TEAM type with stale Control flags, causing the toggles to remain enabled incorrectly.
What changes do you think we should make in order to solve the problem?
Treat policy updates coming from Policy_DowngradeToTeam as authoritative and replace the Onyx entry instead of merging:
In src/libs/actions/OnyxUpdates.ts, detect downgrade responses.
Rewrite any policy update for a TEAM type to use Onyx.METHOD.SET rather than MERGE.
This ensures the Onyx entry matches the server payload exactly, removing any stale Control-only flags.
Please re-state the problem that we are trying to solve in this issue.
Auto-approve and auto-pay still toggle on after downgrading the Workspace
What is the root cause of that problem?
This issue started occurring after we moved the enforcement settings to the Workflow section (#75117)
In the previous flow before PR #75117, the enforcement settings were under Rules. When we downgrade a workspace, Rules becomes disable, so we don't see the enforcement settings anymore because they are part of Rules.
"areRulesEnabled": false,
After we moved the enforcement settings to the Workflow section, they will always be shown, regardless of whether Rules is enabled or disabled.
What changes do you think we should make in order to solve the problem?
To resolve this issue, we have two options:
Option 1: we need backend update when we downgrade workspace then reset preventSelfApproval , shouldShowAutoApprovalOptions, shouldShowAutoReimbursementLimitOption to false
Option 2: Follow the previous flow, if Rules is disabled, hide the enforcement settings. With this approach, we don't need to change any backend logic and we simply update the frontend while keeping the existing backend logic correct.
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.
@KocaPepsi 's proposal looks promising. Before moving forward, I’d like to ask the internal team to double-check the expected behavior.
Previously, before we moved the Expense Report Rules section into Workflows, this was the behavior: if we enabled Auto-Approve or Prevent Self-Approval, then downgraded and upgraded again, those values would persist.
Screen.Recording.2026-01-07.at.21.48.48.mov
The Auto-approve compliant report and Auto-pay approve report are toggle off, because when toggle off and toggle on again, it requires upgrading the Workspace to Control
With the new expected behavior, when we downgrade and then upgrade again, Auto-Approve and Prevent Self-Approval will not persist because Auto-approve compliant report and Auto-pay approve are reset during the downgrade. This can be confusing, since these settings are turned off after a downgrade and upgrade. Example:
Because of that, I think we should hide the Expense Report Rules section in Workflows when the plan type is Collect, and only show it when the plan type is Control, like in the example video:
Screen.Recording.2026-01-07.at.22.03.25.mov
@JmillsExpensify@tgolen Because you already have the context (#75117), I’d like to ask what you think. Should we hide the Expense Report Rules section in Workflows, or should we keep it visible but disable the options in that section when the workspace is downgraded?
@thienlnam We have a bug. Could you take a look? When downgrading, shouldShowAutoApprovalOptions and shouldShowAutoReimbursementLimitOption sometimes still return true.
Activity
melvin-bot commentedon Jan 5, 2026
Triggered auto assignment to @JmillsExpensify (
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.mkzie2 commentedon Jan 5, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
The Auto-approve compliant report and Auto-pay approve report are still on after downgrading the Workspace to Collect
What is the root cause of that problem?
When downgrading workspace, we don't optimistically set
policy.shouldShowAutoApprovalOptionsandpolicy.shouldShowAutoReimbursementLimitOptiontofalse, and also BE doesn't update that.What changes do you think we should make in order to solve the problem?
BE should return
policy.shouldShowAutoApprovalOptionsandpolicy.shouldShowAutoReimbursementLimitOptionasfalseforPolicy_DowngradeToTeamAPIFE should optimistically set
policy.shouldShowAutoApprovalOptionsandpolicy.shouldShowAutoReimbursementLimitOptiontofalseforPolicy_DowngradeToTeamAPI:App/src/libs/actions/Policy/Policy.ts
Lines 4873 to 4883 in 424a131
Also modify
successDataandfailureData, respectively.We should consider resetting related props, like
preventSelfApproval,autoApproval,autoReimbursementto default values.We should also check and disable all control-only features for this API.
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 Jan 6, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022008645430344423839
[-]Workspace - Auto-approve and auto-pay still toggle on after downgrading the Workspace[/-][+][$250] Workspace - Auto-approve and auto-pay still toggle on after downgrading the Workspace[/+]melvin-bot commentedon Jan 6, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @huult (
External)twinkle-react commentedon Jan 7, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
After a workspace is downgraded from Control to Collect (TEAM), the auto-approve and auto-pay toggles in the Workflow section can remain “on” even though they should no longer be available.
The toggles appear enabled because the client Onyx entry still contains stale Control-only fields.
What is the root cause of that problem?
shouldShowAutoApprovalOptionsandshouldShowAutoReimbursementLimitOptionremain in Onyx, making the UI think the toggles are still available.What changes do you think we should make in order to solve the problem?
Treat policy updates coming from
Policy_DowngradeToTeamas authoritative and replace the Onyx entry instead of merging:src/libs/actions/OnyxUpdates.ts, detect downgrade responses.Onyx.METHOD.SETrather thanMERGE.Pseudo-diff :
What alternative solutions did you explore? (Optional)
KocaPepsi commentedon Jan 7, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Auto-approve and auto-pay still toggle on after downgrading the Workspace
What is the root cause of that problem?
This issue started occurring after we moved the enforcement settings to the Workflow section (#75117)
In the previous flow before PR #75117, the enforcement settings were under Rules. When we downgrade a workspace, Rules becomes disable, so we don't see the enforcement settings anymore because they are part of Rules.
After we moved the enforcement settings to the Workflow section, they will always be shown, regardless of whether
Rulesisenabledordisabled.App/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
Line 479 in 566a084
What changes do you think we should make in order to solve the problem?
To resolve this issue, we have two options:
Option 1: we need backend update when we downgrade workspace then reset
preventSelfApproval,shouldShowAutoApprovalOptions,shouldShowAutoReimbursementLimitOptiontofalseOption 2: Follow the previous flow, if
Rulesisdisabled, hide the enforcement settings. With this approach, we don't need to change any backend logic and we simply update the frontend while keeping the existing backend logic correct.App/src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
Line 479 in 566a084
or
and remove unused frontend logic
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.
huult commentedon Jan 7, 2026
@KocaPepsi 's proposal looks promising. Before moving forward, I’d like to ask the internal team to double-check the expected behavior.
Previously, before we moved the Expense Report Rules section into Workflows, this was the behavior: if we enabled Auto-Approve or Prevent Self-Approval, then downgraded and upgraded again, those values would persist.
Screen.Recording.2026-01-07.at.21.48.48.mov
With the new expected behavior, when we downgrade and then upgrade again, Auto-Approve and Prevent Self-Approval will not persist because Auto-approve compliant report and Auto-pay approve are reset during the downgrade. This can be confusing, since these settings are turned off after a downgrade and upgrade. Example:
Because of that, I think we should hide the Expense Report Rules section in Workflows when the plan type is Collect, and only show it when the plan type is Control, like in the example video:
Screen.Recording.2026-01-07.at.22.03.25.mov
@JmillsExpensify @tgolen Because you already have the context (#75117), I’d like to ask what you think. Should we hide the Expense Report Rules section in Workflows, or should we keep it visible but disable the options in that section when the workspace is downgraded?
27 remaining items
huult commentedon Jan 30, 2026
Same as above
melvin-bot commentedon Feb 3, 2026
@thienlnam Still overdue 6 days?! Let's take care of this!
thienlnam commentedon Feb 3, 2026
The backend PR is live and deployed - you should have access to that now?
huult commentedon Feb 4, 2026
Screen.Recording.2026-02-04.at.09.17.44.mov
@thienlnam We have a bug. Could you take a look? When downgrading,
shouldShowAutoApprovalOptionsandshouldShowAutoReimbursementLimitOptionsometimes still returntrue.thienlnam commentedon Feb 4, 2026
Fix is addressed, will be a couple days to deploy to prod
huult commentedon Feb 10, 2026
Screen.Recording.2026-02-10.at.21.29.38.mov
@JmillsExpensify @thienlnam I’ve tested this and it works as expected. Could we re-test and close this ticket?
JmillsExpensify commentedon Feb 10, 2026
That's good enough for me! I'll go ahead and close, though are you owed?
huult commentedon Feb 11, 2026
@JmillsExpensify This is a backend issue, so no.
JmillsExpensify commentedon Feb 11, 2026
Ok great thanks!