Repository navigation
Show the invite Approver row on Dynamic External Workflow workspaces - #103300
Conversation
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
🤖 Android test steps verification results: The PR's Tests section is still a TODO, so I used the repro steps from the linked issue plus Basic and Advanced regression checks. Basic mode correctly hides the Approver row and Advanced mode correctly shows it. I couldn't test the DEW case itself, because the test account has no UI path to switch a workspace to Dynamic External Workflow.
To test the DEW case, someone needs a workspace whose |
|
🤖 Web test steps verification results: The PR's Tests section is still a TODO, so I used the repro steps from the linked issue plus regression checks. Basic mode correctly hides the Approver row and Advanced mode correctly shows it. I couldn't test the DEW steps: the UI offers no way to set a workspace to Dynamic External Workflow, and the web test tooling can't change app data on the client to fake it.
To test the DEW steps, someone needs a workspace whose |
|
@MelvinBot resolve conflicts |
…wForDynamicExternalWorkflow Co-authored-by: Krishna <Krishna2323@users.noreply.github.com> # Conflicts: # src/pages/workspace/members/WorkspaceInviteMessageComponent.tsx
|
I merged What conflicted: Derive the invite Approver row from the real approval workflows changed the same gate in How I resolved it: I kept const isDynamicExternalApproval = hasDynamicExternalWorkflow(policy) && isControlPolicy(policy);
const shouldShowApproverRow = (isAdvanceApproval || isDynamicExternalApproval) && !!policy?.areWorkflowsEnabled && !shouldHideDynamicExternalWorkflowPeople(policy);Test update: The "Advanced workspace with a stale flag" case in Not verified locally: I couldn't run Jest, typecheck, or ESLint here. The environment blocks npm install scripts, so patches and Bun aren't set up. Test files unchanged from |
…wForDynamicExternalWorkflow Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
Fixed the failing The error was in
Details
|
|
@MelvinBot could you please complete these:
|
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
All three are done.
Checks run: The 3 related Jest suites pass (14/14). |
|
The failing Analysis: Both failures are in test files this PR doesn't touch. Other PRs fail on the same tests. Every Jest run I checked on other branches since about 16:29 UTC fails on them, for example Evidence:
|
|
@MelvinBot merge main and mark the PR ready for review |
…wForDynamicExternalWorkflow Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
@Krishna2323 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
I merged Your latest commit, |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid_hybrid.mp4Android: mWeb Chromeandroid_mWeb.mp4iOS: HybridAppios_hybrid.mp4iOS: mWeb Safariios_mWeb.mp4MacOS: Chrome / Safariweb_chrome.mp4 |
dylanexpensify
left a comment
There was a problem hiding this comment.
Looks good from a product perspective 👍
|
🚧 Julesssss has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 9.5.9-0 🚀
|
|
No help site update needed. This PR extends the existing invite-page Approver row to Dynamic External Workflow workspaces, a niche Control-only setup, and no article in |
|
@Krishna2323 Applause have hide people table columns enabled accounts only. Could you help with "turning off" |
|
That's the |
Hi @kavimuru, I will try and do this. Could you share the workspace/admin email you are using on the control plan? |
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.5.9-4 🚀
Bundle Size Analysis (Sentry): |















Explanation of Change
The invite confirmation page only showed the Approver row for workspaces with a custom (advanced) approval workflow. Dynamic External Workflow (DEW) is a separate mode, so admins on DEW workspaces couldn't set a new member's approver at invite time, unlike Classic.
This PR adds DEW as its own term in the gate:
isDynamicExternalApproval = hasDynamicExternalWorkflow(policy) && isControlPolicy(policy)shouldShowApproverRow = (isAdvanceApproval || isDynamicExternalApproval) && !!policy?.areWorkflowsEnabled && !shouldHideDynamicExternalWorkflowPeople(policy)isAdvanceApprovalcomes fromuseApprovalWorkflows(merged in frommain), which derives Advanced from the real workflows instead ofapprovalMode. TheisControlPolicyterm keeps the DEW case Control-only, likeisAdvanceApproval.The "Hide People Table Columns" check (
shouldHideDynamicExternalWorkflowPeople) applies to the whole gate. It only returnstrueon DEW workspaces, so a stale flag on an Advanced workspace doesn't hide the row. This matches Classic and the workflow pages from #98491. The same gate already controls whether the approver is sent toaddMembersToWorkspace, so no downstream change is needed. Per the CME,SharePolicyonly auto-enables advanced approvals forOPTIONAL/BASICpolicies, so sendingsubmitsTodoesn't convert a DEW workspace.The HR read-only workflow guard (
isAnyHRReadOnlyWorkflowMode) is out of scope, as agreed on the issue.Adds
tests/ui/WorkspaceInviteMessageDEWApproverRowTest.tsx, which covers:dynamicExternalWorkflowHidePeople: row shown, approver sentdynamicExternalWorkflowHidePeople: row hidden, no approver sentTEAM) workspace: row hiddenAI Tests (run by MelvinBot):
npm testonWorkspaceInviteMessageDEWApproverRowTest,WorkspaceInviteMessageFastEditSaveTest,WorkspaceInviteMessageApproverPageTest: 14/14 passedTEAMcase fails when theisControlPolicyterm is bypassed, and passes with itnpm run typecheck: passednpx eslinton the changed test file: passed (lint-changedcouldn't find a merge base in the shallow clone)npm run fmt: no diffnpm testsuite and Storybook smoke test (left to CI). No live web test, because test accounts can't be set toDYNAMIC_EXTERNAL.Fixed Issues
$ #100728
PROPOSAL: #100728 (comment)
Tests
Precondition: a Control workspace with Workflows enabled, where you are an admin and the approval mode is Dynamic External Workflow with "Hide People Table Columns" turned off.
Offline tests
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari