Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Version Number: 9.4.63-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: 1. https://test-management.browserstack.com/projects/2219752/test-runs/71240654/folder/53696879/99825106/1704263019 2. https://test-management.browserstack.com/projects/2219752/test-runs/71240654/folder/53697042/99825818/1704263020
Email or phone of affected tester (no customers): applausetester+bm890012@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Web, android
App Component: Workspace Settings
Action Performed:
Preconditions:
Use expensifail account.
- Go to staging.new.expensify.com
- Create a Control workspace (or upgrade to Control in Overview).
- Add a few members.
- Go to Workflows > Add approval workflow, and create a workflow with a submitter and approver.
- Go to Members > Invite member > select a member, and proceed to the confirmation page.
- Create a Collect workspace
- Go to Workflows > Add approval workflow > upgrade the workspace to Control, then go back without creating a workflow.
- Go to Members > Invite member > select a member, and proceed to the confirmation page.
Expected Result:
Step 5: The Approver row should appear because the workspace is on the Control plan and has multiple approval workflows configured.
Step 8: The Approver row should not appear because no custom approval workflow was created.
Actual Result:
Step 5: The Approver row does not appear on the confirmation page, even though the workspace is on the Control plan and has a custom approval workflow in addition to the default workflow.
Step 8: The Approver row appears on the confirmation page even though no custom approval workflow was created. The workspace was only upgraded through the Workflows flow.
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome Safari
Screenshots/Videos
Bug7244856_1787893291658.bandicam_2026-08-28_08-00-17-057.mp4
Applause Internal Information
Exported by: Nathan Lemma
Bug ID: 7244856
Issue Owner
Current Issue Owner: @mallenexpensifyUpwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022107510189614389481
- Upwork Job ID: 2107510189614389481
- Last Price Increase: 2026-10-06
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
applause-bot commentedon Aug 28, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/b3c533c23fc463cce551bc4922ff70edfe2450b9466ccef399def4bebdad02e0
MelvinBot commentedon Aug 28, 2026
Proposal
What is the root cause of that problem?
The Approver row on the invite-confirmation page is gated only by the stored
policy.approvalModeflag:WorkspaceInviteMessageComponent.tsx:121approvalMode === ADVANCEDis treated as a proxy for "this workspace has a custom approval workflow", but that flag is written optimistically by many different code paths and drifts from the real workflow structure. So it points the wrong way in both reported scenarios:MULTIPLE_APPROVERSbeta on, creating a workflow goes through the rules path (createApprovalWorkflowRules→setApprovalWorkflowRules), which writes only to theRULEcollection and never setsapprovalMode = ADVANCED. Only the legacyemployeeListpath sets it (Workflow.ts:82). SoapprovalModestaysBASIC/OPTIONAL, the gate fails, and the row is missing.upgradeToCorporate) only flipstypetoCORPORATE; theADVANCEDvalue on the upgraded Collect workspace comes from the backend upgrade response, andareWorkflowsEnabledwas already true — so both gate conditions become true even though no workflow was ever created.This is a known-fragile check: the same
shouldShowApproverRow/approvalModecoupling already caused Deploy Blocker #83474, and maintainers have been patching the writers ofapprovalModerather than fixing the read-side gate.What changes do you think we should make in order to solve the problem?
Stop trusting the stored
approvalModeflag on the invite page and derive whether a custom workflow exists, exactly like the Workflows tab already does.WorkflowsApprovalsTabcomputes advanced-ness from the actual workflows (WorkflowsApprovalsTab.tsx:161-162):Extract that into a shared
PolicyUtilshelper (deriving workflows viaconvertPolicyEmployeesToApprovalWorkflows, orconvertApprovalWorkflowRulesToWorkflowswhen the beta is on) and reuse it forshouldShowApproverRow, so the invite page and the Workflows tab can never disagree. This fixes both scenarios at once and removes the class of drift bugs instead of chasing individual writers.What alternative solutions did you explore? (Optional)
approvalMode = ADVANCEDin the rules-based create path — fixes Step 5 only, leaves Step 8 (backend-setADVANCEDon bare upgrade) broken, and keeps the fragile proxy.UpgradeToCorporatereturnsapprovalMode = ADVANCEDfor a workspace with no custom workflow (source of Step 8'sADVANCED). Worth verifying, but the robust fix lives in App regardless of the backend answer.Investigation details & evidence
WorkspaceInviteMessageComponent.tsx:121ADVANCED:Workflow.ts:82; rules path (setApprovalWorkflowRules) writes only theRULEcollection and never touchesapprovalMode.WorkflowsApprovalsTab.tsx:161-162, backed byconvertPolicyEmployeesToApprovalWorkflowsinWorkflowUtils.ts.ADVANCEDwith no custom workflow (Policy.ts:2671-2672); prior drift caused Deploy Blocker [$250] Approver field is shown on confirm page when second approver is removed offline #83474 (discussed in the PR that added the row, feat: [CFI] Add Approver row on the member invite confirmation page #84511).ADVANCED, which doesn't change the recommended fix. A live web repro wasn't possible this run due to an unrelated session-rendering issue, but the issue already documents the reproduction.Possibly related: #99208 (approval workflow appears to save then disappears) — separate symptom, but also in the approval-workflow persistence area.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/99749)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
melvin-bot commentedon Aug 28, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (
External)melvin-bot commentedon Aug 28, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
melvin-bot commentedon Aug 31, 2026
@situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Sep 2, 2026
@situchan Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Sep 3, 2026
@situchan Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Sep 3, 2026
@situchan Huh... This is 4 days overdue. Who can take care of this?
situchan commentedon Sep 3, 2026
@MelvinBot's proposal looks good.
🎀 👀 🎀 C+ reviewed
29 remaining items
[-][$175] WS - Approver row incorrectly appears or is missing based on how the workspace is upgraded[/-][+][Due for payment 2026-10-20] [$175] WS - Approver row incorrectly appears or is missing based on how the workspace is upgraded[/+]melvin-bot commentedon Oct 13, 2026
@situchan
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.7-3 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 2026-10-20. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]
melvin-bot commentedon Oct 14, 2026
@situchan 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
melvin-bot commentedon Oct 16, 2026
@situchan 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
melvin-bot commentedon Oct 19, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Oct 19, 2026
Payment Summary
Resolving PRs:
Derive the invite Approver row from the real approval workflows #100327
Reviewer: @situchan owed $175 via NewDot
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Oct 20, 2026
Payment Summary
Contributor+: @situchan due $250 via NewDot
@situchan plz complete the Contributor+ checklist and tag me in a post once you have. Thx
situchan commentedon Oct 20, 2026
Contributor+ Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR:
Link to the comment on the Issue:
[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:
[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 👎
trjExpensify commentedon Nov 3, 2026
approved $250 for @situchan