Skip to content

[Due for payment 2026-04-01] [Due for payment 2026-03-31] [RCA #75026] Expense - Missing self DM when submitting expense from FAB #86097

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.42-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #75026
Email or phone of affected tester (no customers): joisjndonsjdojsiodjiso@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:

  1. Go to staging.new.expensify.com
  2. Open FAB > Create expense > Manual.
  3. Enter amount > Next.
  4. On confirm page, click To field.

Expected Result:

Self DM will be shown in contact list.

Actual Result:

Self DM is missing when submitting 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
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 23, 2026
  2. melvin-bot commented on Mar 23, 2026

    @melvin-bot

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

  3. melvin-bot commented on Mar 23, 2026

    @melvin-bot

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

  4. github-actions commented on Mar 23, 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 Mar 23, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #75026 - "use useSearchSelector hook and remove unused and duplicated code" by @mkzie2 (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #75026 introduced a regression that prevents the self DM from appearing when submitting an expense from the FAB. The PR should be reverted to restore the expected functionality.

    Labels: No label changes needed - this is a frontend bug, DeployBlockerCash is correctly applied.

    Detailed Analysis

    Evidence

    The bug report states that when creating a manual expense from the FAB and clicking the "To" field on the confirm page, the self DM is missing from the contact list. This is reproducible on staging but not production, indicating it was introduced in this release cycle.

    PR #75026 was merged on 2026-03-20 and is included in the 9.3.42-0 staging deploy. The PR refactored how participant selection works by introducing the useSearchSelector hook.

    Verification

    I examined the changes in PR #75026 and found the files affected:

    • src/hooks/useSearchSelector.base.ts
    • src/components/Search/SearchFiltersParticipantsSelector.tsx
    • src/components/Search/FilterDropdowns/UserSelectPopup.tsx
    • src/libs/OptionsListUtils/index.ts

    While MoneyRequestParticipantsSelector.tsx (the component used in the expense submission flow) was not directly modified, it uses useSearchSelector which was significantly changed.

    Root Cause

    The issue is in how useSearchSelector.base.ts handles the includeSelfDM parameter:

    1. PR use useSearchSelector hook and remove unused and duplicated code #75026 added includeSelfDM as a new parameter to useSearchSelector (line 53 in the new code)
    2. For SEARCH_CONTEXT_GENERAL mode (line 260-280), the hook passes includeSelfDM to getValidOptions at line 273
    3. This hardcoded parameter value overrides any includeSelfDM value passed in getValidOptionsConfig (which is spread earlier at line 261)
    4. MoneyRequestParticipantsSelector passes includeSelfDM: !isMovingTransactionFromTrackExpense(action) && iouType !== CONST.IOU.TYPE.INVOICE in getValidOptionsConfig (line 193), but does NOT pass it as a direct parameter to useSearchSelector
    5. Therefore, includeSelfDM defaults to false in the hook, and this false value overrides the true value in getValidOptionsConfig
    6. As a result, the self DM is excluded from the options list

    The same issue affects UserSelectPopup.tsx which also doesn't pass includeSelfDM as a parameter (line 72-80 in the new code).

  6. OSBotify commented on Mar 23, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: #75026 - "use useSearchSelector hook and remove unused and duplicated code" by @mkzie2 (High confidence)
    Related Issues: None

    Recommendation: REVERT

    PR #75026 introduced a regression that prevents the self DM from appearing when submitting an expense from the FAB. The PR should be reverted to restore the expected functionality.

    Labels: No changes needed - DeployBlockerCash is correctly applied for this frontend bug.

    Detailed Analysis

    Evidence

    The bug report states that when creating a manual expense from the FAB and clicking the "To" field on the confirm page, the self DM is missing from the contact list. This is reproducible on staging but not production, indicating it was introduced in this release cycle.

    PR #75026 was merged on 2026-03-20 and is included in the 9.3.42-0 staging deploy. The PR refactored how participant selection works by introducing the useSearchSelector hook.

    Verification

    I examined the changes in PR #75026 and found the files affected:

    • src/hooks/useSearchSelector.base.ts - Added includeSelfDM parameter
    • src/components/Search/SearchFiltersParticipantsSelector.tsx - Migrated to use useSearchSelector
    • src/components/Search/FilterDropdowns/UserSelectPopup.tsx - Migrated to use useSearchSelector
    • src/libs/OptionsListUtils/index.ts - Modified sorting to prioritize self DM

    While MoneyRequestParticipantsSelector.tsx (the component used in the expense submission flow) was not directly modified, it uses useSearchSelector which was significantly changed.

    Root Cause

    The issue is in how useSearchSelector.base.ts handles the includeSelfDM parameter:

    1. PR use useSearchSelector hook and remove unused and duplicated code #75026 added includeSelfDM as a new parameter to useSearchSelector (with default value false)
    2. For SEARCH_CONTEXT_GENERAL mode (used by MoneyRequestParticipantsSelector), the hook passes the includeSelfDM parameter directly to getValidOptions at line 273
    3. This hardcoded parameter value overrides any includeSelfDM value passed in getValidOptionsConfig (which is spread earlier at line 261), because later properties in JavaScript object spread override earlier ones
    4. MoneyRequestParticipantsSelector passes includeSelfDM: !isMovingTransactionFromTrackExpense(action) && iouType !== CONST.IOU.TYPE.INVOICE in getValidOptionsConfig (line 193), but does NOT pass it as a direct parameter to useSearchSelector
    5. Therefore, includeSelfDM defaults to false in the hook, and this false value overrides the true value in getValidOptionsConfig
    6. As a result, getValidOptions receives includeSelfDM: false and the self DM is excluded from the options list

    The same issue would affect other components that rely on getValidOptionsConfig.includeSelfDM without passing it as a direct parameter to useSearchSelector.

  7. MelvinBot commented on Mar 23, 2026

    @MelvinBot
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    When creating an expense from FAB (FAB > Create expense > Manual > enter amount > Next > click "To" field), the self DM is missing from the contact list. It should appear in the participant selector so users can submit expenses to themselves.

    What is the root cause of that problem?

    The root cause is a JavaScript object property override in useSearchSelector.base.ts introduced by PR #75026.

    MoneyRequestParticipantsSelector correctly passes includeSelfDM: true inside getValidOptionsConfig (line 193). However, it does NOT pass includeSelfDM as a direct prop to useSearchSelector (lines 229-248).

    In useSearchSelector.base.ts, the hook parameter includeSelfDM defaults to false (line 167). In the SEARCH_CONTEXT_GENERAL case (lines 259-280), the config object is built like this:

    {
        ...getValidOptionsConfig,  // line 261: spreads includeSelfDM: true from caller
        ...
        includeSelfDM,             // line 273: overrides with hook's default false
        ...
    }
    

    Since includeSelfDM (line 273) appears after ...getValidOptionsConfig (line 261) in the object literal, JavaScript's property ordering rules mean the hook's default false always overrides the true value from the config spread.

    This causes isValidReport in OptionsListUtils/index.ts (line 2147) to filter out the self DM: if (isSelfDM && !includeSelfDM) { return false; }.

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

    In MoneyRequestParticipantsSelector.tsx, pass includeSelfDM as a direct prop to useSearchSelector (at the hook level) instead of only inside getValidOptionsConfig. This ensures the hook's own parameter is set correctly and won't be overridden by the default:

    At line 229-248, add includeSelfDM: !isMovingTransactionFromTrackExpense(action) && iouType !== CONST.IOU.TYPE.INVOICE as a direct prop in the useSearchSelector call.

    What alternative solutions did you explore? (Optional)

    An alternative would be to fix the override order in useSearchSelector.base.ts itself — for example, by moving the explicit includeSelfDM property before the ...getValidOptionsConfig spread so that the config can override it. However, this could change behavior for other callers, so the safer fix is to have MoneyRequestParticipantsSelector pass includeSelfDM at the hook level directly.


    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.

  8. sosek108 commented on Mar 23, 2026

    @sosek108
    Contributor

    Melvin's proposal looks valid so I'd go with this fix

  9. mkzie2 commented on Mar 23, 2026

    @mkzie2
    Contributor

    @sosek108 I'm working on a PR rn 🙏

  10. 7 remaining items

  11. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Mar 24, 2026
  12. changed the title [-][RCA #75026] Expense - Missing self DM when submitting expense from FAB[/-] [+][Due for payment 2026-03-31] [RCA #75026] Expense - Missing self DM when submitting expense from FAB[/+] on Mar 24, 2026
  13. melvin-bot commented on Mar 24, 2026

    @melvin-bot

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

  14. melvin-bot commented on Mar 24, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.42-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-03-31. 🎊

  15. melvin-bot commented on Mar 24, 2026

    @melvin-bot

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

  16. melvin-bot commented on Mar 24, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  17. changed the title [-][Due for payment 2026-03-31] [RCA #75026] Expense - Missing self DM when submitting expense from FAB[/-] [+][Due for payment 2026-04-01] [Due for payment 2026-03-31] [RCA #75026] Expense - Missing self DM when submitting expense from FAB[/+] on Mar 25, 2026
  18. melvin-bot commented on Mar 25, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.43-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-04-01. 🎊

  19. melvin-bot commented on Mar 25, 2026

    @melvin-bot

    @NikkiWines @mallenexpensify 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]

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.EngineeringWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions