Skip to content

[Due for payment 2026-06-08] Self DM in To field does not show (You) on confirm page when creating expense from FAB #90668

Closed

Description

@jponikarchuk

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.3.74-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: #87920
Email or phone of affected tester (no customers): sdsdjoijdoisnjodis@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Run Onyx.merge('betas', ['newManualExpenseFlow']); in console.
  1. Go to staging.new.expensify.com
  2. Open FAB > Create expense > Manual.
  3. Click To field.
  4. Select self DM.

Expected Result:

Self DM in To field will show (You) on confirm page when creating expense from FAB.

Actual Result:

Self DM in To field does not show (You) on confirm page when creating expense from FAB.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Video.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    DeployBlockerCash
    Bug
    on May 14, 2026
  2. melvin-bot commented on May 14, 2026

    @melvin-bot

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

  3. melvin-bot commented on May 14, 2026

    @melvin-bot

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

  4. github-actions commented on May 14, 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. OSBotify commented on May 14, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #87920 - "Feat: Manual expense flow UI refactor - r3" by @ChavdaSachin (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #87920 introduced the new manual expense flow UI (behind the newManualExpenseFlow beta) and the bug is isolated to that new code path. The causing PR is large but clearly the sole source of this regression on staging, and reverting it would immediately resolve the issue without affecting production users.

    Assigned: @ChavdaSachin (PR author), @ShridharGoel @puneetlath (approving reviewers)
    Labels: No label changes made — DeployBlockerCash is correct (this is an App/frontend regression).

    Detailed Analysis

    Evidence

    Verification

    • Affected file: src/pages/iou/request/step/IOURequestStepConfirmation.tsx
    • PR Feat: Manual expense flow UI refactor - r3 #87920 modifies this file extensively (229 additions, 35 deletions) — confirmed via gh pr view 87920 --json files.
    • PR Feat: Manual expense flow UI refactor - r3 #87920 also modified:
      • src/components/MoneyRequestConfirmationList.tsx
      • src/components/MoneyRequestConfirmationList/hooks/useConfirmationSections.ts
      • src/components/ParticipantPicker.tsx (new file)
      • src/pages/iou/request/IOURequestStartPage.tsx

    Root Cause

    In the new manual expense flow, when a user selects a self-DM as the "To" participant via the new inline ParticipantPicker, the participant is committed to Onyx through a new callback chain:

    handleParticipantsAdded → setMoneyRequestParticipants(activeTransactionID, participantsList)

    The participantsList originates from ParticipantSearchResults.addSingleParticipant → sanitizedSelectedParticipant(option, iouType), which picks text from the raw option.

    In useConfirmationSections.ts, the confirmation list renders the participant row by spreading ...participant directly. The text field used for display comes from the participant option computed through getReportOption → createOption → getReportName. While the derived reportName for a self-DM report (computed by computeReportName) includes "(You)" via shouldAddCurrentUserPostfix: true, the self-DM selection flow in the new embedded ParticipantPicker does not close the picker and navigate back the same way the old step-based navigator flow did.

    In the old flow (navigating to IOURequestStepParticipants), useParticipantSubmission.addParticipant intercepted the self-DM selection at line 209 (if (firstParticipant?.isSelfDM && !isSplitRequest)) and called trackExpense(), which drove a full navigation event and re-initialization of participants via setMoneyRequestParticipantsFromReport. The new flow bypasses this logic entirely, resulting in the confirm page rendering the participant display name without the "(You)" postfix.

  6. MelvinBot commented on May 14, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    PR #87920 introduced a new ParticipantPicker flow for selecting expense recipients from the FAB. When a user selects the self-DM from this picker, sanitizedSelectedParticipant copies the user's real accountID (non-zero) from the search option data.

    On the confirmation page, IOURequestStepConfirmation.tsx:254 branches on participant.accountID truthiness:

    • Truthy → calls getParticipantsOption, which does not add the "(You)" suffix
    • Falsy (0) → calls getReportOption → getReportName → getDisplayNameForParticipant({shouldAddCurrentUserPostfix: true}), which does add "(You)"

    Previously, getMoneyRequestParticipantsFromReport always set accountID: 0 for self-DM participants, so the getReportOption path was always taken. The new picker stores a real accountID, switching to the wrong code path.

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

    In getParticipantsOption, when the participant has isSelfDM: true, pass shouldAddCurrentUserPostfix: true to getDisplayNameOrDefault so the "(You)" suffix is appended to the display name.

    What alternative solutions did you explore? (Optional)

    1. Route self-DM through getReportOption: Change the branch in IOURequestStepConfirmation.tsx to check participant.isSelfDM and use getReportOption for self-DM regardless of accountID. This works but couples the routing logic to a special case rather than fixing getParticipantsOption to handle self-DM correctly.
    2. Set accountID: 0 in sanitizedSelectedParticipant for self-DM: Force the old behavior. This is fragile — it papers over the real issue (getParticipantsOption not handling self-DM) and could break other code that expects a real accountID.
    Related issues

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  7. ChavdaSachin commented on May 14, 2026

    @ChavdaSachin
    Contributor

    NAB: only happens on beta accounts

  8. puneetlath commented on May 14, 2026

    @puneetlath
    Contributor

    Demoting.

  9. 21 remaining items

  10. dukenv0307 commented on Jun 2, 2026

    @dukenv0307
    Contributor

    Not overdue, @ChavdaSachin will do the checklist

  11. ChavdaSachin commented on Jun 3, 2026

    @ChavdaSachin
    Contributor

    This was a regression from my own PR - #91004
    I am not due payment here.
    My payment would be handled at #82586 at the end

  12. dukenv0307 commented on Jun 5, 2026

    @dukenv0307
    Contributor

    @JS00001 Could you please reopen the issue to process my payment?

  13. reopened this on Jun 8, 2026
  14. added
    Awaiting Payment
    on Jun 8, 2026
  15. melvin-bot commented on Jun 8, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  16. melvin-bot commented on Jun 8, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  17. mallenexpensify commented on Jun 8, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @dukenv0307 due $250 via NewDot

  18. quinthar commented on Jun 13, 2026

    @quinthar
    Contributor

    Approved $250 to @dukenv0307

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyEngineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions