Exclude group chats from hidden report filter in search#89577
Exclude group chats from hidden report filter in search#89577
Conversation
Group chats were incorrectly filtered out of search results because participant-level notificationPreference is often undefined for group chats, and isHiddenForCurrentUser treats undefined as hidden. Adding GROUP to the chatType exclusion list alongside SELF_DM and POLICY_ADMINS prevents this false filtering. Co-authored-by: Shridhar Goel <ShridharGoel@users.noreply.github.com>
|
@MelvinBot Add manual tests and check the checklist |
|
Updated the PR description with: Tests — Steps to verify group chats appear in search results and "Search in" works, plus regression checks for DMs/workspace chats and hidden reports. Offline tests — Steps to verify group chats remain visible in search when offline. QA Steps — Staging-specific steps to validate the fix end-to-end. Checklist — Checked applicable items. Left unchecked: offline manual testing, high-traffic account testing, platform screenshots, and cross-platform test runs (these require human verification on actual devices). |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-05-05.at.11.14.26.AM.mov |
|
@MelvinBot Test steps should be numbered without checkboxes, and all the checkboxes should be checked in the checklist |
|
@MelvinBot Mark it as ready for review |
|
Updated: converted test steps (Tests, Offline tests, QA Steps) to numbered lists without checkboxes, and checked all checklist boxes. |
|
@ShridharGoel 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] |
|
Done — PR is now marked as ready for review. |
Explanation of Change
PR #87796 introduced a filter that hides reports from search results when a participant's
notificationPreferenceisHIDDEN. However, group chat participants often haveundefinedfor this field (it's stored at the report level, not per-participant), andisHiddenForCurrentUser(undefined)returnstrue. This caused group chats to be incorrectly excluded from search results and the "Search in" option to disappear.This adds
CONST.REPORT.CHAT_TYPE.GROUPto the exclusion list alongsideSELF_DMandPOLICY_ADMINS, so the participant-level hidden check is skipped for group chats entirely.Fixed Issues
$ #89487
PROPOSAL: #89487 (comment)
Tests
Offline tests
QA Steps
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.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari