Fix from:me search filter not applied when pasted#90094
Conversation
The 'me' keyword in search queries was only recognized when selected via autocomplete (which populates the substitution map). When pasted/typed directly, 'me' was not resolved to the current user's account ID because: 1. filterOutRangesWithCorrectValue did not check for CONST.SEARCH.ME, so the value was filtered out and never highlighted green. 2. getQueryWithSubstitutions had no fallback for 'me' when the substitution map was empty, so the literal string 'me' was sent to the backend instead of the user's account ID. Add CONST.SEARCH.ME check to the highlighting validation, and resolve 'me' to currentUserAccountID in getQueryWithSubstitutions when not found in the substitution map.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-05-12.at.12.14.18.mp4Android: mWeb ChromeScreen.Recording.2026-05-12.at.12.16.13.mp4iOS: HybridAppScreen.Recording.2026-05-12.at.12.20.59.mp4iOS: mWeb SafariScreen.Recording.2026-05-12.at.12.22.18.mp4MacOS: Chrome / SafariScreen.Recording.2026-05-12.at.12.08.50.mp4 |
|
@justinpersaud looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/justinpersaud in version: 9.3.73-0 🚀
Bundle Size Analysis (Sentry): |
|
Yes, help site changes are needed. The search operators article already documents Draft PR created: #90428 Changes made:
Note: The |
|
🚀 Deployed to staging by https://github.com/justinpersaud in version: 9.3.73-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.73-4 🚀
|
Explanation of Change
Pasting or typing
from:me(and the other user filters:to:me,assignee:me,payer:me,exporter:me,attendee:me) was broken — themekeyword didn't turn green and the filter wasn't applied, so results came back unfiltered.It only worked when
mewas picked from the autocomplete dropdown, because that path stored a mapping frommeto the current user's account ID. Pasting or typing skips that step, so the keyword stayed unresolved and the literal stringmewas sent to the backend.This change recognizes
meas a valid value for the user-based filters in two places: the highlighting check (so the keyword turns green) and the query submission step (so it's swapped for the current user's account ID before the request goes out).Fixed Issues
$ #86603
PROPOSAL: #86603 (comment)
Tests
Preconditions:
type:expense-report action:submit from:memeturns green and the system correctly applies the filter, returning only the expense reports submitted by the current user.Offline tests
Same as Tests. The fix is entirely client-side:
meresolves to the current user's account ID before the query reaches the network layer, so the substitution and highlighting work identically online or offline.QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Kapture.2026-05-09.at.14.34.35.mp4
Android: mWeb Chrome
Kapture.2026-05-09.at.14.32.48.mp4
iOS: Native
Kapture.2026-05-09.at.13.48.47.mp4
iOS: mWeb Safari
Kapture.2026-05-09.at.14.09.21.mp4
MacOS: Chrome / Safari
Kapture.2026-05-09.at.13.39.21.mp4