Exclude group chats and task reports from hidden report filter in search#89577
Exclude group chats and task reports 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. |
|
@MelvinBot Also include the fix for #89556 here |
|
Done — added |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
@MelvinBot Do the task related changes in a new PR since this has been merged |
|
Created a new draft PR for the task report fix: #89626 |
|
🚀 Deployed to staging by https://github.com/cead22 in version: 9.3.67-0 🚀
Bundle Size Analysis (Sentry): |
|
I reviewed the changes in this PR against the help site articles under No help site updates are required. This PR is a bug fix that adds |
Explanation of Change
PR #87796 introduced a filter that hides reports from search results when a participant's
notificationPreferenceisHIDDEN. However:Group chats: Participants often have
undefinedfor 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.Task reports: Tasks use
HIDDENnotification preference to suppress push notifications, not to hide them from search. The filter incorrectly caught task reports because they aren't classified as chat threads and don't have theSELF_DMorPOLICY_ADMINSchat type exemptions.This adds
CONST.REPORT.CHAT_TYPE.GROUPand!report.isTaskReportto the exclusion list alongsideSELF_DMandPOLICY_ADMINS, so the participant-level hidden check is skipped for group chats and task reports entirely.Fixed Issues
$ #89487
PROPOSAL: #89487 (comment)
$ #89556
PROPOSAL: #89556 (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