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-07-17] [$250] New Feature : Allow inviting new users in the Add approval workflow flow #61625
We recently observed that users repeatedly attempted to assign a card during setup, only to realize they first needed to invite the person via the Members tab. The same friction occurs in the Add approval workflow case.
Proposal:
We should allow users to invite new members directly within Add approval workflow. This makes the setup process more seamless and reduces context switching. The full flow should be.
changed the title [-]New Feature : Allow inviting new users in the `Add approval workflow` flow[/-][+][$250] New Feature : Allow inviting new users in the `Add approval workflow` flow[/+]on May 7, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-05-13 17:13:38 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Users setting up an approval workflow couldn't invite new people directly from the "Expenses From" step if they weren't already workspace members. This forced a disruptive detour to the "Members" tab to invite them first.
What is the root cause of that problem?
The "Expenses From" page (WorkspaceWorkflowsApprovalsExpensesFromPage.tsx) lacked integrated search and invitation capabilities for non-workspace members.
The selection of a new user (to be invited) as the "Expenses From" person wasn't persisted in the draft workflow before navigating to the invitation message screen. This caused the selection to be lost upon returning to the workflow.
What changes do you think we should make in order to solve the problem?
We integrated member search and invite functionality into the "Expenses From" page and adjusted the data flow:
WorkspaceWorkflowsApprovalsExpensesFromPage.tsx:
Enhanced to search for existing contacts and new emails/phone numbers, displaying them as selectable options.
Crucially, in the nextStep function (when the user proceeds):
Persist Selection First: All selected members (existing and new invitees) are immediately saved to the Onyx draft approval workflow using setApprovalWorkflowMembers.
// In nextStep callback:
+ const membersToSet: Member[] = selectedMembers.map(...); // map to Member type+ setApprovalWorkflowMembers(membersToSet);
Identify & Prepare Invites: If any selected members are new, their details are prepared for invitation using setWorkspaceInviteMembersDraft.
// Still in nextStep, after setApprovalWorkflowMembers:
+ const membersRequiringInvite = selectedMembers.filter(...); // find new users+ if (membersRequiringInvite.length > 0) {+ const invitedEmailsToAccountIDs = membersRequiringInvite.reduce(...); // build ID map+ setWorkspaceInviteMembersDraft(route.params.policyID, invitedEmailsToAccountIDs);+ Navigation.navigate(ROUTES.WORKSPACE_INVITE_MESSAGE...);+ return;+ }
Navigate: Users are then navigated either to the invite message page (if new members) or directly to the approver selection step.
WorkspaceInviteMessagePage.tsx:
After successfully sending an invitation (via addMembersToWorkspace):
It now checks if the flow originated from the approval workflow setup (using route.params.backTo).
If so, it navigates the user directly to the next step in the workflow (approver selection page) instead of a generic page.
// In sendInvitation, after addMembersToWorkspace and clearing drafts:
+ const isFromWorkflowsApprovalsFlow = (route.params.backTo as string)?.includes('workflows/approvals');+ if (isFromWorkflowsApprovalsFlow) {+ Navigation.navigate(ROUTES.WORKSPACE_WORKFLOWS_APPROVALS_APPROVER.getRoute(route.params.policyID, 0));+ return;+ }
This ensures the "Expenses From" choice is always saved before any detours, and the user is seamlessly guided through the invitation and back to the workflow.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We can write an automated test that simulates the workflow approval process by mocking an empty workspace, searching for a non-existent member, and selecting them from the results. The test will verify that the navigation correctly proceeds to the invite message page, and after sending the invitation, confirms that the user is redirected to the approver selection page. This follows the testing patterns established in PolicyUtilsTest.ts, where we verify workspace-related functionality through similar state management and navigation verification.
What alternative solutions did you explore? (Optional)
changed the title [-][$250] New Feature : Allow inviting new users in the `Add approval workflow` flow[/-][+][Due for payment 2026-07-17] [$250] New Feature : Allow inviting new users in the `Add approval workflow` flow[/+]on Jul 17, 2026
Contributor: @twilight2294 paid $250 via Upwork
Contributor+: @hoangzinh due $250 via NewDot
@hoangzinh what's @MobileMage due here? I see they're assigned. Paying $250 to you and @twilight2294 for sticking with this and getting it over the finish line.
Activity
[-]New Feature : Allow inviting new users in the `Add approval workflow` flow[/-][+][$250] New Feature : Allow inviting new users in the `Add approval workflow` flow[/+]melvin-bot commentedon May 7, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021920256850804652435
melvin-bot commentedon May 7, 2025
Current assignee @JmillsExpensify is eligible for the NewFeature assigner, not assigning anyone new.
melvin-bot commentedon May 7, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (
External)MobileMage commentedon May 8, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-05-13 17:13:38 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Users setting up an approval workflow couldn't invite new people directly from the "Expenses From" step if they weren't already workspace members. This forced a disruptive detour to the "Members" tab to invite them first.
What is the root cause of that problem?
WorkspaceWorkflowsApprovalsExpensesFromPage.tsx) lacked integrated search and invitation capabilities for non-workspace members.What changes do you think we should make in order to solve the problem?
We integrated member search and invite functionality into the "Expenses From" page and adjusted the data flow:
WorkspaceWorkflowsApprovalsExpensesFromPage.tsx:nextStepfunction (when the user proceeds):setApprovalWorkflowMembers.setWorkspaceInviteMembersDraft.WorkspaceInviteMessagePage.tsx:addMembersToWorkspace):route.params.backTo).This ensures the "Expenses From" choice is always saved before any detours, and the user is seamlessly guided through the invitation and back to the workflow.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We can write an automated test that simulates the workflow approval process by mocking an empty workspace, searching for a non-existent member, and selecting them from the results. The test will verify that the navigation correctly proceeds to the invite message page, and after sending the invitation, confirms that the user is redirected to the approver selection page. This follows the testing patterns established in PolicyUtilsTest.ts, where we verify workspace-related functionality through similar state management and navigation verification.
What alternative solutions did you explore? (Optional)
None.
Preview
output.mp4
bradyrose commentedon May 8, 2025
Withdrawing this proposal to comply with Expensify’s one-proposal-at-a-time policy.
Hope to circle back if it’s still open later. Thanks!
214 remaining items
hoangzinh commentedon Jul 15, 2026
@JmillsExpensify feature is deployed to Prod. But we still have 2 follow-up issues #61625 (comment)
JmillsExpensify commentedon Jul 15, 2026
Nice. Given that those are documented separately, should we close this issue?
hoangzinh commentedon Jul 16, 2026
Given 1 of the follow-up issue has been closed. Another one is the BE issue. I think we're ready for payment, then close. Here is MelvinBot payment review #61625 (comment)
melvin-bot commentedon Jul 17, 2026
Current assignee @mallenexpensify is eligible for the Awaiting Payment assigner, not assigning anyone new.
[-][$250] New Feature : Allow inviting new users in the `Add approval workflow` flow[/-][+][Due for payment 2026-07-17] [$250] New Feature : Allow inviting new users in the `Add approval workflow` flow[/+]JmillsExpensify commentedon Jul 17, 2026
Added the appropriate label.
mallenexpensify commentedon Jul 21, 2026
Payment Summary
Contributor: @twilight2294 paid $250 via Upwork
Contributor+: @hoangzinh due $250 via NewDot
@hoangzinh what's @MobileMage due here? I see they're assigned. Paying $250 to you and @twilight2294 for sticking with this and getting it over the finish line.
hoangzinh commentedon Jul 21, 2026
@MobileMage was first assigned, but they were busy and couldn't push this to finish line #64727 (comment)
laurenreidexpensify commentedon Jul 23, 2026
$250 approved for @hoangzinh