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 2026-10-22] [$175] Approver row is hidden on the workspace invite confirmation page for Dynamic External Workflow policies #100728
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
On the Members > Invite member > confirmation page, admins can set the new member's approver. That row doesn't always appear for workspaces using a Dynamic External Workflow (DEW), so admins on those workspaces can't set a manager/approver at invite time — a capability they have in Classic.
CONST.POLICY.APPROVAL_MODE.DYNAMICEXTERNAL is a separate mode, so DEW workspaces fall through and the row is skipped. validatedApprover is also only passed to addMembersToWorkspace when shouldShowApproverRow is true, so even a drafted approver would be dropped.
Proposed fix
Include DYNAMICEXTERNAL in the check (hasDynamicExternalWorkflow() already exists in PolicyUtils):
On Members > Invite member > confirmation page, admins on a Dynamic External Workflow (DEW) workspace never see the Approver row, so they cannot set a manager at invite time like they can in Classic.
shouldShowApproverRow in WorkspaceInviteMessageComponent.tsx only passes when approvalMode equals ADVANCED:
DEW workspaces use CONST.POLICY.APPROVAL_MODE.DYNAMICEXTERNAL, a distinct mode, so they fall through the equality check and the row is skipped. Because validatedApprover is only forwarded to addMembersToWorkspace when shouldShowApproverRow is true, any drafted approver would also be dropped for these workspaces.
What changes do you think we should make in order to solve the problem?
In WorkspaceInviteMessageComponent.tsx, broaden the gate to accept both supported approval modes while keeping the DEW hide rule from #98491.
This lets DEW workspaces show the Approver row and, since validatedApprover is only passed when shouldShowApproverRow is true, the chosen approver now flows into addMembersToWorkspace. The shouldHideDynamicExternalWorkflowPeople guard keeps the row hidden when dynamicExternalWorkflowHidePeople is set, consistent with #98491, so we do not expose approver selection where people management is intentionally hidden.
What alternative solutions did you explore? (Optional)
Use PolicyUtils.hasDynamicExternalWorkflow(policy) instead of comparing approvalMode directly, which centralizes the DEW check but produces the same gating result.
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.
🤖 ProposalPolice™ is tracking duplicate proposals for this issue using an OpenAI Conversation. This comment stores that Conversation's ID and can be safely ignored.
Please re-state the problem that we are trying to solve in this issue.
On a Control workspace whose approval mode is a Dynamic External Workflow (DEW), the Approver row never renders on Members > Invite member > confirmation, so an admin cannot set the new member's approver at invite time. The same flag also guards the submit call, so a drafted approver would be discarded even if the row were reachable.
What is the root cause of that problem?
The row's visibility flag is an allow-list of exactly one approval mode, written before DEW existed.
Substituting the reported setup (Control + DYNAMIC_EXTERNAL + Workflows on): isControl → true; approvalMode === 'ADVANCED' → false; areWorkflowsEnabled → true. Exactly one term fails, and DYNAMICEXTERNAL is a sibling value of ADVANCED in the same enum (CONST/index.ts#L4305-L4312).
The same flag is reused at submit — #L204 passes shouldShowApproverRow ? validatedApprover : undefined. With undefined, Member.ts#L1010 omits submitsTo from the API params entirely, while the optimistic employee at Member.ts#L888 still gets one. One flag, both symptoms — the row is missing and the approver would not be applied.
DEW is an approver-bearing mode elsewhere in the product: WorkflowsApprovalsTab.tsx#L233-L239 already lists ADVANCEDandDYNAMICEXTERNAL when showing non-default workflows. The invite page is the one surface that never got the second mode — it has no DEW handling at all.
Not a regression: git log -S 'shouldShowApproverRow' on the file returns only the feature commit 4833f9e5def (#79878), its revert 22c9a58b893, and the re-land 64f6cc9c701. No commit ever removed DEW — the mode list was written without it, so there is no deliberate exclusion to preserve.
Every affected path — all four entry points render this same component and share the single L121 flag:
Workflows > Approvals > Expenses from > add member — the /expenses-from variant of the same component, #L90; a DEW admin hits the bug from the Workflows UI itself.
The row (#L348-L354) is not wrapped in any step or layout condition and has no index.native.tsx — one render tree, all platforms. Destination:WorkspaceInviteMessageApproverPage.tsx#L116-L121 gates only on MEMBERS write access, with no approval-mode check, so the picker already works for DEW — no change needed there.
What changes do you think we should make in order to solve the problem?
hasDynamicExternalWorkflow and shouldHideDynamicExternalWorkflowPeople are already in PolicyUtils (L1652, L1662). The hide-people term is not extra scope — it is the regression the first term would otherwise cause, since #98491 deliberately hides approval-workflow people UI on DEW workspaces with dynamicExternalWorkflowHidePeople set.
The simple one-liner is the right fix, so it is the headline. Substituting the repro into it: hasDynamicExternalWorkflow → true; shouldHideDynamicExternalWorkflowPeople → hasDEW && !!undefined → false, so the guard passes; isControl and areWorkflowsEnabled → true. The row renders, L204 forwards validatedApprover, and Member.ts#L1010 includes submitsTo — both symptoms clear with no second mechanism. What it deliberately does not fix: policies with approvalModeundefined, which the rest of the app treats as ADVANCED via getApprovalWorkflow but this line does not. That is the upgrade-path variant owned by the open #99749, so I leave the ADVANCED term untouched rather than collide with that fix.
Regression safety: one line on one screen — non-DEW modes keep identical behavior, no shared util or exported symbol changes, and showing the row cannot flip a DEW workspace to ADVANCED, since the only approvalMode: ADVANCED write (Member.ts#L1067-L1076) lives in importMembersSpreadsheet, not on the invite path.
Secondary (optional, pre-existing): WorkspaceInviteMessageApproverPage lacks the shouldHideDynamicExternalWorkflowPeople guard its sibling WorkspaceWorkflowsApprovalsApproverPage.tsx#L68 has, so a typed URL still opens the picker on a hide-people workspace. Unreachable from the UI; happy to include if wanted.
What alternative solutions did you explore? (Optional)
Plain || CONST.POLICY.APPROVAL_MODE.DYNAMICEXTERNAL with no hide-people guard. Leaks on the DEW + dynamicExternalWorkflowHidePeople path: it shows the Approver row on exactly the workspaces #98491 just hid the approval-workflow UI on.
Route the gate through getApprovalWorkflow() or isControlOnAdvancedApprovalMode(). Leaks on the undefined-approvalMode path: that helper defaults undefined → ADVANCED, so it changes behavior for upgraded workspaces and collides head-on with the fix for #99749.
Drop the isControl term. Leaks onto Collect/Team policies — App only ever readsDYNAMIC_EXTERNAL (it is server-configured, never written in this repo), so there is no evidence of a non-Control DEW workspace to justify widening the row.
Please re-state the problem that we are trying to solve in this issue.
On the Members > Invite member > confirmation page, an admin can tap an Approver row to assign the new member's manager/approver at invite time. That row shows up for Control workspaces on the advanced approval mode, but it never appears for Control workspaces that use a Dynamic External Workflow (DEW). As a result, admins on DEW workspaces cannot set an approver when inviting a member — a capability they have in Expensify Classic.
What is the root cause of that problem?
The approver row visibility flag shouldShowApproverRow only accepts the ADVANCED approval mode. DEW workspaces run on a different approval mode (CONST.POLICY.APPROVAL_MODE.DYNAMICEXTERNAL = 'DYNAMIC_EXTERNAL'), so the equality check is false and the row is skipped entirely.
The approval-mode constants confirm that ADVANCED and DYNAMICEXTERNAL are two distinct values, so an === ADVANCED check can never be satisfied by a DEW policy:
This same flag is also used when submitting the invite — validatedApprover is only forwarded to addMembersToWorkspace when shouldShowApproverRow is true. So even if a DEW admin had somehow drafted an approver, it would be dropped on submit:
Note that DEW already has first-class helpers in PolicyUtils (hasDynamicExternalWorkflow returns true for the DEW approval mode), and the approver destination page (WorkspaceWorkflowsApprovalsApproverPage) already handles DEW correctly — it only blocks the page with a not-found view when the workspace has "Hide People Table Columns" set (shouldHideDynamicExternalWorkflowPeople). The invite confirmation page is simply missing the equivalent DEW branch.
What changes do you think we should make in order to solve the problem?
Broaden the gate so the approver row is shown for both ADVANCED and DEW policies, while continuing to hide it for DEW workspaces that have hidden the people table (matching the behavior of the approver page it links to). Reuse the existing hasDynamicExternalWorkflow and shouldHideDynamicExternalWorkflowPeople helpers rather than adding new logic.
Because validatedApprover is already forwarded through shouldShowApproverRow (line 204), no change is needed there — once the row is shown for DEW, the drafted approver will also be applied on invite. shouldHideDynamicExternalWorkflowPeople is always false for non-DEW policies, so the added guard does not change existing advanced-mode behavior.
🚨 Edited by proposal-police: This proposal was edited at 2026-09-09 21:31:40 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the Members → Invite member → confirmation page, admins on Control workspaces with Dynamic External Workflow (DEW) enabled cannot see or set an Approver for the member they are inviting. That capability exists in Classic and already works on Control workspaces using Advanced approval mode, so DEW admins are missing parity at invite time.
What is the root cause of that problem?
The Approver row and the invite API payload are both gated by a single shouldShowApproverRow flag in WorkspaceInviteMessageComponent. That flag only treats ADVANCED as a supported approval mode, so DEW workspaces (approvalMode: dynamic_external) never qualify even when workflows are enabled.
Data — validatedApprover is only forwarded to addMembersToWorkspace when the row would have been shown, so even a drafted approver is dropped on submit:
addMembersToWorkspace already supports passing the approver as submitsTo in the API payload — no backend change is needed; the value is simply never supplied for DEW today.
This is not platform-specific (same JS condition on web, iOS, and Android). It does not reproduce when: the workspace is not Control, workflows are disabled, approval mode is BASIC, or DEW has dynamicExternalWorkflowHidePeople set (people management is intentionally hidden per #98491). It does reproduce for any Control + DEW + areWorkflowsEnabled workspace without the hide-people flag.
The behavior dates to when the Approver row was added (#79878): shouldShowApproverRow was written with only ADVANCED in mind and DEW was never included.
What changes do you think we should make in order to solve the problem?
Broaden shouldShowApproverRow so DEW is its own independent term, and keep the hide-people rule from #98491 as an outer guard — matching Classic, which does not let you set a manager on invite when the people table is hidden (trjExpensify).
shouldHideDynamicExternalWorkflowPeople already encodes that rule (hasDynamicExternalWorkflow(policy) && !!policy?.dynamicExternalWorkflowHidePeople):
Line 204 needs no edit — it inherits the widened flag, and addMembersToWorkspace already serializes the approver as submitsTo. That path does not flip approvalMode to ADVANCED; the optimistic merge MelvinBot flagged lives only in importPolicyMembers, so inviting with submitsTo will not convert a DEW workspace off its external workflow client-side.
DEW has to stay an independent term. Open PR #100327 (for #99749) deletes this exact line and replaces it with shouldShowApproverRow = isAdvanceApproval && !!policy?.areWorkflowsEnabled, where isAdvanceApproval is only true when filteredApprovalWorkflows.length > 1 || approvers.length > 1 || hasOverLimitApprover. A DEW workspace on the default approver derives one workflow with one approver, so isAdvanceApproval is false and a fix that only ORs DEW into === ADVANCED disappears on rebase. Putting hide-people as an outer term (it already returns false for non-DEW) means only the ADVANCED term gets swapped for isAdvanceApproval if that PR lands first.
2. WorkspaceInviteMessageApproverPage.tsx — the sub-route has no approval-mode guard today, so a hide-people DEW workspace can still reach the picker by URL. Give it the same hide-people not-found as its twin on the Workflows tab (HR read-only is a separate pre-existing gap, not this bug):
Minimal blast radius — two files. Advanced-mode workspaces are unchanged. Submit/Collect stay excluded via isControl.
No timing/race concerns — purely derived from Onyx policy data already loaded on the page.
What alternative solutions did you explore? (Optional)
Inline approvalMode === DYNAMICEXTERNAL check — equivalent to using hasDynamicExternalWorkflow, but the helper centralizes the mode check and is already the convention elsewhere in the codebase.
OR DEW into === ADVANCED only (previous version of this proposal) — rejected because PR Derive the invite Approver row from the real approval workflows #100327 replaces that comparison with isAdvanceApproval, which is false for a default-approver DEW workspace. DEW must stay its own term.
Also guard the invite page with isAnyHRReadOnlyWorkflowMode — Gusto/Zenefits/Merge-managed workspaces already show an editable Approver row while the workflows approver page returns not-found. Pre-existing and unrelated to DEW; better as its own issue.
What specific scenarios should we cover in automated tests?
Assert the Approver row is visible on the invite confirmation page for a Control workspace with approvalMode: DYNAMICEXTERNAL, areWorkflowsEnabled: true, and no dynamicExternalWorkflowHidePeople flag.
Assert the Approver row remains visible for Control + ADVANCED + workflows enabled (no regression).
Assert addMembersToWorkspace receives validatedApprover (mapped to submitsTo in the API params) when inviting on a DEW workspace with a valid approver selected.
Assert WorkspaceInviteMessageApproverPage shows the not-found view when dynamicExternalWorkflowHidePeople: true.
What changed vs your posted version:
Gate now treats DEW as its own term, with hide-people as an outer guard (trjExpensify / Classic parity).
Added why a naive === ADVANCED || DEW fix dies on rebase of #100327.
Corrected MelvinBot: the approvalMode: ADVANCED merge is in importPolicyMembers, not addMembersToWorkspace.
Please re-state the problem that we are trying to solve in this issue.
On the Members > Invite member flow, the confirmation page shows an Approver row so admins can assign the invited member's approver before sending the invite. For Control workspaces whose approval mode is a Dynamic External Workflow (DEW), that row never appears, so admins cannot set a manager/approver at invite time even though Workflows are enabled — a capability they have in Classic.
What is the root cause of that problem?
The Approver row is gated on the advanced approval mode only:
DYNAMIC_EXTERNAL is a distinct value of policy.approvalMode (CONST.POLICY.APPROVAL_MODE.DYNAMICEXTERNAL), so on DEW workspaces shouldShowApproverRow evaluates to false and the row is never rendered.
The same flag also controls what gets submitted — when it is false, the approver argument passed to addMembersToWorkspace is forced to undefined:
So even if an approver draft exists in Onyx, it is dropped at submit time on DEW policies.
What changes do you think we should make in order to solve the problem?
In WorkspaceInviteMessageComponent, widen the shouldShowApproverRow condition so it accepts the Dynamic External Workflow approval mode in addition to advanced. The existing hasDynamicExternalWorkflow helper in PolicyUtils already encodes the mode check:
The condition becomes: show the row when the policy is Control, Workflows are enabled, and the approval mode is either advanced or dynamic external — except when shouldHideDynamicExternalWorkflowPeople returns true, meaning the workspace's DEW is configured to hide people-table workflow settings. In that case the row must stay hidden, consistent with how the rest of the approval-workflow UI treats that flag:
No other change is needed: the row render and the approver forwarded to addMembersToWorkspace are both keyed on the same shouldShowApproverRow flag, so once the flag is true for DEW policies, the validated approver flows through to the invite call automatically.
What alternative solutions did you explore? (Optional)
Comparing policy?.approvalMode against CONST.POLICY.APPROVAL_MODE.DYNAMICEXTERNAL inline instead of reusing the PolicyUtils helpers. Reusing hasDynamicExternalWorkflow and shouldHideDynamicExternalWorkflowPeople keeps the DEW semantics (including the hide-people flag handling) in one place, so the helper-based approach is preferred.
changed the title [-][$175] Approver row is hidden on the workspace invite confirmation page for Dynamic External Workflow policies[/-][+][Due for payment 2026-10-22] [$175] Approver row is hidden on the workspace invite confirmation page for Dynamic External Workflow policies[/+]on Oct 15, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.9-4 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-22. 🎊
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]
[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.
[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
Precondition:
Admin of a Control workspace with Workflows enabled.
The workspace uses a Dynamic External Workflow with "Hide People Table Columns" turned off.
Test:
Go to the workspace > Members.
Tap Invite member.
Select a user and tap Next.
Verify an Approver row appears on the confirmation page.
Tap Approver and select a workspace member.
Tap Invite.
Verify the new member submits to the selected approver in Workflows.
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 Sep 9, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
melvin-bot commentedon Sep 9, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)melvin-bot commentedon Sep 9, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
samranahm commentedon Sep 9, 2026
Proposal
What is the root cause of that problem?
On Members > Invite member > confirmation page, admins on a Dynamic External Workflow (DEW) workspace never see the Approver row, so they cannot set a manager at invite time like they can in Classic.
shouldShowApproverRowinWorkspaceInviteMessageComponent.tsxonly passes whenapprovalModeequalsADVANCED:App/src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx
Line 120 in 9f9ddbd
DEW workspaces use
CONST.POLICY.APPROVAL_MODE.DYNAMICEXTERNAL, a distinct mode, so they fall through the equality check and the row is skipped. BecausevalidatedApproveris only forwarded toaddMembersToWorkspacewhenshouldShowApproverRowis true, any drafted approver would also be dropped for these workspaces.What changes do you think we should make in order to solve the problem?
In
WorkspaceInviteMessageComponent.tsx, broaden the gate to accept both supported approval modes while keeping the DEW hide rule from #98491.App/src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx
Line 120 in 9f9ddbd
This lets DEW workspaces show the Approver row and, since
validatedApproveris only passed whenshouldShowApproverRowis true, the chosen approver now flows intoaddMembersToWorkspace. TheshouldHideDynamicExternalWorkflowPeopleguard keeps the row hidden whendynamicExternalWorkflowHidePeopleis set, consistent with #98491, so we do not expose approver selection where people management is intentionally hidden.What alternative solutions did you explore? (Optional)
Use
PolicyUtils.hasDynamicExternalWorkflow(policy)instead of comparingapprovalModedirectly, which centralizes the DEW check but produces the same gating result.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.
github-actions commentedon Sep 9, 2026
🤖 ProposalPolice™ is tracking duplicate proposals for this issue using an OpenAI Conversation. This comment stores that Conversation's ID and can be safely ignored.
ahmdshrif commentedon Sep 9, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On a Control workspace whose approval mode is a Dynamic External Workflow (DEW), the Approver row never renders on Members > Invite member > confirmation, so an admin cannot set the new member's approver at invite time. The same flag also guards the submit call, so a drafted approver would be discarded even if the row were reachable.
What is the root cause of that problem?
The row's visibility flag is an allow-list of exactly one approval mode, written before DEW existed.
policy.approvalModefield against a single literal —WorkspaceInviteMessageComponent.tsx#L120-L121:Substituting the reported setup (Control +
DYNAMIC_EXTERNAL+ Workflows on):isControl→ true;approvalMode === 'ADVANCED'→ false;areWorkflowsEnabled→ true. Exactly one term fails, andDYNAMICEXTERNALis a sibling value ofADVANCEDin the same enum (CONST/index.ts#L4305-L4312).The same flag is reused at submit —
#L204passesshouldShowApproverRow ? validatedApprover : undefined. Withundefined,Member.ts#L1010omitssubmitsTofrom the API params entirely, while the optimistic employee atMember.ts#L888still gets one. One flag, both symptoms — the row is missing and the approver would not be applied.DEW is an approver-bearing mode elsewhere in the product:
WorkflowsApprovalsTab.tsx#L233-L239already listsADVANCEDandDYNAMICEXTERNALwhen showing non-default workflows. The invite page is the one surface that never got the second mode — it has no DEW handling at all.Not a regression:
git log -S 'shouldShowApproverRow'on the file returns only the feature commit4833f9e5def(#79878), its revert22c9a58b893, and the re-land64f6cc9c701. No commit ever removed DEW — the mode list was written without it, so there is no deliberate exclusion to preserve.Every affected path — all four entry points render this same component and share the single L121 flag:
DynamicWorkspaceInviteMessagePage.tsx#L28(the reported repro)/expenses-fromvariant of the same component,#L90; a DEW admin hits the bug from the Workflows UI itself.InviteNewMemberStep.tsx#L90InviteNewMemberStep.tsx#L139The row (
#L348-L354) is not wrapped in any step or layout condition and has noindex.native.tsx— one render tree, all platforms. Destination:WorkspaceInviteMessageApproverPage.tsx#L116-L121gates only onMEMBERSwrite access, with no approval-mode check, so the picker already works for DEW — no change needed there.What changes do you think we should make in order to solve the problem?
One predicate, in
WorkspaceInviteMessageComponent.tsx#L121, reusing two helpers that already exist:hasDynamicExternalWorkflowandshouldHideDynamicExternalWorkflowPeopleare already inPolicyUtils(L1652, L1662). The hide-people term is not extra scope — it is the regression the first term would otherwise cause, since#98491deliberately hides approval-workflow people UI on DEW workspaces withdynamicExternalWorkflowHidePeopleset.The simple one-liner is the right fix, so it is the headline. Substituting the repro into it:
hasDynamicExternalWorkflow→ true;shouldHideDynamicExternalWorkflowPeople→hasDEW && !!undefined→ false, so the guard passes;isControlandareWorkflowsEnabled→ true. The row renders, L204 forwardsvalidatedApprover, andMember.ts#L1010includessubmitsTo— both symptoms clear with no second mechanism. What it deliberately does not fix: policies withapprovalModeundefined, which the rest of the app treats asADVANCEDviagetApprovalWorkflowbut this line does not. That is the upgrade-path variant owned by the open#99749, so I leave theADVANCEDterm untouched rather than collide with that fix.Regression safety: one line on one screen — non-DEW modes keep identical behavior, no shared util or exported symbol changes, and showing the row cannot flip a DEW workspace to
ADVANCED, since the onlyapprovalMode: ADVANCEDwrite (Member.ts#L1067-L1076) lives inimportMembersSpreadsheet, not on the invite path.Secondary (optional, pre-existing):
WorkspaceInviteMessageApproverPagelacks theshouldHideDynamicExternalWorkflowPeopleguard its siblingWorkspaceWorkflowsApprovalsApproverPage.tsx#L68has, so a typed URL still opens the picker on a hide-people workspace. Unreachable from the UI; happy to include if wanted.What alternative solutions did you explore? (Optional)
|| CONST.POLICY.APPROVAL_MODE.DYNAMICEXTERNALwith no hide-people guard. Leaks on the DEW +dynamicExternalWorkflowHidePeoplepath: it shows the Approver row on exactly the workspaces#98491just hid the approval-workflow UI on.getApprovalWorkflow()orisControlOnAdvancedApprovalMode(). Leaks on the undefined-approvalModepath: that helper defaultsundefined→ADVANCED, so it changes behavior for upgraded workspaces and collides head-on with the fix for#99749.isControlterm. Leaks onto Collect/Team policies — App only ever readsDYNAMIC_EXTERNAL(it is server-configured, never written in this repo), so there is no evidence of a non-Control DEW workspace to justify widening the row.abbasifaizan70 commentedon Sep 9, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the Members > Invite member > confirmation page, an admin can tap an Approver row to assign the new member's manager/approver at invite time. That row shows up for Control workspaces on the
advancedapproval mode, but it never appears for Control workspaces that use a Dynamic External Workflow (DEW). As a result, admins on DEW workspaces cannot set an approver when inviting a member — a capability they have in Expensify Classic.What is the root cause of that problem?
The approver row visibility flag
shouldShowApproverRowonly accepts theADVANCEDapproval mode. DEW workspaces run on a different approval mode (CONST.POLICY.APPROVAL_MODE.DYNAMICEXTERNAL='DYNAMIC_EXTERNAL'), so the equality check isfalseand the row is skipped entirely.App/src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx
Lines 120 to 121 in c1eec54
The approval-mode constants confirm that
ADVANCEDandDYNAMICEXTERNALare two distinct values, so an=== ADVANCEDcheck can never be satisfied by a DEW policy:App/src/CONST/index.ts
Lines 4305 to 4312 in c1eec54
This same flag is also used when submitting the invite —
validatedApproveris only forwarded toaddMembersToWorkspacewhenshouldShowApproverRowistrue. So even if a DEW admin had somehow drafted an approver, it would be dropped on submit:App/src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx
Line 204 in c1eec54
Note that DEW already has first-class helpers in
PolicyUtils(hasDynamicExternalWorkflowreturnstruefor the DEW approval mode), and the approver destination page (WorkspaceWorkflowsApprovalsApproverPage) already handles DEW correctly — it only blocks the page with a not-found view when the workspace has "Hide People Table Columns" set (shouldHideDynamicExternalWorkflowPeople). The invite confirmation page is simply missing the equivalent DEW branch.App/src/libs/PolicyUtils.ts
Lines 1652 to 1664 in c1eec54
What changes do you think we should make in order to solve the problem?
Broaden the gate so the approver row is shown for both
ADVANCEDand DEW policies, while continuing to hide it for DEW workspaces that have hidden the people table (matching the behavior of the approver page it links to). Reuse the existinghasDynamicExternalWorkflowandshouldHideDynamicExternalWorkflowPeoplehelpers rather than adding new logic.Update the import from
@libs/PolicyUtils:App/src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx
Lines 28 to 37 in c1eec54
Then update the visibility flag:
App/src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx
Line 121 in c1eec54
Because
validatedApproveris already forwarded throughshouldShowApproverRow(line 204), no change is needed there — once the row is shown for DEW, the drafted approver will also be applied on invite.shouldHideDynamicExternalWorkflowPeopleis alwaysfalsefor non-DEW policies, so the added guard does not change existingadvanced-mode behavior.neerajbachani commentedon Sep 9, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-09-09 21:31:40 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the Members → Invite member → confirmation page, admins on Control workspaces with Dynamic External Workflow (DEW) enabled cannot see or set an Approver for the member they are inviting. That capability exists in Classic and already works on Control workspaces using Advanced approval mode, so DEW admins are missing parity at invite time.
What is the root cause of that problem?
The Approver row and the invite API payload are both gated by a single
shouldShowApproverRowflag inWorkspaceInviteMessageComponent. That flag only treatsADVANCEDas a supported approval mode, so DEW workspaces (approvalMode: dynamic_external) never qualify even when workflows are enabled.App/src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx
Lines 119 to 120 in a6f8c39
DEW is a distinct approval mode.
PolicyUtils.hasDynamicExternalWorkflowexplicitly checks for it:App/src/libs/PolicyUtils.ts
Lines 1607 to 1608 in a6f8c39
Because
shouldShowApproverRowis false for DEW, two things break downstream:MenuItemWithTopDescriptionis never rendered:App/src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx
Lines 338 to 351 in a6f8c39
validatedApproveris only forwarded toaddMembersToWorkspacewhen the row would have been shown, so even a drafted approver is dropped on submit:App/src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx
Lines 189 to 204 in a6f8c39
addMembersToWorkspacealready supports passing the approver assubmitsToin the API payload — no backend change is needed; the value is simply never supplied for DEW today.This is not platform-specific (same JS condition on web, iOS, and Android). It does not reproduce when: the workspace is not Control, workflows are disabled, approval mode is
BASIC, or DEW hasdynamicExternalWorkflowHidePeopleset (people management is intentionally hidden per #98491). It does reproduce for any Control + DEW +areWorkflowsEnabledworkspace without the hide-people flag.The behavior dates to when the Approver row was added (#79878):
shouldShowApproverRowwas written with onlyADVANCEDin mind and DEW was never included.What changes do you think we should make in order to solve the problem?
Broaden
shouldShowApproverRowso DEW is its own independent term, and keep the hide-people rule from #98491 as an outer guard — matching Classic, which does not let you set a manager on invite when the people table is hidden (trjExpensify).shouldHideDynamicExternalWorkflowPeoplealready encodes that rule (hasDynamicExternalWorkflow(policy) && !!policy?.dynamicExternalWorkflowHidePeople):App/src/libs/PolicyUtils.ts
Lines 1662 to 1664 in fe288f3
1.
WorkspaceInviteMessageComponent.tsx— import the two helpers and replace the gate:Line 204 needs no edit — it inherits the widened flag, and
addMembersToWorkspacealready serializes the approver assubmitsTo. That path does not flipapprovalModetoADVANCED; the optimistic merge MelvinBot flagged lives only inimportPolicyMembers, so inviting withsubmitsTowill not convert a DEW workspace off its external workflow client-side.App/src/libs/actions/Policy/Member.ts
Lines 1010 to 1011 in fe288f3
App/src/libs/actions/Policy/Member.ts
Lines 1067 to 1075 in fe288f3
DEW has to stay an independent term. Open PR #100327 (for #99749) deletes this exact line and replaces it with
shouldShowApproverRow = isAdvanceApproval && !!policy?.areWorkflowsEnabled, whereisAdvanceApprovalis only true whenfilteredApprovalWorkflows.length > 1 || approvers.length > 1 || hasOverLimitApprover. A DEW workspace on the default approver derives one workflow with one approver, soisAdvanceApprovalis false and a fix that only ORs DEW into=== ADVANCEDdisappears on rebase. Putting hide-people as an outer term (it already returns false for non-DEW) means only theADVANCEDterm gets swapped forisAdvanceApprovalif that PR lands first.2.
WorkspaceInviteMessageApproverPage.tsx— the sub-route has no approval-mode guard today, so a hide-people DEW workspace can still reach the picker by URL. Give it the same hide-people not-found as its twin on the Workflows tab (HR read-only is a separate pre-existing gap, not this bug):App/src/pages/workspace/WorkspaceInviteMessageApproverPage.tsx
Lines 122 to 130 in fe288f3
Why this is the best fix:
addMembersToWorkspaceall flow throughshouldShowApproverRow.shouldHideDynamicExternalWorkflowPeoplehelper already used on workflow approval pages.isControl.What alternative solutions did you explore? (Optional)
approvalMode === DYNAMICEXTERNALcheck — equivalent to usinghasDynamicExternalWorkflow, but the helper centralizes the mode check and is already the convention elsewhere in the codebase.validatedApprovereven when the row is hidden. Rejected because it would send approver data in scenarios where [Due for payment 2026-09-15] [DEW in NewDot] Hide the approval workflow UI when "Hide People Table Columns" (dynamicExternalWorkflowHidePeople) is set #98491 / Classic intentionally hide people management, and it duplicates logic instead of fixing the shared gate.=== ADVANCEDonly (previous version of this proposal) — rejected because PR Derive the invite Approver row from the real approval workflows #100327 replaces that comparison withisAdvanceApproval, which is false for a default-approver DEW workspace. DEW must stay its own term.isAnyHRReadOnlyWorkflowMode— Gusto/Zenefits/Merge-managed workspaces already show an editable Approver row while the workflows approver page returns not-found. Pre-existing and unrelated to DEW; better as its own issue.What specific scenarios should we cover in automated tests?
approvalMode: DYNAMICEXTERNAL,areWorkflowsEnabled: true, and nodynamicExternalWorkflowHidePeopleflag.dynamicExternalWorkflowHidePeople: true([Due for payment 2026-09-15] [DEW in NewDot] Hide the approval workflow UI when "Hide People Table Columns" (dynamicExternalWorkflowHidePeople) is set #98491 / Classic parity).ADVANCED+ workflows enabled (no regression).addMembersToWorkspacereceivesvalidatedApprover(mapped tosubmitsToin the API params) when inviting on a DEW workspace with a valid approver selected.WorkspaceInviteMessageApproverPageshows the not-found view whendynamicExternalWorkflowHidePeople: true.What changed vs your posted version:
=== ADVANCED || DEWfix dies on rebase of #100327.approvalMode: ADVANCEDmerge is inimportPolicyMembers, notaddMembersToWorkspace.wildan-m commentedon Sep 9, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the Members > Invite member flow, the confirmation page shows an Approver row so admins can assign the invited member's approver before sending the invite. For Control workspaces whose approval mode is a Dynamic External Workflow (DEW), that row never appears, so admins cannot set a manager/approver at invite time even though Workflows are enabled — a capability they have in Classic.
What is the root cause of that problem?
The Approver row is gated on the
advancedapproval mode only:App/src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx
Line 121 in 3607634
DYNAMIC_EXTERNALis a distinct value ofpolicy.approvalMode(CONST.POLICY.APPROVAL_MODE.DYNAMICEXTERNAL), so on DEW workspacesshouldShowApproverRowevaluates tofalseand the row is never rendered.The same flag also controls what gets submitted — when it is
false, the approver argument passed toaddMembersToWorkspaceis forced toundefined:App/src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx
Line 204 in 3607634
So even if an approver draft exists in Onyx, it is dropped at submit time on DEW policies.
What changes do you think we should make in order to solve the problem?
In
WorkspaceInviteMessageComponent, widen theshouldShowApproverRowcondition so it accepts the Dynamic External Workflow approval mode in addition toadvanced. The existinghasDynamicExternalWorkflowhelper inPolicyUtilsalready encodes the mode check:App/src/libs/PolicyUtils.ts
Lines 1652 to 1654 in 3607634
The condition becomes: show the row when the policy is Control, Workflows are enabled, and the approval mode is either advanced or dynamic external — except when
shouldHideDynamicExternalWorkflowPeoplereturnstrue, meaning the workspace's DEW is configured to hide people-table workflow settings. In that case the row must stay hidden, consistent with how the rest of the approval-workflow UI treats that flag:App/src/libs/PolicyUtils.ts
Lines 1662 to 1664 in 3607634
No other change is needed: the row render and the approver forwarded to
addMembersToWorkspaceare both keyed on the sameshouldShowApproverRowflag, so once the flag istruefor DEW policies, the validated approver flows through to the invite call automatically.Compare branch: https://github.com/Expensify/App/compare/main...wildan-m:App:wildan/100728-invite-approver-dew?expand=1
What alternative solutions did you explore? (Optional)
Comparing
policy?.approvalModeagainstCONST.POLICY.APPROVAL_MODE.DYNAMICEXTERNALinline instead of reusing thePolicyUtilshelpers. ReusinghasDynamicExternalWorkflowandshouldHideDynamicExternalWorkflowPeoplekeeps the DEW semantics (including the hide-people flag handling) in one place, so the helper-based approach is preferred.wildan-m commentedon Sep 9, 2026
Proposal updated — added compare branch with implementation.
104 remaining items
[-][$175] Approver row is hidden on the workspace invite confirmation page for Dynamic External Workflow policies[/-][+][Due for payment 2026-10-22] [$175] Approver row is hidden on the workspace invite confirmation page for Dynamic External Workflow policies[/+]melvin-bot commentedon Oct 15, 2026
@Krishna2323
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.9-4 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-22. 🎊
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 19, 2026
@Krishna2323 Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Oct 21, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Oct 21, 2026
Payment Summary
Resolving PRs:
Show the invite Approver row on Dynamic External Workflow workspaces #103300
Reviewer: @Krishna2323 owed $175 via NewDot
BugZero Checklist (@mallenexpensify)
Krishna2323 commentedon Oct 25, 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: feat: [CFI] Add Approver row on the member invite confirmation page #84511 (comment)
Link to the comment on the Issue: [Due for payment 2026-04-07] [CFI] Add
Approverrow on the member invite confirmation page #79157 (comment)[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
Precondition:
Test:
Do we agree 👍 or 👎
mallenexpensify commentedon Oct 26, 2026
Payment Summary
Contributor+: @Krishna2323 due $250 via NewDot
laurenreidexpensify commentedon Nov 26, 2026
Approved @Krishna2323 $250 New Expensify