From c201f4e7120497361b7a180161f3ed4f1fc52a34 Mon Sep 17 00:00:00 2001 From: thelullabyy Date: Wed, 25 Jun 2025 11:36:56 +0700 Subject: [PATCH 1/2] fix: Open reports show receiver in narrow screen --- src/libs/SearchUIUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/SearchUIUtils.ts b/src/libs/SearchUIUtils.ts index 476677285498..cfc5c69e4467 100644 --- a/src/libs/SearchUIUtils.ts +++ b/src/libs/SearchUIUtils.ts @@ -910,12 +910,13 @@ function getReportSections(data: OnyxTypes.SearchResults['data'], metadata: Onyx const isIOUReport = reportItem.type === CONST.REPORT.TYPE.IOU; const reportPendingAction = reportItem?.pendingAction ?? reportItem?.pendingFields?.preview; + const shouldShowBlankTo = !reportItem || isOpenExpenseReport(reportItem); reportIDToTransactions[reportKey] = { ...reportItem, action: getAction(data, allViolations, key), keyForList: reportItem.reportID, from: data.personalDetailsList?.[reportItem.accountID ?? CONST.DEFAULT_NUMBER_ID], - to: reportItem.managerID ? data.personalDetailsList?.[reportItem.managerID] : emptyPersonalDetails, + to: !shouldShowBlankTo && reportItem.managerID ? data.personalDetailsList?.[reportItem.managerID] : emptyPersonalDetails, transactions, ...(reportPendingAction ? {pendingAction: reportPendingAction} : {}), }; From 9fc04940bb3e41581cd9b5a0793441cdedaae989 Mon Sep 17 00:00:00 2001 From: thelullabyy Date: Wed, 25 Jun 2025 14:38:32 +0700 Subject: [PATCH 2/2] fix: unit test --- tests/unit/Search/SearchUIUtilsTest.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/Search/SearchUIUtilsTest.ts b/tests/unit/Search/SearchUIUtilsTest.ts index 1847a27e54fc..93fbb5413beb 100644 --- a/tests/unit/Search/SearchUIUtilsTest.ts +++ b/tests/unit/Search/SearchUIUtilsTest.ts @@ -731,10 +731,10 @@ const reportsListItems = [ stateNum: 0, statusNum: 0, to: { - accountID: 18439984, - avatar: 'https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/avatar_3.png', - displayName: 'Admin', - login: adminEmail, + accountID: 0, + avatar: '', + displayName: undefined, + login: undefined, }, total: -5000, transactions: [