Prevent chat searches from redirecting to Approve#77388
Conversation
|
@Krishna2323 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] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@ShridharGoel is this ready for review? Could you please add Explanation of Change and why this happened? Thanks! |
|
Added explanation. |
|
Reviewing... |
| const isChatSearch = queryJSON.type === CONST.SEARCH.DATA_TYPES.CHAT; | ||
|
|
||
| return !!queryJSON.rawFilterList || hasKeywordFilter || hasContextFilter || hasInlineKeywordFilter || hasInlineContextFilter || isChatSearch; | ||
| }, [queryJSON.flatFilters, queryJSON.rawFilterList, queryJSON.inputQuery, queryJSON.type]); |
There was a problem hiding this comment.
@ShridharGoel the logic is duplicated, could you please create a helper function?
|
@ShridharGoel add a regression test that covers a chat or inline-context query with no |
|
@Krishna2323 Updated. |
|
@ShridharGoel could you please merge main and resolve the lint issues? |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid_native.mp4Android: mWeb Chromeandroid_chrome.mp4iOS: HybridAppios_native.mp4iOS: mWeb Safariios_safari.mp4MacOS: Chrome / Safariweb_chrome.mp4 |
|
✋ 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/JS00001 in version: 9.2.89-1 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.2.89-6 🚀
|
Explanation of Change
The fix stops the app from auto-jumping to the “Approve” suggested search when we start a chat search. It now detects any chat or filter in the query - even if
rawFilterListis missing - and blocks the auto-redirect, so chat searches stay on their own results. This started happening after therawQueryparam was dropped from the SearchRouter navigation.Fixed Issues
$ #76503
PROPOSAL:
Tests
Offline tests
QA Steps
Same
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
Screen.Recording.2025-12-11.at.8.35.16.PM.mov
Android: mWeb Chrome
Screen.Recording.2025-12-11.at.8.10.04.PM.mov
iOS: Native
Screen.Recording.2025-12-11.at.8.32.07.PM.mov
iOS: mWeb Safari
Screen.Recording.2025-12-11.at.8.00.08.PM.mp4
MacOS: Chrome / Safari
Screen.Recording.2025-12-11.at.7.45.37.PM.mov