-
Notifications
You must be signed in to change notification settings - Fork 3.7k
"Ask Concierge" option in the search router #88727
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
chuckdries
merged 18 commits into
Expensify:main
from
software-mansion-labs:feat/ask-consierge-search-switcher
May 1, 2026
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
bcf1122
"Ask Concierge" option in the search router
mhawryluk 37d9f12
Fix message hidden behind "show history" when sending while offline
mhawryluk 48c07d2
Add translations
mhawryluk 70ee607
Fix Spanish translation
mhawryluk a267524
Navigate to concierge chat on native
mhawryluk b087300
Fixes and refactor
mhawryluk 1f153b8
Merge branch 'main' into feat/ask-consierge-search-switcher
mhawryluk 6b905f8
Fix types
mhawryluk dad1de0
Fix concierge icon rendering in SearchQueryListItem on mobile
mhawryluk 56e5750
Implement review suggestions
mhawryluk 5fd520e
Use backHistory in the concierge search item handler too
mhawryluk cf882e1
Update useOpenConciergeAnywhere comments
mhawryluk d1f1aaa
Use useIsInSidePanel in useAskConcierge
mhawryluk 252830b
Pass isInSidePanel true on web and false on native in useAskConcierge
mhawryluk ae1ca81
Add fallback setSessionStartTime during render to SidePanelContextPro…
mhawryluk 7d8d521
Send message to admins chat if it's the one in the side panel on web
mhawryluk b5911fa
Display "concierge thinking" indicator when asking concierge from the…
mhawryluk 71e19fb
Merge branch 'main' into feat/ask-consierge-search-switcher
mhawryluk 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; | ||
| import useDelegateAccountID from '@hooks/useDelegateAccountID'; | ||
| import useOnyx from '@hooks/useOnyx'; | ||
| import useOpenConciergeAnywhere from '@hooks/useOpenConciergeAnywhere'; | ||
| import useSidePanelReportID from '@hooks/useSidePanelReportID'; | ||
| import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID'; | ||
| import {addComment, setConciergeThinkingKickoff} from '@userActions/Report'; | ||
| import CONST from '@src/CONST'; | ||
| import ONYXKEYS from '@src/ONYXKEYS'; | ||
|
|
||
| /** | ||
| * Returns a callback that opens the side panel (or Concierge chat on native) | ||
| * and sends the provided search query as a message. | ||
| */ | ||
| function useAskConcierge() { | ||
| const sidePanelReportID = useSidePanelReportID(); | ||
| const [conciergeReportID] = useOnyx(ONYXKEYS.CONCIERGE_REPORT_ID); | ||
| const {openConciergeAnywhere, isInSidePanel} = useOpenConciergeAnywhere(); | ||
| const targetReportID = (isInSidePanel ? sidePanelReportID : undefined) ?? conciergeReportID; | ||
| const [targetReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(targetReportID)}`); | ||
| const {timezone, accountID: currentUserAccountID} = useCurrentUserPersonalDetails(); | ||
| const delegateAccountID = useDelegateAccountID(); | ||
|
|
||
| return (searchQuery: string) => { | ||
| openConciergeAnywhere(); | ||
| if (!targetReport || !targetReportID) { | ||
| return; | ||
| } | ||
| setConciergeThinkingKickoff(); | ||
| addComment({ | ||
| report: targetReport, | ||
| notifyReportID: targetReportID, | ||
| ancestors: [], | ||
| text: searchQuery, | ||
| timezoneParam: timezone ?? CONST.DEFAULT_TIME_ZONE, | ||
| currentUserAccountID, | ||
| shouldPlaySound: true, | ||
| isInSidePanel, | ||
| delegateAccountID, | ||
| }); | ||
| }; | ||
| } | ||
|
|
||
| export default useAskConcierge; | ||
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 |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import {hasSeenTourSelector} from '@selectors/Onboarding'; | ||
| import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'; | ||
| import useOnyx from '@hooks/useOnyx'; | ||
| import {navigateToConciergeChat} from '@userActions/Report'; | ||
| import ONYXKEYS from '@src/ONYXKEYS'; | ||
|
|
||
| /** | ||
| * Returns a callback that navigates to the Concierge chat on native (opens the side panel on web instead), | ||
| * and a flag indicating that the concierge is not opened in the side panel. | ||
| */ | ||
| function useOpenConciergeAnywhere() { | ||
| const [conciergeReportID] = useOnyx(ONYXKEYS.CONCIERGE_REPORT_ID); | ||
| const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED); | ||
| const [betas] = useOnyx(ONYXKEYS.BETAS); | ||
| const [isSelfTourViewed] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector}); | ||
| const {accountID: currentUserAccountID} = useCurrentUserPersonalDetails(); | ||
|
|
||
| const openConciergeAnywhere = () => { | ||
| navigateToConciergeChat(conciergeReportID, introSelected, currentUserAccountID, isSelfTourViewed, betas); | ||
| }; | ||
|
|
||
| return {openConciergeAnywhere, isInSidePanel: false}; | ||
| } | ||
|
|
||
| export default useOpenConciergeAnywhere; |
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 |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import useSidePanelActions from '@hooks/useSidePanelActions'; | ||
| import useSidePanelState from '@hooks/useSidePanelState'; | ||
|
|
||
| /** | ||
| * Returns a callback that opens the Concierge side panel on web (opens the Concierge chat on native instead), | ||
| * and a flag indicating that the concierge is opened in the side panel. | ||
| */ | ||
| function useOpenConciergeAnywhere() { | ||
| const {shouldHideSidePanel} = useSidePanelState(); | ||
| const {openSidePanel} = useSidePanelActions(); | ||
|
|
||
| const openConciergeAnywhere = () => { | ||
| if (!shouldHideSidePanel) { | ||
| return; | ||
| } | ||
| openSidePanel(); | ||
| }; | ||
|
|
||
| return {openConciergeAnywhere, isInSidePanel: true}; | ||
| } | ||
|
|
||
| export default useOpenConciergeAnywhere; |
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
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.