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-06-24] [Due for payment 2026-06-23] Workflow - Invited phone number appears twice in Expenses from list #93621
Version Number: 9.4.8-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#80449 Email or phone of affected tester (no customers):jnosdjosjdoijson@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Workspace Settings
Action Performed:
Go to staging.new.expensify.com
Go to workspace settings > Workflows.
Click Add approval workflow.
Upgrade workspace if needed.
Enter phone number which does not have ND account > select it > Next.
Click Invite.
Select any approver > Skip.
On confirm page, click Expenses from.
Click RHP back button.
Expected Result:
In Step 8, the invited phone number will appear once in the list.
In Step 9, after user clicks RHP back button, the phone number will remain selected.
Actual Result:
In Step 8, the invited phone number appears twice in the list.
In Step 9, after user clicks RHP back button, the phone number is no longer selected.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
🤖 Generated by MelvinBot — high confidence. Both reported symptoms (duplicate row + lost selection) trace to a single root cause, verified with file:line evidence.
What is the root cause of that problem?
A phone-number email-key mismatch introduced in PR #80449.
When you invite by phone number, the same person ends up stored under two different key formats:
After the invite completes, policy.employeeList is keyed by the SMS-domain form, e.g. +15551234567@expensify.sms, because addMembersToWorkspace runs every login through addSMSDomainIfPhoneNumber (Member.ts:819, Member.ts:842-848).
+15551234567 ≠ +15551234567@expensify.sms, so every lookup that bridges these two stores fails:
Duplicate row: the dedup filter in allApprovers compares the selected member's login (+1555…) against the live policy member's login (+1555…@expensify.sms). No match → the invitee is rendered once as the selected entry and again as the policy member. (WorkspaceWorkflowsApprovalsExpensesFromPage.tsx:210-212)
Lost selection on back:goBack keeps only members found in employeeList via policy?.employeeList?.[m.email]. m.email is +1555…, the key is +1555…@expensify.sms → undefined → the just-invited member is treated as "never invited" and dropped. (WorkspaceWorkflowsApprovalsExpensesFromPage.tsx:280-284). The selection-sync effect has the same broken lookup at lines 117-122.
A plain email invite works because its key is identical in both stores — only phone numbers get the @expensify.sms suffix, which is exactly why this bug is phone-number specific.
What changes do you think we should make in order to solve the problem?
Normalize the invitee login to the SMS-domain form at the one boundary where the page writes it — so all three stores (approvalWorkflow.members, the invite draft, and the eventual employeeList) agree.
In WorkspaceWorkflowsApprovalsExpensesFromPage.tsx, apply PhoneNumber.addSMSDomainIfPhoneNumber(member.login) when building email/draft keys in toggleMember and nextStep (the same helper the invite action uses). This makes approvalWorkflow.members[].email and the draft keys match the employeeList key that addMembersToWorkspace will produce, fixing both the dedup filter and the goBack/sync employeeList lookups in one place.
Alternative & verification notes
Alternative: wrap each of the ~5 employeeList lookups (lines 117, 121, 211, 281, 315, 435) in addSMSDomainIfPhoneNumber(...). Works but is more error-prone (easy to miss a site, and the comparison must be applied on both sides consistently). The single normalization point at the write boundary is cleaner.
Verified:addSMSDomainIfPhoneNumber appends CONST.SMS.DOMAIN (@expensify.sms) to valid E.164 phone numbers and is a no-op for emails (PhoneNumber.ts:63), so applying it uniformly is safe for both email and phone invitees.
Suggested regression test: the phone-number flow from the issue (invite phone number → complete → return to Expenses from → back), asserting the invitee appears exactly once and stays selected. PR #80449 added unit tests only to PolicyUtilsTest.ts; none cover this phone-number round-trip.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93621) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Workflow - Invited phone number appears twice in Expenses from list[/-][+][Due for payment 2026-06-23] Workflow - Invited phone number appears twice in Expenses from list[/+]on Jun 16, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.8-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@hoangzinh The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
changed the title [-][Due for payment 2026-06-23] Workflow - Invited phone number appears twice in Expenses from list[/-][+][Due for payment 2026-06-24] [Due for payment 2026-06-23] Workflow - Invited phone number appears twice in Expenses from list[/+]on Jun 17, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.9-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@hoangzinh The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
applause-bot commentedon Jun 15, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/c02dec6024cb05e741880df7f4db5a96dc8b7ea498197a07e119d9cc975e9d5c
melvin-bot commentedon Jun 15, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #80449
melvin-bot commentedon Jun 15, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 15, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
MelvinBot commentedon Jun 15, 2026
Proposal
What is the root cause of that problem?
A phone-number email-key mismatch introduced in PR #80449.
When you invite by phone number, the same person ends up stored under two different key formats:
approvalWorkflow.members[].emailand the invite draft use the bare E.164 form, e.g.+15551234567(WorkspaceWorkflowsApprovalsExpensesFromPage.tsx:307-360). The picker'suserToInvite.loginis normalized to E.164 with no SMS domain (OptionsListUtils/index.ts:2124).policy.employeeListis keyed by the SMS-domain form, e.g.+15551234567@expensify.sms, becauseaddMembersToWorkspaceruns every login throughaddSMSDomainIfPhoneNumber(Member.ts:819, Member.ts:842-848).+15551234567≠+15551234567@expensify.sms, so every lookup that bridges these two stores fails:allApproverscompares the selected member's login (+1555…) against the live policy member's login (+1555…@expensify.sms). No match → the invitee is rendered once as the selected entry and again as the policy member. (WorkspaceWorkflowsApprovalsExpensesFromPage.tsx:210-212)goBackkeeps only members found inemployeeListviapolicy?.employeeList?.[m.email].m.emailis+1555…, the key is+1555…@expensify.sms→ undefined → the just-invited member is treated as "never invited" and dropped. (WorkspaceWorkflowsApprovalsExpensesFromPage.tsx:280-284). The selection-sync effect has the same broken lookup at lines 117-122.A plain email invite works because its key is identical in both stores — only phone numbers get the
@expensify.smssuffix, which is exactly why this bug is phone-number specific.What changes do you think we should make in order to solve the problem?
Normalize the invitee login to the SMS-domain form at the one boundary where the page writes it — so all three stores (
approvalWorkflow.members, the invite draft, and the eventualemployeeList) agree.In
WorkspaceWorkflowsApprovalsExpensesFromPage.tsx, applyPhoneNumber.addSMSDomainIfPhoneNumber(member.login)when buildingemail/draft keys intoggleMemberandnextStep(the same helper the invite action uses). This makesapprovalWorkflow.members[].emailand the draft keys match theemployeeListkey thataddMembersToWorkspacewill produce, fixing both the dedup filter and thegoBack/syncemployeeListlookups in one place.Alternative & verification notes
Alternative: wrap each of the ~5
employeeListlookups (lines 117, 121, 211, 281, 315, 435) inaddSMSDomainIfPhoneNumber(...). Works but is more error-prone (easy to miss a site, and the comparison must be applied on both sides consistently). The single normalization point at the write boundary is cleaner.Verified:
addSMSDomainIfPhoneNumberappendsCONST.SMS.DOMAIN(@expensify.sms) to valid E.164 phone numbers and is a no-op for emails (PhoneNumber.ts:63), so applying it uniformly is safe for both email and phone invitees.Suggested regression test: the phone-number flow from the issue (invite phone number → complete → return to Expenses from → back), asserting the invitee appears exactly once and stays selected. PR #80449 added unit tests only to
PolicyUtilsTest.ts; none cover this phone-number round-trip.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93621)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
melvin-bot commentedon Jun 15, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
youssef-lr commentedon Jun 15, 2026
@MelvinBot implement this
MelvinBot commentedon Jun 15, 2026
🤖 Draft PR created: #93640
Please mark it as "Ready for review" when it is ready for review.
6 remaining items
IuliiaHerets commentedon Jun 16, 2026
Chrome / v9.4.8-2
Passed
REC-20260616185508.mp4
puneetlath commentedon Jun 16, 2026
Nice!
[-]Workflow - Invited phone number appears twice in Expenses from list[/-][+][Due for payment 2026-06-23] Workflow - Invited phone number appears twice in Expenses from list[/+]melvin-bot commentedon Jun 16, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 16, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.8-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-06-23. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 16, 2026
@hoangzinh The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
[-][Due for payment 2026-06-23] Workflow - Invited phone number appears twice in Expenses from list[/-][+][Due for payment 2026-06-24] [Due for payment 2026-06-23] Workflow - Invited phone number appears twice in Expenses from list[/+]melvin-bot commentedon Jun 17, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.9-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-06-24. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 17, 2026
@hoangzinh The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]