Filter Expensify team members from approval workflows table#83366
Filter Expensify team members from approval workflows table#83366MobileMage wants to merge 4 commits intoExpensify:mainfrom
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
eh2077
left a comment
There was a problem hiding this comment.
Looks good overall, can you add unit tests to cover changes please?
src/libs/WorkflowUtils.ts
Outdated
| // Determine if we should filter Expensify team members (only for non-Expensify customers) | ||
| const shouldFilterExpensifyTeam = !!policyOwner && !!currentUserLogin && !isExpensifyTeam(policyOwner) && !isExpensifyTeam(currentUserLogin); |
There was a problem hiding this comment.
I think this condition intents to filter out Expensify team members, so please update the comment and rename to variable to shouldFilterOutExpensifyTeam
trjExpensify
left a comment
There was a problem hiding this comment.
- Create a workspace owned by a non-Expensify email
- Add an Expensify team member (e.g., an @expensify.com email) to the workspace
- Configure the Expensify team member as an approver in a workflow
- Navigate to Workspace > Workflows
- Verify the Expensify team member does not appear in the workflows table (not as a member or approver)
- Click "Add Approval Workflow"
- Verify the Expensify team member does not appear in the menu
The tests don't make sense. How can you do step 3?
|
Right, updated @trjExpensify |
|
@MobileMage bump on #83366 (review), thanks! |
|
@eh2077 done |
|
Can you also add unit tests? |
|
Added @eh2077 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
@MobileMage I can still select an Expensify team (fake) member when adding a new workflow Screen.Recording.2026-03-13.at.9.46.29.PM.mov |
|
Looking into it now |
|
@eh2077 that's odd, can't seem to reproduce Are you sure you've got the right branch? |

Explanation of Change
Filters internal Expensify team members (SRAMs/guides with @expensify.com or @team.expensify.com emails) from the approval workflows table in Workspace Workflows. This matches the existing filtering behavior already implemented in WorkspaceMembersPage.
Changes in
WorkflowUtils.ts:currentUserLoginparam toconvertPolicyEmployeesToApprovalWorkflowssubmitsTopoints to an Expensify team member, the workflow redirects to the first non-Expensify approver in theforwardsTochainUpdated all three call sites to pass
currentUserLogin:WorkspaceWorkflowsPage.tsxWorkspaceWorkflowsApprovalsEditPage.tsxWorkspaceMemberDetailsPage.tsxFixed Issues
$ #80744
PROPOSAL: #80744 (comment)
Tests
Offline tests
N/A - The filtering logic runs client-side and does not depend on network state.
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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
Kapture.2026-03-09.at.17.56.29.mp4