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 2025-10-22] [$250] Chat -User can select and complete invite already member to group chat #71156
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: v9.2.17-2 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:https://test-management.browserstack.com/projects/2219752/test-runs/TR-902/folder/13176684/41236578/912954145 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: Win 11/Chrome App Component: Chat Report View
Message inform the member already a member of group should keep on screen and user can't select this member.
Actual Result:
Message inform the member already a member of group briefly display and disappear, then user can select this member, avatar of this member is displayed as no existing account. User can invite this member to group chat and no duplicate member is added
Please re-state the problem that we are trying to solve in this issue.
Message inform the member already a member of group briefly display and disappear, then user can select this member, avatar of this member is displayed as no existing account. User can invite this member to group chat and no duplicate member is added
What is the root cause of that problem?
We don't pass excludeLogins config when creating the userToInvite option here then it always creates the invite option even though the login is already a member of the group chat.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Verify that getValidOptions function doesn't return userToInvite option if the search text is the excludeLogins
What alternative solutions did you explore? (Optional)
NA
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Please re-state the problem that we are trying to solve in this issue.
Chat - User can select and complete invite already member to group chat
What is the root cause of that problem?
useSearchSelector is always invoked with includeUserToInvite: true which hides the “already a member” message and allows selection even when the searched login is already a member
What changes do you think we should make in order to solve the problem?
Normalize the typed input like the headerMessage does
If the normalized login is in excludedUsers, pass includeUserToInvite: false to useSearchSelector
// Track the raw input locallyconst[searchValue,setSearchValue]=useState('');// Normalize the input using the same logic as the header messageconstprocessedLoginForExclusion=useMemo(()=>{constprocessedLogin=searchValue.trim().toLowerCase();returnparsePhoneNumber(appendCountryCodeWithCountryCode(processedLogin,countryCode)).possible
? addSMSDomainIfPhoneNumber(appendCountryCodeWithCountryCode(processedLogin,countryCode))
: processedLogin;},[searchValue,countryCode]);constisExcludedLogin=!!excludedUsers[processedLoginForExclusion];const{searchTerm, setSearchTerm, availableOptions, selectedOptions, selectedOptionsForDisplay, toggleSelection, areOptionsInitialized, onListEndReached}=useSearchSelector({selectionMode: CONST.SEARCH_SELECTOR.SELECTION_MODE_MULTI,searchContext: CONST.SEARCH_SELECTOR.SEARCH_CONTEXT_MEMBER_INVITE,includeUserToInvite: !isExcludedLogin,excludeLogins: excludedUsers,includeRecentReports: true,shouldInitialize: didScreenTransitionEnd,});
changed the title [-]Chat -User can select and complete invite already member to group chat[/-][+][$250] Chat -User can select and complete invite already member to group chat[/+]on Sep 26, 2025
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Sep 24, 2025
Triggered auto assignment to @heyjennahay (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.nkdengineer commentedon Sep 24, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Message inform the member already a member of group briefly display and disappear, then user can select this member, avatar of this member is displayed as no existing account. User can invite this member to group chat and no duplicate member is added
What is the root cause of that problem?
We don't pass
excludeLoginsconfig when creating theuserToInviteoption here then it always creates the invite option even though the login is already a member of the group chat.App/src/libs/OptionsListUtils/index.ts
Line 1898 in a5c249d
What changes do you think we should make in order to solve the problem?
We should pass the
excludeLoginshereApp/src/libs/OptionsListUtils/index.ts
Line 1898 in a5c249d
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Verify that
getValidOptionsfunction doesn't returnuserToInviteoption if the search text is theexcludeLoginsWhat alternative solutions did you explore? (Optional)
NA
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
nyomanjyotisa commentedon Sep 24, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Chat - User can select and complete invite already member to group chat
What is the root cause of that problem?
useSearchSelectoris always invoked withincludeUserToInvite: truewhich hides the “already a member” message and allows selection even when the searched login is already a memberApp/src/pages/InviteReportParticipantsPage.tsx
Lines 59 to 66 in a5c249d
What changes do you think we should make in order to solve the problem?
headerMessagedoesexcludedUsers, passincludeUserToInvite: falsetouseSearchSelectorApp/src/pages/InviteReportParticipantsPage.tsx
Lines 59 to 66 in a5c249d
App/src/pages/InviteReportParticipantsPage.tsx
Line 204 in a5c249d
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
None
[-]Chat -User can select and complete invite already member to group chat[/-][+][$250] Chat -User can select and complete invite already member to group chat[/+]melvin-bot commentedon Sep 26, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021971633138793887943
melvin-bot commentedon Sep 26, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (
External)27 remaining items
melvin-bot commentedon Oct 27, 2025
@heyjennahay Eep! 4 days overdue now. Issues have feelings too...
heyjennahay commentedon Oct 28, 2025
GH created for new test case https://github.com/Expensify/Expensify/issues/562236
heyjennahay commentedon Oct 28, 2025
Since there is no BZ checklist, manually adding it
Confirming:
heyjennahay commentedon Oct 28, 2025
@nkdengineer can you please accept the Upwork offer here #71156 (comment) so I can arrange your payment? Restar me afterwards please
nkdengineer commentedon Oct 30, 2025
@heyjennahay I get paid via NewDot
heyjennahay commentedon Nov 3, 2025
Updating payment confirmation:
melvin-bot commentedon Nov 4, 2025
@jayeshmangwani Eep! 4 days overdue now. Issues have feelings too...
twisterdotcom commentedon Nov 5, 2025
@jayeshmangwani has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Zapier Logs
Run ID: 00040eee-d68a-a676-992a-caea9e5f5411JmillsExpensify commentedon Nov 7, 2025
$250 approved for @nkdengineer
jayeshmangwani commentedon Nov 7, 2025
@heyjennahay I think there’s nothing pending for this issue. We’re good to close this issue.