Repository navigation
Add search this user/agent to ProfilePage #99295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Julesssss
merged 14 commits into
Expensify:main
from
hungvu193:revert-99104-revert-98091-feat-98076-add-search-user
Sep 21, 2026
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
eefc513
Revert "[CP Staging] Revert "Add search this user/agent to ProfilePage""
hungvu193 89d8ec6
Fix: dismiss RHP before navigating to Search so back returns to origi…
MelvinBot f85912a
Add coverage for accountID case
hungvu193 6690476
Merge remote-tracking branch 'origin' into revert-99104-revert-98091-…
hungvu193 6a533dd
Fix swipe issue
hungvu193 f1556c5
resolve conflicts
hungvu193 de298eb
fix ts
hungvu193 eb450ab
Add search agent to Edit Agent page too
hungvu193 647cbaa
Revert unintended .github/actions/javascript bundle changes
hungvu193 21dccf0
Revert to the old decision
hungvu193 ff491a3
Merge remote-tracking branch 'origin' into revert-99104-revert-98091-…
hungvu193 77460c7
Leave SearchUIUtilsTests
hungvu193 350ca6b
Address profile history review comments
hungvu193 4e49b28
Merge remote-tracking branch 'origin' into revert-99104-revert-98091-…
hungvu193 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,8 @@ import { | |
| isHiddenForCurrentUser as isReportHiddenForCurrentUser, | ||
| navigateToPrivateNotes, | ||
| } from '@libs/ReportUtils'; | ||
| import {buildQueryStringFromFilterFormValues} from '@libs/SearchQueryUtils'; | ||
| import {isAgentEmail} from '@libs/SessionUtils'; | ||
| import {generateAccountID} from '@libs/UserUtils'; | ||
| import {isValidAccountRoute} from '@libs/ValidationUtils'; | ||
|
|
||
|
|
@@ -96,7 +98,7 @@ function ProfilePage({route}: ProfilePageProps) { | |
| const [guidedSetupAndTourStatus] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: guidedSetupAndTourStatusSelector}); | ||
| const switchToDelegator = useSwitchToDelegator(); | ||
| const guideCalendarLink = account?.guideDetails?.calendarLink ?? ''; | ||
| const expensifyIcons = useMemoizedLazyExpensifyIcons(['Bug', 'Pencil', 'Phone', 'UserPlus']); | ||
| const expensifyIcons = useMemoizedLazyExpensifyIcons(['Bug', 'MagnifyingGlass', 'Pencil', 'Phone', 'UserPlus']); | ||
| const accountID = Number(route.params?.accountID ?? CONST.DEFAULT_NUMBER_ID); | ||
| const [agentPrompt] = useOnyx(`${ONYXKEYS.COLLECTION.SHARED_NVP_AGENT_PROMPT}${accountID}`); | ||
| const isCurrentUser = currentUserAccountID === accountID; | ||
|
|
@@ -327,6 +329,20 @@ function ProfilePage({route}: ProfilePageProps) { | |
| onPress={() => switchToDelegator(login)} | ||
| /> | ||
| )} | ||
| {!!accountID && !isAnonymousUserSession() && !!login && ( | ||
| <MenuItem | ||
| shouldShowRightIcon | ||
| title={translate(isAgentEmail(login) ? 'profilePage.viewAgentHistory' : 'profilePage.viewUserHistory')} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We replaced the |
||
| icon={expensifyIcons.MagnifyingGlass} | ||
| onPress={() => { | ||
| const query = buildQueryStringFromFilterFormValues({ | ||
| type: CONST.SEARCH.DATA_TYPES.CHAT, | ||
| from: [String(accountID)], | ||
| }); | ||
| Navigation.revealRouteBeforeDismissingModal(ROUTES.SEARCH_ROOT.getRoute({query, rawQuery: query})); | ||
| }} | ||
| /> | ||
| )} | ||
| {shouldShowNotificationPreference && ( | ||
| <MenuItemField | ||
| name={translate('notificationPreferencesPage.label')} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.