Skip to content

[Due for payment 2026-06-24] [Due for payment 2026-06-23] Workflow - Invited user´s name changes to Email after clicking "Next" on "Expenses From" #93635

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


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): ibellicotest+2766@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Windows 11 / Chrome
App Component: Workspace Settings

Action Performed:

Prerequisite: User is owner of a "Control" workspace.
Prerequisite 2: Approvals enabled.

  1. Open the staging.new.expensify.com website.
  2. Navigate to "Workspaces" > Workspace > "Workflows"
  3. Scroll down to "Approvals" > "Add approval workflows"
  4. On "Expenses From" enter the Email of an existing user that is not member of the workspace.
  5. Note that user´s name appears above Email.
  6. Click on "Next"
  7. Click on the arrow on top left corner to return to previous step.
  8. Note that now, user´s name changed to Email.

Expected Result:

User´s name should remain visible after adding it and advancing to following step.

Actual Result:

Invited user´s name changes to Email after clicking "Next" and returning to "Expenses from" during "Add Approval workflow"

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Bug7181562_1781550312485.Invite_Workflow_4.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 15, 2026
  2. melvin-bot commented on Jun 15, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #80449

  3. melvin-bot commented on Jun 15, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. github-actions commented on Jun 15, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. MelvinBot commented on Jun 15, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    When you select a non-member by email, their display name is captured correctly (member.text). But when you click Next, nextStep rebuilds the workflow members and hard-codes the invited user's displayName to their email, throwing away the real name:

    ...usersToInvite.map((user) => ({
        displayName: user.email,   // <-- name discarded here
        email: user.email,
        avatar: undefined,
    })),

    (WorkspaceWorkflowsApprovalsExpensesFromPage.tsx:342-346)

    This happens because the usersToInvite array only carries {email, accountID} and drops the name/avatar at line 322-330.

    When you click the back arrow to return to Expenses from, the sync effect rebuilds the selected list from approvalWorkflow.members and prefers the stored displayName first:

    const displayName = member.displayName ?? personalDetail?.displayName ?? member.email;

    (:144)

    Since member.displayName is now the email, the real name is never restored — the list shows the email. Note toggleMember/applySelection actually stores the correct name (:431); it's nextStep that overwrites it with the email.

    What changes do you think we should make in order to solve the problem?

    Preserve the display name (and avatar) through the invite hand-off instead of replacing it with the email:

    1. In the usersToInvite loop (:322-330), also capture displayName: member.text and avatar: member.icons?.at(0)?.source.
    2. In the allMembers mapping (:342-346), use displayName: user.displayName ?? user.email and the captured avatar.

    For a true email-only invite (no Expensify account) member.text is the email anyway, so Test 7 behavior is unchanged; existing users keep their real name.

    What alternative solutions did you explore? (Optional)

    Reorder the fallback at :144 to prefer personalDetail?.displayName over member.displayName. Rejected: it only fixes users who already have synced personal details and leaves the root cause (name discarded in nextStep) in place.

    Regression source & related issue

    This regressed in PR #80449 (this issue's deploy blocker). Likely same-PR sibling: #93621 (invited phone number appears twice in Expenses from list).

    Confidence: High — the data flow is deterministic and fully traced from selection → nextStep → back-navigation sync effect; this is a local UI-state bug (no production logs needed).


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/93635) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  6. melvin-bot commented on Jun 16, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    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.

  7. melvin-bot commented on Jun 16, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    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.

  8. 4 remaining items

  9. IuliiaHerets commented on Jun 16, 2026

    @IuliiaHerets

    Chrome / v9.4.8-2
    Passed

    REC-20260616190137.mp4
  10. puneetlath commented on Jun 16, 2026

    @puneetlath
    Contributor

    Great

  11. changed the title [-]Workflow - Invited user´s name changes to Email after clicking "Next" on "Expenses From"[/-] [+][Due for payment 2026-06-23] Workflow - Invited user´s name changes to Email after clicking "Next" on "Expenses From"[/+] on Jun 16, 2026
  12. melvin-bot commented on Jun 16, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Jun 16, 2026

    @melvin-bot

    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. 🎊

  14. melvin-bot commented on Jun 16, 2026

    @melvin-bot

    @youssef-lr 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]

  15. changed the title [-][Due for payment 2026-06-23] Workflow - Invited user´s name changes to Email after clicking "Next" on "Expenses From"[/-] [+][Due for payment 2026-06-24] [Due for payment 2026-06-23] Workflow - Invited user´s name changes to Email after clicking "Next" on "Expenses From"[/+] on Jun 17, 2026
  16. melvin-bot commented on Jun 17, 2026

    @melvin-bot

    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. 🎊

  17. melvin-bot commented on Jun 17, 2026

    @melvin-bot

    @youssef-lr 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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions