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
[hold for payment 2025-12-01] [$250] Refactor provided component to use useSearchSelector hook and remove unused and duplicated code (Task 7) #71064
Across the application, around 15 components serve the same or very similar functionality: search users. These components use the same source of truth, OptionListContextProvider, and use getValidOptions to properly filter and sort options with contact.
Problem
Although the functionality of these components is almost the same, their implementation is the same or differs slightly. There is a lot of code duplication, which leads to situations where users experience different behaviours across these functionalities.
Working on these components (for example, with performance optimizations) is also problematic for developers, as there are many places that should be checked and updated. For example, when we implemented new parameters in getValidOptions there is a need to update all of these components
Solution
To improve code quality and developers’ and users' experience, we’ve implemented the useSearchSelector hook, which will be a single place of truth for all components that provide user searching. These components serve:
options selection
options sorting
options filtering
phone contacts importing
Using that hook will make the user experience more consistent across all components.
Task 7
💡 This one should be done with extra care as there is more advanced logic inside the component
Refactor provided component to use useSearchSelector hook and remove unused and duplicated code.
Components:
MoneyRequestAttendeeSelector
Important notes:
you can use InviteReportParticipantsPage as an example of the implementation
you should create new const value to use as context param: CONST.SEARCH_SELECTOR.SEARCH_CONTEXT_ATTENDEES
you need to ensure all functionalities are working correctly. Especially: selection, filtering, ordering, and inviting new users
changed the title [-]Refactor provided component to use useSearchSelector hook and remove unused and duplicated code (Task 7)[/-][+][$250] Refactor provided component to use useSearchSelector hook and remove unused and duplicated code (Task 7)[/+]on Sep 23, 2025
changed the title [-][$250] Refactor provided component to use useSearchSelector hook and remove unused and duplicated code (Task 7)[/-][+][hold for payment 2025-12-01] [$250] Refactor provided component to use useSearchSelector hook and remove unused and duplicated code (Task 7)[/+]on Dec 1, 2025
Activity
melvin-bot commentedon Sep 23, 2025
Triggered auto assignment to @joekaufmanexpensify (
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.melvin-bot commentedon Sep 23, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021970471013319193514
[-]Refactor provided component to use useSearchSelector hook and remove unused and duplicated code (Task 7)[/-][+][$250] Refactor provided component to use useSearchSelector hook and remove unused and duplicated code (Task 7)[/+]melvin-bot commentedon Sep 23, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (
External)NJ-2020 commentedon Sep 23, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Refactor provided component to use useSearchSelector hook and remove unused and duplicated code - Task 7
What is the root cause of that problem?
Improvement/Refactor
What changes do you think we should make in order to solve the problem?
contextparamCONST.SEARCH_SELECTOR.SEARCH_CONTEXT_ATTENDEESgetAttendeesWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
NJ-2020 commentedon Sep 23, 2025
I would like to work on this, the problem and solution has been defined in the OP. Thanks
30 remaining items
joekaufmanexpensify commentedon Nov 3, 2025
PR in review
joekaufmanexpensify commentedon Nov 10, 2025
Same!
joekaufmanexpensify commentedon Nov 17, 2025
PR close to merge
joekaufmanexpensify commentedon Nov 24, 2025
PR merged and on staging
joekaufmanexpensify commentedon Dec 1, 2025
Automation failed. PR is on prod and payment due today.
[-][$250] Refactor provided component to use useSearchSelector hook and remove unused and duplicated code (Task 7)[/-][+][hold for payment 2025-12-01] [$250] Refactor provided component to use useSearchSelector hook and remove unused and duplicated code (Task 7)[/+]joekaufmanexpensify commentedon Dec 1, 2025
Payment Summary
joekaufmanexpensify commentedon Dec 1, 2025
@NJ-2020 $250 sent and contract ended!
joekaufmanexpensify commentedon Dec 1, 2025
@sobitneupane please request payment at your earliest convenience. Closing as this is otherwise all set 👍
quinthar commentedon Dec 8, 2025
Approved $250 to @sobitneupane