Skip to content

"Ask Concierge" option in the search router#88727

Merged
chuckdries merged 18 commits intoExpensify:mainfrom
software-mansion-labs:feat/ask-consierge-search-switcher
May 1, 2026
Merged

"Ask Concierge" option in the search router#88727
chuckdries merged 18 commits intoExpensify:mainfrom
software-mansion-labs:feat/ask-consierge-search-switcher

Conversation

@mhawryluk
Copy link
Copy Markdown
Contributor

@mhawryluk mhawryluk commented Apr 24, 2026

Explanation of Change

Adds an 'Ask Concierge' option to the Search Router that opens the Concierge side panel and immediately sends the typed text as a message.

Zrzut ekranu 2026-04-24 o 17 02 13

Fixed Issues

$ #88636
PROPOSAL: N/A

Tests

  1. Click on the search icon in the top right corner.
  2. Type in the message to concierge.
  3. Verify there is a "Ask Concierge" item below the search item.
  4. Verify highlighting the matching item based on input still works fine.
  5. Click on the "Ask Concierge" item.
  6. Verify the Concierge Anywhere side panel opens (on web, concierge chat on native apps) and the message is sent.
  7. Verify there is a "Concierge is thinking..." indicator displayed under the sent chat.
  8. Verify that hiding messages from the previous Concierge session still works fine in the side panel on the web. the old messages should be hidden and only shown after clicking "Show history".

For when there is #admins in the side panel instead:

Precondition:
Sign up with a new account and complete onboarding with the following selections:

  • Purpose → "Manage my team's expenses"
  • Employees → "1-4 employees"
  • Accounting → "QuickBooks Desktop"
  • Complete the remaining onboarding steps
  1. Same as in the previous test cases, but verify that on web the side panel is opened showing the admins chat and that the message is sent there, not to the Concierge chat.

Offline tests

Same but offline.

QA Steps

Same as tests.

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Nagranie.z.ekranu.2026-04-28.o.17.41.36.mov
Android: mWeb Chrome
Nagranie.z.ekranu.2026-04-28.o.18.54.39.mov
iOS: Native
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-04-28.at.17.37.41.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Nagranie.z.ekranu.2026-04-28.o.17.43.35.mov

@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented Apr 24, 2026

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx ts-node ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx ts-node ./scripts/generateTranslations.ts --compare-ref main

@OSBotify
Copy link
Copy Markdown
Contributor

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

View the translation diff
diff --git a/src/languages/de.ts b/src/languages/de.ts
index 02be2176..809677aa 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -7823,6 +7823,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
             topCategories: 'Topkategorien',
             topMerchants: 'Top-Händler',
         },
+        askConcierge: (message: string) => `Frage Concierge „${message}“`,
     },
     genericErrorPage: {
         title: 'Ups, da ist etwas schiefgelaufen!',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 0f17d9c9..d54d78ef 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -7845,6 +7845,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
             topCategories: 'Catégories principales',
             topMerchants: 'Meilleurs commerçants',
         },
+        askConcierge: (message: string) => `Demander à Concierge « ${message} »`,
     },
     genericErrorPage: {
         title: 'Oups, quelque chose s’est mal passé !',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 2e5e210f..fab4cb9e 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -7812,6 +7812,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
             topCategories: 'Categorie principali',
             topMerchants: 'Principali esercenti',
         },
+        askConcierge: (message: string) => `Chiedi a Concierge “${message}”`,
     },
     genericErrorPage: {
         title: 'Oops, qualcosa è andato storto!',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 266d0c95..1a06b1ac 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -7715,6 +7715,7 @@ ${reportName}
             topCategories: '上位カテゴリ',
             topMerchants: '上位加盟店',
         },
+        askConcierge: (message: string) => `Concierge に「${message}」と聞く`,
     },
     genericErrorPage: {
         title: 'おっと、問題が発生しました!',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 3ffdb30e..1af4310d 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -7787,6 +7787,7 @@ Voeg meer bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
             topCategories: 'Topcategorieën',
             topMerchants: 'Topverkopers',
         },
+        askConcierge: (message: string) => `Vraag Concierge: “${message}”`,
     },
     genericErrorPage: {
         title: 'Oeps, er is iets misgegaan!',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 06cf4d88..f6a8a166 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -7777,6 +7777,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
             topCategories: 'Najpopularniejsze kategorie',
             topMerchants: 'Najważniejsi sprzedawcy',
         },
+        askConcierge: (message: string) => `Poproś Concierge: „${message}”`,
     },
     genericErrorPage: {
         title: 'Ups, coś poszło nie tak!',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 0acae2f2..85fb1efc 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -7779,6 +7779,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
             topCategories: 'Principais categorias',
             topMerchants: 'Principais estabelecimentos',
         },
+        askConcierge: (message: string) => `Perguntar ao Concierge “${message}”`,
     },
     genericErrorPage: {
         title: 'Opa, algo deu errado!',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 308749e9..5256da0f 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -7579,6 +7579,7 @@ ${reportName}
             topCategories: '热门类别',
             topMerchants: '热门商家',
         },
+        askConcierge: (message: string) => `询问 Concierge“${message}”`,
     },
     genericErrorPage: {
         title: '哎呀,出错了!',

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

View workflow run

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/index.ts 92.30% <ø> (ø)
src/ONYXKEYS.ts 100.00% <ø> (ø)
src/components/Search/SearchAutocompleteList.tsx 88.95% <100.00%> (ø)
...Search/SearchList/ListItem/SearchQueryListItem.tsx 95.45% <100.00%> (+0.21%) ⬆️
.../Search/SearchPageHeader/SearchPageInputNarrow.tsx 94.44% <ø> (ø)
...ts/Search/SearchPageHeader/SearchPageInputWide.tsx 0.00% <ø> (ø)
...nts/Search/SearchPageHeader/useSearchPageInput.tsx 61.19% <100.00%> (ø)
...rc/hooks/useOpenConciergeAnywhere/index.native.tsx 100.00% <100.00%> (ø)
src/pages/inbox/AgentZeroStatusContext.tsx 98.92% <100.00%> (+0.06%) ⬆️
src/pages/settings/HelpPage/HelpPage.tsx 0.00% <0.00%> (ø)
... and 5 more
... and 11 files with indirect coverage changes

Copy link
Copy Markdown
Contributor

@jmusial jmusial left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just couple nits 🚀

Comment thread src/components/Search/SearchRouter/useAskConcierge.tsx Outdated
Comment thread src/components/Search/SearchRouter/SearchRouter.tsx Outdated
Comment thread src/components/Search/SearchRouter/useAskConcierge.tsx
@mhawryluk mhawryluk marked this pull request as ready for review April 28, 2026 16:58
@mhawryluk mhawryluk requested review from a team as code owners April 28, 2026 16:58
@melvin-bot melvin-bot Bot requested review from JmillsExpensify and linhvovan29546 and removed request for a team April 28, 2026 16:59
@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented Apr 28, 2026

@linhvovan29546 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]

@melvin-bot melvin-bot Bot removed the request for review from a team April 28, 2026 16:59
Comment thread src/components/Search/SearchRouter/useAskConcierge.tsx Outdated
Comment thread src/components/SidePanel/SidePanelContextProvider.tsx
@mhawryluk
Copy link
Copy Markdown
Contributor Author

mhawryluk commented Apr 29, 2026

@linhvovan29546 I now noticed there's an issue when we show #admins chat inside the side panel instead of Concierge. I will work on a fix. edit: not sure what the intended behavior for this case is. I asked on Slack

@mhawryluk
Copy link
Copy Markdown
Contributor Author

sorry, clarifying what I meant: when there is #admins chat inside the side panel instead of Concierge we now send the message to Concierge but open the side panel with the admins chat on web, which is confusing. not a regression, just one missed scenario for this implemented feature. we settled on sending the message to admins instead of Concierge for now. I will implement this in a second!

done, now the message is sent to the admins chat in that scenario (cc: @quinthar)

Nagranie.z.ekranu.2026-04-30.o.09.42.49.mov

@linhvovan29546
Copy link
Copy Markdown
Contributor

done, now the message is sent to the admins chat in that scenario

@mhawryluk Could you please update the test steps?

@mhawryluk
Copy link
Copy Markdown
Contributor Author

NAB: When you ask Concierge from the search route, it takes too long to see the response. If you type directly in the composer, you’ll see the response faster.

Screen.Recording.2026-04-30.at.14.20.57.mov

I think the issue is that we don't display "Concierge is thinking..." when asking from the search router. I will look into it

@mhawryluk
Copy link
Copy Markdown
Contributor Author

NAB: When you ask Concierge from the search route, it takes too long to see the response. If you type directly in the composer, you’ll see the response faster.
Screen.Recording.2026-04-30.at.14.20.57.mov

I think the issue is that we don't display "Concierge is thinking..." when asking from the search router. I will look into it

@linhvovan29546 it should be fixed now, but unfortunately kickoffWaitingIndicator function is stored in context and isn't accessible from the search router so I had to introduce a new Onyx value to run the kick off on concierge mount. another approach would be to not call addComment in useAskConcierge at all, but instead fill in the input in the report and click send automatically when opened. but this is a completely different approach to what we have implemented currently, let me know if you want me to implement that instead

@linhvovan29546
Copy link
Copy Markdown
Contributor

so I had to introduce a new Onyx value to run the kick off on concierge mount

I think, for a PR of this scope, it’s a reasonable compromise.

@linhvovan29546
Copy link
Copy Markdown
Contributor

. Verify the Concierge Anywhere side panel opens (on web, concierge chat on native apps) and the message is sent. If the user has the #admins chat displayed in the side panel (controlled via nvp_onboardingRHPVariant (rhpAdminsRoom) + user needs to be workspace admin) the message should be sent there instead of Concierge.

@mhawryluk This is difficult for the QA team to test the #admins side panel scenario. I think we should add a precondition in the test steps explaining how to set up an account with nvp_onboardingRHPVariant = rhpAdminsRoom. To do this, sign up with a new account and complete onboarding with the following selections:

  • Purpose → "Manage my team's expenses"
  • Employees → "1-4 employees"
  • Accounting → "QuickBooks Desktop"
  • Complete the remaining onboarding steps

@mhawryluk
Copy link
Copy Markdown
Contributor Author

. Verify the Concierge Anywhere side panel opens (on web, concierge chat on native apps) and the message is sent. If the user has the #admins chat displayed in the side panel (controlled via nvp_onboardingRHPVariant (rhpAdminsRoom) + user needs to be workspace admin) the message should be sent there instead of Concierge.

@mhawryluk This is difficult for the QA team to test the #admins side panel scenario. I think we should add a precondition in the test steps explaining how to set up an account with nvp_onboardingRHPVariant = rhpAdminsRoom. To do this, sign up with a new account and complete onboarding with the following selections:

  • Purpose → "Manage my team's expenses"
  • Employees → "1-4 employees"
  • Accounting → "QuickBooks Desktop"
  • Complete the remaining onboarding steps

updated, thanks!

@melvin-bot
Copy link
Copy Markdown

melvin-bot Bot commented Apr 30, 2026

We did not find an internal engineer to review this PR, trying to assign a random engineer to #88636 as well as to this PR... Please reach out for help on Slack if no one gets assigned!

@melvin-bot melvin-bot Bot requested a review from chuckdries April 30, 2026 09:09
Copy link
Copy Markdown
Contributor

@chuckdries chuckdries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've noticed two issues while testing native that I'm not entirely sure if they're related to this PR or not

  1. The action 'DISMISS_MODAL' was not handled... console error. This seems relevant, as SearchRouter is in the stack trace
  2. If you kill and relaunch the app on the concierge screen, the composer disappears (or perhaps it is hidden behind the navbar?)
search.router.ask.concierge.mp4

@chuckdries
Copy link
Copy Markdown
Contributor

I've discovered that point 2 reproduces on main, so it's not related.

@linhvovan29546
Copy link
Copy Markdown
Contributor

@chuckdries For point 1, I can reproduce it when clicking the concierge item (this also happens on main).

Screen.Recording.2026-05-01.at.08.20.13.mov

Copy link
Copy Markdown
Contributor

@chuckdries chuckdries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay! :shipit:

@chuckdries chuckdries merged commit 31e9f3b into Expensify:main May 1, 2026
46 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

🚧 @chuckdries has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify
Copy link
Copy Markdown
Contributor

OSBotify commented May 1, 2026

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Copy Markdown
Contributor

OSBotify commented May 4, 2026

🚀 Deployed to staging by https://github.com/chuckdries in version: 9.3.66-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 cancelled 🔪
🍎 iOS 🍎 cancelled 🔪

@MelvinBot
Copy link
Copy Markdown
Contributor

Yes, help site changes are required. PR #88727 adds a new "Ask Concierge" option in the search bar, which is a new entry point to Concierge that should be documented.

Draft PR created: #89496

Changes made:

  • docs/articles/new-expensify/concierge-ai/Concierge-Basics.md — Added the search bar as a new way to find Concierge in the "Where to find Concierge" section
  • docs/articles/Unlisted/Concierge-in-Expensify.md — Added the search bar entry point for New Expensify in the "Where to find Concierge" section

Note: I was unable to add the PR to GitHub project 196 due to token permission limitations. Please add it manually:

gh project item-add 196 --owner Expensify --url https://github.com/Expensify/App/pull/89496

@nlemma
Copy link
Copy Markdown

nlemma commented May 4, 2026

Deploy Blocker #89524 was identified to be related to this PR.

@mitarachim
Copy link
Copy Markdown

Deploy Blocker #89535 was identified to be related to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants