From 1380d745cc97e2c221e4b852ffbdcd9f5e743c31 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Fri, 21 Nov 2025 22:23:58 +0800 Subject: [PATCH 1/2] fix user is navigated to the thread when it's a one transaction report --- src/components/Search/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index 7dcb6f538791..7964e086f187 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -666,8 +666,10 @@ function Search({ // If we're trying to open a transaction without a transaction thread, let's create the thread and navigate the user if (isTransactionItem && item.transactionThreadReportID === CONST.REPORT.UNREPORTED_REPORT_ID) { - createAndOpenSearchTransactionThread(item, hash, backTo); - return; + createAndOpenSearchTransactionThread(item, hash, backTo, undefined, !item.isFromOneTransactionReport); + if (!item.isFromOneTransactionReport) { + return; + } } if (isTransactionMemberGroupListItemType(item)) { From 124176f9072ee31af2cea1efe2bd6bb883f08ffb Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Mon, 24 Nov 2025 23:32:58 +0800 Subject: [PATCH 2/2] opens transaction thread if it's from self DM --- src/components/Search/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index 12eb9fac7214..0b1a6b9af512 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -674,8 +674,10 @@ function Search({ // If we're trying to open a transaction without a transaction thread, let's create the thread and navigate the user if (isTransactionItem && item.transactionThreadReportID === CONST.REPORT.UNREPORTED_REPORT_ID) { - createAndOpenSearchTransactionThread(item, hash, backTo, undefined, !item.isFromOneTransactionReport); - if (!item.isFromOneTransactionReport) { + // If the report is unreported (self DM), we want to open the track expense thread instead of a report with an ID of 0 + const shouldOpenTransactionThread = !item.isFromOneTransactionReport || item.reportID === CONST.REPORT.UNREPORTED_REPORT_ID; + createAndOpenSearchTransactionThread(item, hash, backTo, undefined, shouldOpenTransactionThread); + if (shouldOpenTransactionThread) { return; } }