Migrate useSearchSelector.base.ts from useOptionsList to usePersonalDetailOptions (part 2)#91986
Conversation
…etailOptions (part 2)
|
@hoangzinh Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe904c4ab6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a84ae33a91
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| includeRecentReports: false, | ||
| shouldInitialize: didScreenTransitionEnd, | ||
| }); | ||
| const {searchTerm, debouncedSearchTerm, setSearchTerm, availableOptions, selectedOptions, toggleSelection, areOptionsInitialized} = usePersonalDetailSearchSelector({ |
There was a problem hiding this comment.
Normalize phone searches before filtering invitees
This migrated invite flow now uses usePersonalDetailSearchSelector, but that hook passes the raw debounced search text into PersonalDetailOptionsListUtils.getValidOptions; the old useSearchSelector path normalized phone/email input with getSearchValueForPhoneOrEmail before filtering. As a result, when a user searches an existing contact by a formatted/local phone number such as (555) 123-4567, it no longer matches the stored +15551234567@... login and can fall through to the “invite new user” option instead of selecting the existing user. Please normalize phone searches in the new hook (or before this call) to preserve the previous invite behavior.
Useful? React with 👍 / 👎.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-06-02.at.19.32.22.movAndroid: mWeb ChromeScreen.Recording.2026-06-02.at.20.18.19.moviOS: HybridAppScreen.Recording.2026-06-02.at.20.33.11.moviOS: mWeb SafariScreen.Recording.2026-06-02.at.20.34.35.movMacOS: Chrome / SafariScreen.Recording.2026-06-02.at.17.48.47.movScreen.Recording.2026-06-02.at.20.14.30.mov |
| export default withNavigationTransitionEnd(withPolicyAndFullscreenLoading(DynamicWorkspaceInvitePage)); | ||
| function DynamicWorkspaceInvitePage(props: WorkspaceInvitePageProps) { |
There was a problem hiding this comment.
Not a blocker: Out of curiosity, why would you like to replace the HOC code?
|
@MelvinBot please review this PR |
PR ReviewVerdict: The migration looks correct and is well-scoped. The section-building in the migrated pages mirrors the already-merged The only failing check is Suggestions (non-blocking)1. 2. 3. Verified, no change needed
Note: I reviewed statically and didn't run the app, so the manual |
|
PR LGTM. I'm seeking help to test invite members in the domain workspace here https://expensify.slack.com/archives/C08CZDJFJ77/p1780404939054139 |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.99-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 No help site changes required. I reviewed the changes in this PR against Why no docs are requiredThis PR (linked to Expensify/App#82191) migrates the shared search-selector hook from The changes are limited to:
The user-facing flows (inviting workspace members, onboarding invite, adding a domain admin) keep the same UI, labels, buttons, and behavior — search, select, and invite all work exactly as before. Help articles document product behavior, not the underlying hook implementation, so there is nothing to update. Since no help site changes are required, I did not create a draft docs PR. @shubham1206agra, please confirm you agree this is a behavior-preserving refactor with no user-facing changes. If you believe a specific help article is affected, let me know which flow and I'll create the docs PR. |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.99-9 🚀
|
Explanation of Change
Fixed Issues
$ #82191
Tests
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Screen.Recording.2026-05-28.at.9.03.25.PM.mov