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-10-20] [$175] Click on FAB > New chat, search "Me" not display self DM in result list #102648
Version Number: v9.4.97-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#102362 Email or phone of affected tester (no customers):lekima20+633509@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Win 11/Chrome App Component: Money Requests
New chat does not pass includeCurrentUser, so your contact row is excluded (index.ts:2402). The self DM is the only row that represents you.
The self DM is matched by doesReportMatchSearchTerms and its fallback filterReports. Both only check title, login, and room/thread/group fields. Neither adds "You"/"Me" for self DMs (index.ts:2845, index.ts:2888-2905).
What changes do you think we should make in order to solve the problem?
Make both report matchers in src/libs/OptionsListUtils/index.ts treat a self DM like the current user:
Add a translate parameter to doesReportMatchSearchTerms. When report.isSelfDM is true, append translate('common.you') and translate('common.me') to its search text. Pass translate from getValidOptions (index.ts:2255).
Make the same change in filterReports, and update its callers. This keeps the quick check a superset of filterReports, as the code comment requires. It also fixes the Search "In" filter, which uses filterReports.
Add unit tests. Searching "me" with includeSelfDM: true should return the self DM, in both getValidOptions and filterAndOrderOptions.
What alternative solutions did you explore? (Optional)
You could pass includeCurrentUser: true in New chat. I don't recommend it. It would add a second row for yourself with an "Add to group" button, next to the self DM.
Investigation details
In New chat, the self DM already appears when the search is empty, when you search your own email, and when you search "You" in English, because its title is "Name (you)". Only "Me", and "You"/"Me" in other languages, fail. The exception is when your name or email happens to contain the term.
The server search (searchInServer) only loads more data into Onyx. The same client-side filter still runs over it, so it does not change the result.
The participant picker (ParticipantSearchResults.tsx) uses the same path without includeCurrentUser. It likely has the same problem, and this fix covers it too.
No existing unit tests search "me" or "you".
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/102648) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Click on FAB > New chat, search "Me" not display self DM in result list[/-][+][$175] Click on FAB > New chat, search "Me" not display self DM in result list[/+]on Sep 30, 2026
Please re-state the problem that we are trying to solve in this issue.
In FAB > Start chat, searching "Me" shows "No results found" instead of your self DM, even though the same term correctly finds you in the general search box.
What is the root cause of that problem?
The localized "You"/"Me" search terms are only attached to the current user's contact row, never to the self DM report row itself.
getCurrentUserSearchTerms is what makes "You"/"Me" searchable, and it only runs against your personal-details contact entry:
That contact row only exists when includeCurrentUser: true is passed in, which the general search box does but "Start chat" does not — includeCurrentUser defaults to false, and when it's falsy your own login is explicitly excluded from the contacts collection:
So in "Start chat", the self DM is the only row left representing you, and it's matched by filterReports / doesReportMatchSearchTerms. Neither of these ever looks at isSelfDM or adds "You"/"Me" — they only check title, login, and room/thread/group-specific fields:
That's why "Me" (and "You" in any non-English locale, since the self DM's title only literally contains the English word "you" in parentheses) returns nothing for the self DM specifically, while everything else about it — searching your name, your email, or leaving the box empty — still works.
What changes do you think we should make in order to solve the problem?
Teach both report matchers in src/libs/OptionsListUtils/index.ts to treat a self DM the same way getCurrentUserSearchTerms treats the current user's contact row:
In filterReports, when building the searchable values for an item, also push the translated common.you / common.me strings whenever item.isSelfDM is true.
In doesReportMatchSearchTerms, do the same for report.isSelfDM when building searchText, so the cheap check stays a superset of filterReports (the function's own comment requires this).
Both functions currently don't receive a translate function — thread it through from their callers (ultimately getValidOptions), the same way getCurrentUserSearchTerms already receives it.
Add a unit test: with a self DM present and includeSelfDM: true, searching "me" (and "you") should return it, for both getValidOptions and the filterReports-based "Search > In" filter, since filterReports is shared by both paths.
What alternative solutions did you explore? (Optional)
Passing includeCurrentUser: true into "Start chat" would also make "Me" match, but it adds a second, separate row for yourself (with its own "Add to group" affordance) next to the self DM row, which isn't the expected single-row result shown in the issue's video. Fixing the self DM's own search terms instead keeps exactly one row for "you," matching the expected result.
It implements this proposal. filterReports and doesReportMatchSearchTerms now match self DMs against the localized "You"/"Me", so Start chat finds the self DM when you search "Me". Typecheck, lint, formatting, spelling, and the related Jest suites pass, including new unit tests for this case. I did not test it manually in the app.
[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: New Feature
[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.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
applause-bot commentedon Sep 30, 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/ac792528c32eed67c2cd884a4ade7b7c7276111073724b29fdccb5cd8bb04833
MelvinBot commentedon Sep 30, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
In FAB > Start chat, searching "Me" shows "No results found" instead of the self DM.
What is the root cause of that problem?
The localized "You"/"Me" search terms are only added to the current user's contact row. They are never added to the self DM report row.
includeCurrentUser: true, so it keeps your contact row. That row matches "Me" throughgetCurrentUserSearchTerms. See SearchAutocompleteList.tsx:273 and searchMatchUtils.ts:25-27.includeCurrentUser, so your contact row is excluded (index.ts:2402). The self DM is the only row that represents you.doesReportMatchSearchTermsand its fallbackfilterReports. Both only check title, login, and room/thread/group fields. Neither adds "You"/"Me" for self DMs (index.ts:2845, index.ts:2888-2905).This problem existed before Remove TranslateLocal in
src/libs/OptionsListUtils/searchMatchUtils.ts, which is why production also shows it. That PR only changed howtranslateis passed in.What changes do you think we should make in order to solve the problem?
Make both report matchers in
src/libs/OptionsListUtils/index.tstreat a self DM like the current user:translateparameter todoesReportMatchSearchTerms. Whenreport.isSelfDMis true, appendtranslate('common.you')andtranslate('common.me')to its search text. PasstranslatefromgetValidOptions(index.ts:2255).filterReports, and update its callers. This keeps the quick check a superset offilterReports, as the code comment requires. It also fixes the Search "In" filter, which usesfilterReports.includeSelfDM: trueshould return the self DM, in bothgetValidOptionsandfilterAndOrderOptions.What alternative solutions did you explore? (Optional)
You could pass
includeCurrentUser: truein New chat. I don't recommend it. It would add a second row for yourself with an "Add to group" button, next to the self DM.Investigation details
searchInServer) only loads more data into Onyx. The same client-side filter still runs over it, so it does not change the result.ParticipantSearchResults.tsx) uses the same path withoutincludeCurrentUser. It likely has the same problem, and this fix covers it too.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/102648)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
melvin-bot commentedon Sep 30, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (
External)[-]Click on FAB > New chat, search "Me" not display self DM in result list[/-][+][$175] Click on FAB > New chat, search "Me" not display self DM in result list[/+]melvin-bot commentedon Sep 30, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022105271422774871171
amar-sheikh commentedon Sep 30, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
In FAB > Start chat, searching "Me" shows "No results found" instead of your self DM, even though the same term correctly finds you in the general search box.
What is the root cause of that problem?
The localized "You"/"Me" search terms are only attached to the current user's contact row, never to the self DM report row itself.
getCurrentUserSearchTermsis what makes "You"/"Me" searchable, and it only runs against your personal-details contact entry:App/src/libs/OptionsListUtils/searchMatchUtils.ts
Lines 18 to 27 in 37e42c5
That contact row only exists when
includeCurrentUser: trueis passed in, which the general search box does but "Start chat" does not —includeCurrentUserdefaults tofalse, and when it's falsy your own login is explicitly excluded from the contacts collection:App/src/libs/OptionsListUtils/index.ts
Lines 2398 to 2405 in 37e42c5
App/src/libs/OptionsListUtils/index.ts
Line 2553 in 37e42c5
So in "Start chat", the self DM is the only row left representing you, and it's matched by
filterReports/doesReportMatchSearchTerms. Neither of these ever looks atisSelfDMor adds "You"/"Me" — they only check title, login, and room/thread/group-specific fields:App/src/libs/OptionsListUtils/index.ts
Lines 2845 to 2881 in 37e42c5
App/src/libs/OptionsListUtils/index.ts
Lines 2883 to 2905 in 37e42c5
That's why "Me" (and "You" in any non-English locale, since the self DM's title only literally contains the English word "you" in parentheses) returns nothing for the self DM specifically, while everything else about it — searching your name, your email, or leaving the box empty — still works.
What changes do you think we should make in order to solve the problem?
Teach both report matchers in
src/libs/OptionsListUtils/index.tsto treat a self DM the same waygetCurrentUserSearchTermstreats the current user's contact row:filterReports, when building the searchablevaluesfor an item, also push the translatedcommon.you/common.mestrings wheneveritem.isSelfDMis true.doesReportMatchSearchTerms, do the same forreport.isSelfDMwhen buildingsearchText, so the cheap check stays a superset offilterReports(the function's own comment requires this).translatefunction — thread it through from their callers (ultimatelygetValidOptions), the same waygetCurrentUserSearchTermsalready receives it.includeSelfDM: true, searching"me"(and"you") should return it, for bothgetValidOptionsand thefilterReports-based "Search > In" filter, sincefilterReportsis shared by both paths.What alternative solutions did you explore? (Optional)
Passing
includeCurrentUser: trueinto "Start chat" would also make "Me" match, but it adds a second, separate row for yourself (with its own "Add to group" affordance) next to the self DM row, which isn't the expected single-row result shown in the issue's video. Fixing the self DM's own search terms instead keeps exactly one row for "you," matching the expected result.parasharrajat commentedon Sep 30, 2026
@MelvinBot implement this #102648 (comment)
🎀 👀 🎀 C+ reviewed
parasharrajat commentedon Sep 30, 2026
oops wrong comment.
MelvinBot commentedon Sep 30, 2026
🤖 Draft PR created: Match the self DM by the localized You/Me in report search
Please mark it as "Ready for review" when it is ready for review.
It implements this proposal.
filterReportsanddoesReportMatchSearchTermsnow match self DMs against the localized "You"/"Me", so Start chat finds the self DM when you search "Me". Typecheck, lint, formatting, spelling, and the related Jest suites pass, including new unit tests for this case. I did not test it manually in the app.view run
MelvinBot commentedon Sep 30, 2026
🤖 I didn't create a new PR for this request. You marked it as the wrong comment, and Match the self DM by the localized You/Me in report search already implements this proposal as a draft.
If you want my proposal implemented instead, reply
@MelvinBot implement thisand say so.view run
20 remaining items
melvin-bot commentedon Oct 19, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Oct 19, 2026
Payment Summary
Resolving PRs:
Match the self DM by the localized You/Me in report search #102668
Reviewer: @parasharrajat owed $175 via NewDot
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Oct 20, 2026
Payment Summary
Contributor+: @parasharrajat due $175 via NewDot
@parasharrajat plz complete the Contributor+ checklist and tag me in a post once you have. Thx
melvin-bot commentedon Oct 23, 2026
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
mallenexpensify commentedon Oct 23, 2026
@parasharrajat plz complete the Contributor+ checklist and tag me in a post once you have. Thx
parasharrajat commentedon Oct 26, 2026
BugZero 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: New Feature
[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.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/696148
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-7b0e-a7a2-1fe3-8bd9904eadc4parasharrajat commentedon Oct 26, 2026
done @mallenexpensify