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-09-22] [Vacation Delegate Invite] [FE] Replace the policy diff warning modal with an invite step page in the RHP #99078
SetVacationDelegate with overridePolicyDiffWarning: false returns jsonCode 305 with data.policyDiff = {adminPolicies, nonAdminPolicies} (two lists of policy IDs, split by whether the requester is an admin) when the delegate is missing from some workspaces. The server writes nothing on a 305. NewDot ignores the data and only shows a generic confirm modal (VacationDelegatePage.tsx#L71-L88).
Changes
Replace the modal with a step in the RHP that renders one of three variations:
Admin of none (adminPolicies empty): explain that the admins will get an email. One button, "Confirm".
Admin of all (nonAdminPolicies empty): offer "Invite" and "Skip".
Admin of some (both lists filled): show both sections, offer "Invite" and "Skip".
If there is no diff, the first call sets the delegate and the step never appears. Workspace names and avatars come from the local policy_ Onyx collection.
Read response.data.policyDiff instead of discarding it.
"Invite" loops the existing addMembersToWorkspace action, one call per admin policy (per the bulk-action guideline and the 1:1:1 rule), then calls SetVacationDelegate.
The 305 response merges an error object into nvp_private_vacationDelegate, so every exit path from the step must clear it.
Notes:
skipPolicyInviteEmails is a new optional parameter on SetVacationDelegate (added in a separate backend issue). When true, the backend sets the delegate and sends no email to any workspace admin.
On the "Confirm" and "Invite" paths, the backend emails one owner per missing workspace where the user is not an admin, with the other admins in cc, and only where the user is in that workspace's approval workflow. Admin workspaces never get an email.
The invites should be sent before the final SetVacationDelegate, and the backend recomputes the diff, so freshly workspaces invites no longer trigger the admins emails.
The delegate always gets their own "you are now a vacation delegate" email, including on "Skip".
Other error codes (invalid delegate, delegate on vacation, account not found) keep the existing error modal behavior.
@rayane-d@mountiny
I have a question, why in the non-admin-only variation (first screen in PR description) Skip isn't available? In the mixed variation I assume it suppresses emails also for nonAdminPolicies. Is it intentional? Should the non-admin-only include Skip option, or should Skip in the mixed one still email admins of nonAdminPolicies? I see it as some possible inconsistence😄
@rayane-d@mountiny I have a question, why in the non-admin-only variation (first screen in PR description) Skip isn't available? In the mixed variation I assume it suppresses emails also for nonAdminPolicies. Is it intentional? Should the non-admin-only include Skip option, or should Skip in the mixed one still email admins of nonAdminPolicies? I see it as some possible inconsistence😄
@trjExpensify @Expensify/design, could you please clarify this? Would it make more sense to replace "Confirm" button with two explicit actions: "Ask admins to invite them" and "Skip"?
changed the title [-][Vacation Delegate Invite] [FE] Replace the policy diff warning modal with an invite step page in the RHP[/-][+][Due for payment 2026-09-22] [Vacation Delegate Invite] [FE] Replace the policy diff warning modal with an invite step page in the RHP[/+]on Sep 22, 2026
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: new feature
Link to the comment on the Issue:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
Test:
Go to Settings > Status > Vacation delegate.
Select a user missing only from workspaces you don't administer > verify the RHP shows just the
"member of" section and a single "Confirm" button > tap Confirm > verify the delegate is saved.
Select a user missing only from workspaces you do administer > verify the RHP shows just the "admin
of" section with Invite/Skip buttons > tap Invite > verify the delegate is saved and the user is
added as a member to each listed workspace.
Select a user missing from a mix of both > verify the RHP shows both sections with Invite/Skip
buttons > tap Skip > verify the delegate is saved without adding the user to any workspace.
Repeat any of the above, but dismiss the RHP (back button/swipe) before tapping a button > verify the
delegate reverts to what it was before.
Activity
mountiny commentedon Aug 21, 2026
Jakub 🤝 Rayane 🤝 Vit
jakubstec commentedon Aug 21, 2026
😎🙏
rayane-d commentedon Aug 21, 2026
🤝💪🚀
melvin-bot commentedon Aug 24, 2026
@jakubstec Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
jakubstec commentedon Aug 25, 2026
@rayane-d @mountiny
I have a question, why in the non-admin-only variation (first screen in PR description)
Skipisn't available? In the mixed variation I assume it suppresses emails also fornonAdminPolicies. Is it intentional? Should the non-admin-only includeSkipoption, or shouldSkipin the mixed one still email admins ofnonAdminPolicies? I see it as some possible inconsistence😄rayane-d commentedon Aug 25, 2026
@trjExpensify @Expensify/design, could you please clarify this? Would it make more sense to replace "Confirm" button with two explicit actions: "Ask admins to invite them" and "Skip"?
34 remaining items
[-][Vacation Delegate Invite] [FE] Replace the policy diff warning modal with an invite step page in the RHP[/-][+][Due for payment 2026-09-22] [Vacation Delegate Invite] [FE] Replace the policy diff warning modal with an invite step page in the RHP[/+]melvin-bot commentedon Sep 22, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)mountiny commentedon Sep 22, 2026
@mkhutornyi can you please suggest regression tests to add for this new feature
mkhutornyi commentedon Sep 22, 2026
Contributor+ Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: new feature
Link to the comment on the Issue:
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
Test:
"member of" section and a single "Confirm" button > tap Confirm > verify the delegate is saved.
of" section with Invite/Skip buttons > tap Invite > verify the delegate is saved and the user is
added as a member to each listed workspace.
buttons > tap Skip > verify the delegate is saved without adding the user to any workspace.
delegate reverts to what it was before.
Do we agree 👍 or 👎
mkhutornyi commentedon Sep 22, 2026
@mountiny can I waive penalty for this one? I thought this was not bug.
mountiny commentedon Sep 22, 2026
yeah I think that makes sense, but we keep #101498 without reward then as a follow up
melvin-bot commentedon Sep 22, 2026
Payment Summary
Resolving PRs:
feat: Replace vacation delegate policy diff warning with RHP invite step #99460
Contributor: @war-in does not require payment (Contractor)
Contributor: @jakubstec does not require payment (Contractor)
Contributor: @rayane-d does not require payment (Contractor)
Reviewer: @mkhutornyi owed $250 via NewDot
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Sep 24, 2026
Payment Summary
Contributor+: @mkhutornyi due $250 via NewDot
trjExpensify commentedon Oct 1, 2026
approved $250 for @mkhutornyi