Skip to content

[CP Staging] Fix Concierge prompt box bugs on the HomePage - #100935

Merged
puneetlath merged 4 commits into
Expensify:mainfrom
software-mansion-labs:@GCyganek/concierge-prompt-box-blockers-home-ap
Sep 11, 2026
Merged

[CP Staging] Fix Concierge prompt box bugs on the HomePage#100935
puneetlath merged 4 commits into
Expensify:mainfrom
software-mansion-labs:@GCyganek/concierge-prompt-box-blockers-home-ap

Conversation

@GCyganek

@GCyganek GCyganek commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

ReceiptScanDropZone now wraps page content and publishes its drag state via DragAndDropStateContext, so the composer's Suggestions list closes when a file is dragged over the page. Drag logic and overlay moved into a new ReceiptScanDropTarget, unmounted while disabled. HomePage, SearchPageWide and SearchPageNarrow updated to the wrapper API.

isEnoughSpaceToRenderMenuAboveCursor now also takes into consideration suggestion list chrome height (borders, paddings) and correct gap between the caret and the list in the native app

Fixed Issues

$ #100915
$ #100934
PROPOSAL: N/A

Tests

T1:

  1. Open the web app on Home page.

  2. Focus the Concierge prompt box (composer) and type :smi so the emoji suggestion list opens.

  3. Drag an image file from your file system over the Home page (do not drop yet).

  4. Verify that the emoji suggestion list closes as soon as the file is dragged over the page, and the "Scan receipts" drop overlay appears.

  5. Drag the file outside of the window to cancel the drag.

  6. Verify that the drop overlay disappears and the page returns to its normal state.

  7. Repeat steps 2-3, then drop the file on the page.

  8. Verify that the receipt scan flow starts with the dropped file.

  9. Repeat steps 1-8 with a mention suggestion (type @ + a few letters) and verify the mention suggestion list also closes while dragging.

  10. Go to Spend on a wide layout.

  11. Drag an image file over the page and verify the "Scan receipts" drop overlay appears; drop it and verify the receipt scan flow starts.

  12. Resize the window to a narrow layout and open Spend again.

  13. Verify the page renders correctly (header, search input, filters bar, list, bottom tab bar) and that scrolling/collapsing the header still works.

  14. Drag an image file over the page and verify the drop overlay appears above the bottom tab bar, then drop it and verify the receipt scan flow starts.

T2:

  1. Open the native app on iOS/Android on the home page
  2. Focus the Concierge prompt box and trigger the suggestion list (type in @ or :smi)
  3. Verify that the list is displayed correctly and not cut off by the dynamic island/camera notch when displayed above the box
  4. Repeat steps 2.-3. after scrolling down/up a bit to test cases
  • 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-09-11.at.12.16.32.mov
Android: mWeb Chrome
iOS: Native
Screen.Recording.2026-09-11.at.12.14.52.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-09-11.at.09.53.38.mov
Screen.Recording.2026-09-11.at.10.04.47.mov

@GCyganek

Copy link
Copy Markdown
Contributor Author

@codex please review

@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: 888cb3a504

ℹ️ 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/HomePage.tsx
@codecov

codecov Bot commented Sep 11, 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 Δ
src/components/DragAndDrop/Provider/index.tsx 0.00% <ø> (ø)
src/components/DropZone/DropZoneWrapper.tsx 0.00% <ø> (ø)
...ents/ReceiptScanDropZone/ReceiptScanDropTarget.tsx 100.00% <100.00%> (ø)
src/components/ReceiptScanDropZone/index.tsx 100.00% <100.00%> (+15.38%) ⬆️
src/pages/home/HomePage.tsx 100.00% <100.00%> (ø)
src/libs/DragAndDropUtils.ts 0.00% <0.00%> (ø)
src/styles/utils/index.ts 59.92% <50.00%> (-0.15%) ⬇️
src/components/AutoCompleteSuggestions/index.tsx 2.70% <0.00%> (-0.04%) ⬇️
src/pages/Search/SearchPageNarrow/index.tsx 70.78% <78.94%> (+0.67%) ⬆️
src/pages/Search/SearchPageWide.tsx 0.00% <0.00%> (ø)
... and 17 files with indirect coverage changes

@GCyganek
GCyganek marked this pull request as ready for review September 11, 2026 09:19
@GCyganek
GCyganek requested review from a team as code owners September 11, 2026 09:19
@melvin-bot
melvin-bot Bot requested review from ZhenjaHorbach and garrettmknight and removed request for a team September 11, 2026 09:20
@melvin-bot

melvin-bot Bot commented Sep 11, 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]

};

function shouldAcceptDrop(event: DragEvent): boolean {
return !!event.dataTransfer?.types.some((type) => type === 'Files');

@ZhenjaHorbach ZhenjaHorbach Sep 11, 2026

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.

Can we create a utility for this logic?
Since we use this logic in a few places

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will take a look at it, I just copy pasted from old ReceiptScanDropZone, but if it is used in a few places then it's a good idea

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

isMobileSelectionModeEnabled={false}
/>
</View>
<View style={[styles.flex1]}>

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.

<View style={styles.flex1}>

/>
</>
)}
<View style={[styles.flex1]}>

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.

<View style={styles.flex1}>

@GCyganek
GCyganek requested a review from a team as a code owner September 11, 2026 10:14
@ZhenjaHorbach

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-11.12.58.34.mov
Android: mWeb Chrome
2026-09-11.12.58.34.mov
iOS: HybridApp
2026-09-11.12.56.13.mov
iOS: mWeb Safari
2026-09-11.12.51.28.mov
MacOS: Chrome / Safari
2026-09-11.12.35.56.mov

@melvin-bot
melvin-bot Bot requested a review from puneetlath September 11, 2026 11:04
@puneetlath
puneetlath merged commit 3f0161f into Expensify:main Sep 11, 2026
36 of 40 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

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

@mountiny mountiny changed the title Fix Concierge prompt box bugs on the HomePage [CP Staging] Fix Concierge prompt box bugs on the HomePage Sep 11, 2026
OSBotify pushed a commit that referenced this pull request Sep 11, 2026
…erge-prompt-box-blockers-home-ap

Fix Concierge prompt box bugs on the HomePage

(cherry picked from commit 3f0161f)

(cherry-picked to staging by mountiny)
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Sep 11, 2026
@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.

@os-botify

os-botify Bot commented Sep 11, 2026

Copy link
Copy Markdown

🔁 Filed a Staging retest request for deploy blockers #100915, #100934 after this PR was cherry-picked to staging.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.4.76-1 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 No help site changes required — no draft PR created.

This PR is a pure bug fix. It restores the behavior the help site already describes, so nothing under docs/articles needs updating.

Why

What changed: ReceiptScanDropZone was refactored into a wrapper plus a new ReceiptScanDropTarget, drag state is now published through DragAndDropStateContext so the composer's suggestion list closes during a drag, and isEnoughSpaceToRenderMenuAboveCursor now accounts for the suggestion list's chrome height and caret gap.

Fixed issues:

No documentable surface changed:

  • No new user-facing copy. The only translation keys in the diff (dropzone.scanReceipts, common.selectMultiple) were moved, not added or reworded — no src/languages/*.ts files were touched.
  • No new feature, setting, tab, or button. Every change is layout, positioning, and component structure.
  • Both fixes target a feature that hasn't reached production yet (both reports say "N/A - new feature, doesn't exist in prod"), and neither changes the intended behavior — they make it work as already documented.

The docs already match the fixed behavior:

Neither statement becomes wrong or incomplete because of this PR. The help site doesn't document suggestion-list dismissal behavior or menu positioning, and it shouldn't — that's incidental UI behavior, not something a user needs instructions for.

GCyganek, if you expected this PR to introduce user-facing behavior that needs documenting, let me know what it is and I'll create the draft 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):

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.4.77-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Re-checked — still no help site changes required, no draft PR created.

Same conclusion as my earlier review. The PR is merged and deployed, and the diff hasn't changed since.

One thing I verified more closely this time, since SearchPageWide and SearchPageNarrow show large line counts: those pages already rendered ReceiptScanDropZone before this PR. The diff only swaps it from a sibling-with-targetRef to a wrapper-with-children:

-            {!!queryJSON && <ReceiptScanDropZone targetRef={receiptDropTargetRef} />}
+            <ReceiptScanDropZone

So no page gained receipt drag-and-drop here. It's a component API refactor, and the big +122/-122 on SearchPageNarrow is re-indentation from the new wrapper nesting.

Everything else holds: no new or reworded copy (dropzone.scanReceipts and common.selectMultiple were only moved, and no src/languages/*.ts file was touched), no new feature, setting, tab, or button, and both fixed issues — #100915 and #100934 — restore intended behavior rather than change it.

The help site already describes this behavior correctly and stays accurate:

GCyganek, if you want documentation for the receipt drag-and-drop feature itself (shipped in #99912, not this PR), say the word and I'll open that draft PR instead.

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

Labels

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants