Problem
When a workspace is on a Dynamic External Workflow (DEW / LINEARAPPROVAL, approvalMode === DYNAMICEXTERNAL) and the "Hide People Table Columns" option (dynamicExternalWorkflowHidePeople) is set in the DEW Manager, NewDot should hide the approval workflow UI from the customer — matching Expensify Classic (OldDot). Today NewDot ignores that flag: the Workflows page keys entirely off approvalMode === DYNAMICEXTERNAL and always renders the read-only approval workflow list plus the "custom approval workflow enabled" info banner, so the "Hide People Table Columns" toggle has no effect in NewDot.
The backend already returns dynamicExternalWorkflowHidePeople in the policy summary payload (returned only when true), so the client can decide to hide the section. NewDot just never consumes it — the App codebase currently has zero references to this flag.
Expected behavior: when dynamicExternalWorkflowHidePeople is true, keep the existing "custom approval workflow is enabled…" info banner as the explanation, but hide the actual approval workflow configuration UI so the customer never sees or reaches it.
Proposed changes
-
Add the flag to the Policy type — add dynamicExternalWorkflowHidePeople?: boolean; to src/types/onyx/Policy.ts (alongside approvalMode).
-
Gate the approval-workflow render in src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx on the flag. Suggested approach: derive something like hidePeople = !!policy?.dynamicExternalWorkflowHidePeople and, when it is true:
Context: isDEWEnabled is computed at WorkspaceWorkflowsPage.tsx:467 via hasDynamicExternalWorkflow in src/libs/PolicyUtils.ts:1596, which today only checks approvalMode and ignores any hide flag.
-
Block deep-link access to the approvals routes while the flag is true — ensure WORKSPACE_WORKFLOWS_APPROVALS_* routes (WORKSPACE_WORKFLOWS_APPROVALS_NEW / _EDIT and WORKSPACE_WORKFLOWS_APPROVALS_EXPENSES_FROM) can't be reached via direct URL when dynamicExternalWorkflowHidePeople is true (e.g. redirect to a NotFound/full-page fallback in the approvals screens, following existing access-gating patterns in those pages).
Tests
Add a Jest test for WorkspaceWorkflowsPage covering both flag states:
dynamicExternalWorkflowHidePeople: true → banner is rendered, workflow list / search bar / add-approval affordance are not rendered.
- flag
false/absent (DEW still enabled) → existing behavior is unchanged (banner + read-only workflow list still rendered).
Open item to confirm before/while implementing
Confirm dynamicExternalWorkflowHidePeople is actually present in the NewDot policy summary payload for an affected workspace — the backend returns it only when true, so verify a real DEW workspace with the toggle set surfaces it in the client policy object.
This App work was split out from an internal tracking issue so an external contributor can pick it up.
Upwork Automation - Do Not Edit
Problem
When a workspace is on a Dynamic External Workflow (DEW / LINEARAPPROVAL,
approvalMode === DYNAMICEXTERNAL) and the "Hide People Table Columns" option (dynamicExternalWorkflowHidePeople) is set in the DEW Manager, NewDot should hide the approval workflow UI from the customer — matching Expensify Classic (OldDot). Today NewDot ignores that flag: the Workflows page keys entirely offapprovalMode === DYNAMICEXTERNALand always renders the read-only approval workflow list plus the "custom approval workflow enabled" info banner, so the "Hide People Table Columns" toggle has no effect in NewDot.The backend already returns
dynamicExternalWorkflowHidePeoplein the policy summary payload (returned only whentrue), so the client can decide to hide the section. NewDot just never consumes it — the App codebase currently has zero references to this flag.Expected behavior: when
dynamicExternalWorkflowHidePeopleistrue, keep the existing "custom approval workflow is enabled…" info banner as the explanation, but hide the actual approval workflow configuration UI so the customer never sees or reaches it.Proposed changes
Add the flag to the
Policytype — adddynamicExternalWorkflowHidePeople?: boolean;tosrc/types/onyx/Policy.ts(alongsideapprovalMode).Gate the approval-workflow render in
src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsxon the flag. Suggested approach: derive something likehidePeople = !!policy?.dynamicExternalWorkflowHidePeopleand, when it istrue:WorkspaceWorkflowsPage.tsx:711-728.WorkspaceWorkflowsPage.tsx:729-736.displayedWorkflows.map(...)read-only workflow list —WorkspaceWorkflowsPage.tsx:742-781.WorkspaceWorkflowsPage.tsx:788-799.Context:
isDEWEnabledis computed atWorkspaceWorkflowsPage.tsx:467viahasDynamicExternalWorkflowinsrc/libs/PolicyUtils.ts:1596, which today only checksapprovalModeand ignores any hide flag.Block deep-link access to the approvals routes while the flag is
true— ensureWORKSPACE_WORKFLOWS_APPROVALS_*routes (WORKSPACE_WORKFLOWS_APPROVALS_NEW/_EDITandWORKSPACE_WORKFLOWS_APPROVALS_EXPENSES_FROM) can't be reached via direct URL whendynamicExternalWorkflowHidePeopleistrue(e.g. redirect to aNotFound/full-page fallback in the approvals screens, following existing access-gating patterns in those pages).Tests
Add a Jest test for
WorkspaceWorkflowsPagecovering both flag states:dynamicExternalWorkflowHidePeople: true→ banner is rendered, workflow list / search bar / add-approval affordance are not rendered.false/absent (DEW still enabled) → existing behavior is unchanged (banner + read-only workflow list still rendered).Open item to confirm before/while implementing
Confirm
dynamicExternalWorkflowHidePeopleis actually present in the NewDot policy summary payload for an affected workspace — the backend returns it only whentrue, so verify a real DEW workspace with the toggle set surfaces it in the client policy object.This App work was split out from an internal tracking issue so an external contributor can pick it up.
Upwork Automation - Do Not Edit