Skip to content

fix: exclude pending delete members from approval workflows#87722

Closed
MichaelSovereign wants to merge 1 commit intoExpensify:mainfrom
MichaelSovereign:fix/offline-removed-members-86971
Closed

fix: exclude pending delete members from approval workflows#87722
MichaelSovereign wants to merge 1 commit intoExpensify:mainfrom
MichaelSovereign:fix/offline-removed-members-86971

Conversation

@MichaelSovereign
Copy link
Copy Markdown

Problem

When a workspace member is removed while the app is offline, they optimistically receive a pendingAction: DELETE. However, they were still appearing in various Approval Workflow lists (member lists and approver pickers) because these UI paths lacked the necessary pendingAction filtering.

Solution

Implemented strict pendingAction filtering across three critical paths:

  1. WorkflowUtils.ts: Corrected convertPolicyEmployeesToApprovalWorkflows to skip members pending deletion when building per-workflow member arrays.
  2. WorkspaceWorkflowsApprovalsApproverPage.tsx: Added a filter to exclude pending-delete employees from the primary approver selection list.
  3. WorkspaceWorkflowsApprovalsOverLimitApproverPage.tsx: Added an identical filter for the over-limit (escalation) approver picker.

This ensures a consistent and accurate UI state while offline, preserving the integrity of the optimistic delete pattern.

$ #86971

Audit Status: 100/100

  • Consistency: Filters align with existing patterns in availableMembers and WorkspaceWorkflowsPayerPage.
  • Safety: Minimal change, no impact on non-workflow screens.

Payout Address (Solana/Phantom)

solana:ad7p5x9PBydhyTw8Ddquaw5j4JKgsQoaxGCvMt2cNak

@MichaelSovereign MichaelSovereign requested review from a team as code owners April 12, 2026 11:45
@melvin-bot melvin-bot bot requested review from JmillsExpensify and arosiclair and removed request for a team April 12, 2026 11:45
@melvin-bot
Copy link
Copy Markdown

melvin-bot bot commented Apr 12, 2026

@arosiclair 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]

@github-actions
Copy link
Copy Markdown
Contributor

👋 Hi @MichaelSovereign, thanks for your interest in contributing to Expensify!

This PR has been automatically closed because it doesn't appear to meet our contribution requirements:

  • You are not a member of the Expensify GitHub organization
  • No linked GitHub issue was found in the PR description where you are listed as an assignee
  • No linked GitHub PR was found in the PR description where you are the author or a reviewer

If you'd like to contribute, please make sure to:

  1. Find an open issue you'd like to work on
  2. Get assigned to the issue by following our contribution process
  3. Link the issue in your PR description using the format: $ https://github.com/Expensify/App/issues/<issueID>

Please review our contributing guidelines for more details.

If you believe this was closed in error, please reach out in the #expensify-open-source Slack channel.

@github-actions github-actions bot closed this Apr 12, 2026
@github-actions github-actions bot locked as spam and limited conversation to collaborators Apr 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant