Skip to content

Add mentions and emojis suggestions to Home prompt box; fix RHP suggestions - #99912

Merged
puneetlath merged 20 commits into
Expensify:mainfrom
software-mansion-labs:@GCyganek/fix-mentions-and-emojis-rhp-and-prompt-box-home-page
Sep 10, 2026
Merged

Add mentions and emojis suggestions to Home prompt box; fix RHP suggestions#99912
puneetlath merged 20 commits into
Expensify:mainfrom
software-mansion-labs:@GCyganek/fix-mentions-and-emojis-rhp-and-prompt-box-home-page

Conversation

@GCyganek

@GCyganek GCyganek commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

Adds @mention and :emoji suggestions to the Home page Concierge prompt box. Extracted the logic shared by the report composer and message edit into a new useComposerSuggestions hook, reused by all three. Also fixes suggestions rendering behind the RHP by giving the suggestions portal an explicit z-index.

Fixed Issues

$ #99550
PROPOSAL: N/A

Tests

Web:

  1. Open the Home page and focus the prompt box
  2. Type @ followed by a few letters of a known contact (e.g. @exp).
  3. Verify that a mention suggestion list appears anchored to the prompt box.
  4. Press Enter.
  5. Verify that the highlighted mention is inserted into the prompt box and that the prompt is not submitted.
  6. Press Enter again (with no suggestion list open).
  7. Verify that the prompt is submitted normally.
  8. Go back to Home page and type :smi in the prompt box.
  9. Verify that an emoji suggestion list appears, then press Enter and verify the emoji is inserted instead of the prompt being sent.
  10. Type @a again to open the suggestions, then press Escape.
  11. Verify that the suggestion list is dismissed.
  12. Type @a again to open the suggestions, then click outside the prompt box so it loses focus.
  13. Verify that the suggestion list is hidden.
  14. Type a message with @ to trigger mention suggestion list in a way that changes prompt box height with suggestion list open.
  15. Verify that the height change of the prompt box does not hide the suggestion list and it's still opened

RHP (web):

  1. Open the Home page and click on the Help button in the top right corner to open Concierge in RHP
  2. Type @.
  3. Verify that a mention suggestion list appears.
  4. Type :smi and verify that an emoji suggestion list appears
  5. Verify that both suggestion list work correctly

Mobile app:

  1. Open the Home page and tap on the prompt box
  2. Type @.
  3. Verify that a mention suggestion list appears anchored to the prompt box.
  4. Tap a contact from the list.
  5. Verify that the selected mention is inserted into the prompt box.
  6. Type :smi in the prompt box.
  7. Verify that an emoji suggestion list appears, select an emoji and verify it's inserted into the prompt box
  8. Type a message with @ to trigger mention suggestion list in a way that changes prompt box height with suggestion list open.
  9. Verify that the height change of the prompt box does not hide the suggestion list and it's still opened
  10. Verify that scrolling the screen with the suggestion list open closes suggestion list
  • Verify that no errors appear in the JS console

Offline tests

N/A

QA Steps

Same as tests

  • Verify that no errors appear in the JS console

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 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 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)
  • 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)
  • 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.
  • 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
Screen.Recording.2026-08-31.at.16.25.39.mov

suggestions placement

screen-20260903-161704-1788444993621.mp4
screen-20260903-161527-1788444893007.mp4
Android: mWeb Chrome
iOS: Native
Screen.Recording.2026-08-31.at.16.38.07.mov

suggestions placement:

Screen.Recording.2026-09-03.at.16.11.39.mov
Screen.Recording.2026-09-03.at.16.12.13.mov
Screen.Recording.2026-09-03.at.16.13.52.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-08-31.at.16.20.38.mov
Screen.Recording.2026-08-31.at.16.24.16.mov
Screen.Recording.2026-08-31.at.16.23.50.mov
Screen.Recording.2026-08-31.at.16.23.00.mov

@GCyganek

Copy link
Copy Markdown
Contributor Author

@codex please review

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
...rc/pages/home/ForYouSection/ConciergePromptBox.tsx 96.55% <100.00%> (+0.39%) ⬆️
src/pages/home/HomePage.tsx 100.00% <100.00%> (ø)
...inbox/report/ReportActionCompose/ComposerInput.tsx 97.61% <ø> (-0.06%) ⬇️
...rt/ReportActionCompose/ComposerWithSuggestions.tsx 63.18% <100.00%> (+1.39%) ⬆️
src/styles/variables.ts 100.00% <ø> (ø)
...gestionsPortal/getBottomSuggestionPadding/index.ts 0.00% <0.00%> (ø)
...nsPortal/TransparentOverlay/TransparentOverlay.tsx 0.00% <0.00%> (ø)
...sPortal/getBottomSuggestionPadding/index.native.ts 0.00% <0.00%> (ø)
...uggestions/AutoCompleteSuggestionsPortal/index.tsx 0.00% <0.00%> (ø)
...tions/getSuggestionsViewportBottom/index.native.ts 0.00% <0.00%> (ø)
... and 5 more
... and 13 files with indirect coverage changes

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 4fee957c77

ℹ️ 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".

@GCyganek
GCyganek marked this pull request as ready for review August 31, 2026 14:47
@GCyganek
GCyganek requested review from a team as code owners August 31, 2026 14:47
@melvin-bot
melvin-bot Bot requested review from ZhenjaHorbach and removed request for a team August 31, 2026 14:47
@melvin-bot

melvin-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

@ZhenjaHorbach 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 requested review from dylanexpensify and removed request for a team August 31, 2026 14:47
@github-actions

Copy link
Copy Markdown
Contributor

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

Comment thread src/pages/home/ForYouSection/ConciergePromptBox.tsx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4fee957c77

ℹ️ 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".

Comment thread src/pages/home/ForYouSection/ConciergePromptBox.tsx
@github-actions

This comment has been minimized.

@dannymcclain

Copy link
Copy Markdown
Contributor

This might be a silly question, but why would you ever need to @mention someone in that Concierge input?

@shawnborton

Copy link
Copy Markdown
Contributor

My thinking is that it might be nice to do something like Show me all violations from @danny last quarter

@dannymcclain

Copy link
Copy Markdown
Contributor

Ah yes! That makes perfect sense, thank you.

@shawnborton

Copy link
Copy Markdown
Contributor

Hmm the send button is not active, I can't actually send this message:

CleanShot 2026-08-31 at 17 11 57@2x

@GCyganek

GCyganek commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@shawnborton are you still able to reproduce? I can't:

Screen.Recording.2026-09-01.at.10.27.13.mov

@GCyganek

GCyganek commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Jest test failing on main, not caused by this PR, will merge main later when it's fixed

@shawnborton

Copy link
Copy Markdown
Contributor

Hmm odd, I can't reproduce now - ignore me!

@ZhenjaHorbach

ZhenjaHorbach commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible 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 checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • 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 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)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • 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 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.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this 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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
2026-09-10.10.43.53.mov
Android: mWeb Chrome
2026-09-10.10.43.53.mov
iOS: HybridApp
2026-09-10.10.37.14.mov
iOS: mWeb Safari
2026-09-10.10.34.26.mov
MacOS: Chrome / Safari
2026-09-10.10.42.05.mov

dylanexpensify
dylanexpensify previously approved these changes Sep 3, 2026

@dylanexpensify dylanexpensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

good from a product perspective 👍

@GCyganek

Copy link
Copy Markdown
Contributor Author

Ok I talked to @ZhenjaHorbach in DMs and we verified that flickering also happens on main in the concierge chat, so this is not something that was introduced on this PR, we can test on AdHoc to see if it's not only a simulator/dev build problem

@GCyganek

Copy link
Copy Markdown
Contributor Author

@shawnborton @dylanexpensify could you trigger adhoc build here? 🙏 thanks!

@shawnborton

Copy link
Copy Markdown
Contributor

Doing it now 🚀

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

@GCyganek

Copy link
Copy Markdown
Contributor Author

@ZhenjaHorbach I tested on two physical Android devices and couldn't reproduce flickering, maybe this is only simulator/dev build issue? This is not caused by this PR anyway so I think we can keep an eye on this and proceed

@melvin-bot
melvin-bot Bot requested a review from puneetlath September 10, 2026 13:02
@ZhenjaHorbach

Copy link
Copy Markdown
Contributor

LGTM then!

@puneetlath puneetlath left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems good to me from a code-perspective. Just confirming that @shawnborton @dylanexpensify you guys are good on the product side?

@shawnborton

Copy link
Copy Markdown
Contributor

Hmm the list looks cut off at the bottom:
CleanShot 2026-09-10 at 20 42 55@2x

Which I am realizing is something that happens in regular chats too. So maybe ignore that, we can follow up and make it so that just the border of the popover cuts the overflow and not the awkward strip at the top/bottom. Otherwise good from me 👍

@ZhenjaHorbach

ZhenjaHorbach commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Yeah
That’s an acceptable height for the suggestion box, which we didn't change in this PR
But probably, yes
We can improve it in the future!

@puneetlath
puneetlath merged commit 29d10d2 into Expensify:main Sep 10, 2026
39 of 44 checks passed
@OSBotify

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

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

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/puneetlath in version: 9.4.76-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Yes, help site changes are required. Draft PR: #100902

Why: this PR adds a user-facing capability — @mention and :emoji suggestions in the Concierge prompt box on Home — but the prompt box itself isn't documented anywhere under docs/articles. Expensify-Home-Overview.md lists every other Home section and never mentions it, and its FAQ currently says no actions can be completed from Home, which is now wrong.

What changed (one file, docs/articles/new-expensify/getting-started/Expensify-Home-Overview.md):

  • Lists the Concierge prompt box in What Home shows.
  • ## How to ask Concierge a question from the prompt box on Home — the box, its placeholder copy, attaching a file, sending, and draft persistence.
  • ## How to mention someone in the Concierge prompt box on Home — typing @, plus the web keyboard behavior (Enter / Tab insert, Escape dismisses, prompt not sent while the list is open).
  • ## How to add an emoji in the Concierge prompt box on Home — typing : and inserting a suggestion.
  • Four FAQ entries, including "Why didn't my prompt send when I pressed Enter?", and a correction to "Can actions be completed from Home?".
  • Updated keywords and internalScope.

No other article needs changes. The useComposerSuggestions extraction, the suggestions portal z-index, and the getSuggestionsViewportBottom helpers are internal — no documentation impact.

UI strings verified against the running app on web, not the code
Documented as Verified value
Wide-screen placeholder Ask Concierge to analyze your expenses or get support
Narrow-screen / mobile placeholder Ask Concierge anything
Attachment menu item Add attachment
Send control Send icon
Top-right control that opens Concierge in the right-hand panel Help icon (Concierge avatar)

Note for a separate cleanup: Concierge-Basics.md and Support-Agent.md both say "Click the Concierge icon at the top right corner", but that control's label in the current UI is Help. Out of scope for this PR, so I left it alone.

Written against docs/HELPSITE_NAMING_CONVENTIONS.md, docs/HELP_AUTHORING_GUIDELINES.md, and docs/TEMPLATE.md: one # title plus # FAQ, only ## below it, every heading task-based, UI labels bolded and matched exactly, and the one suggested screenshot left as a non-rendered <!-- SCREENSHOT: --> placeholder.

@GCyganek, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review

@vincdargento

Copy link
Copy Markdown

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

@unzig21

unzig21 commented Sep 11, 2026

Copy link
Copy Markdown

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

@jponikarchuk

Copy link
Copy Markdown

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

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.4.76-1 🚀

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

Bundle Size Analysis (Sentry):

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

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.