From 5a10a3e3bbbd5932f70821d311396cd0811370fc Mon Sep 17 00:00:00 2001 From: emkhalid Date: Sat, 20 Jun 2026 04:22:27 +0430 Subject: [PATCH 1/5] Fix Track Workspace admin room visibility in LHN --- src/hooks/useAutoCreateTrackWorkspace.ts | 8 ++++++++ src/libs/ReportUtils.ts | 1 + src/libs/SidebarUtils.ts | 1 + 3 files changed, 10 insertions(+) diff --git a/src/hooks/useAutoCreateTrackWorkspace.ts b/src/hooks/useAutoCreateTrackWorkspace.ts index 7dc07f940edd..d2e77fabdf4a 100644 --- a/src/hooks/useAutoCreateTrackWorkspace.ts +++ b/src/hooks/useAutoCreateTrackWorkspace.ts @@ -1,6 +1,8 @@ import {useCallback, useMemo} from 'react'; import type {OnyxCollection} from 'react-native-onyx'; import isSidePanelReportSupported from '@components/SidePanel/isSidePanelReportSupported'; +import {waitForWrites} from '@libs/API'; +import {WRITE_COMMANDS} from '@libs/API/types'; import Log from '@libs/Log'; import {navigateAfterOnboardingWithMicrotaskQueue} from '@libs/navigateAfterOnboarding'; import isTrackOnboardingChoice from '@libs/OnboardingUtils'; @@ -107,6 +109,12 @@ function useAutoCreateTrackWorkspace() { isSelfTourViewed, }); + if (!isSidePanelReportSupported) { + // Native navigates immediately to Concierge after Track onboarding, so wait for the + // sequential write queue to settle before building the LHN from hydrated reports. + await waitForWrites(WRITE_COMMANDS.COMPLETE_GUIDED_SETUP); + } + if (isSidePanelReportSupported) { rhpVariant = extractRHPVariantFromResponse(response); // Every Track onboarding choice should land in the Concierge RHP, but the backend diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index fb3ab429bfa1..a9c05d5bab6a 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -9595,6 +9595,7 @@ function reasonForReportToBeInOptionList({ isEmptyChat && isChatReport(report) && !isPolicyExpenseChat(report) && + !isAdminRoom(report) && !isTripRoom(report) && !isConciergeChatReport(report) && !isSystemChatReport && diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts index 52fac7a361b2..940714b5ac24 100644 --- a/src/libs/SidebarUtils.ts +++ b/src/libs/SidebarUtils.ts @@ -335,6 +335,7 @@ function shouldDisplayReportInLHN({ isFocused || isSystemChat || !!report.isPinned || + isAdminRoom(report) || // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing requiresAttention || (report.isOwnPolicyExpenseChat && !isReportArchived); From b79d59e7bf95f68e77b6a42b3dcb1572dd8769ba Mon Sep 17 00:00:00 2001 From: emkhalid Date: Sat, 20 Jun 2026 05:01:51 +0430 Subject: [PATCH 2/5] Fix Track Workspace admin room visibility in LHN --- ios/Podfile.lock | 2 +- src/libs/SidebarUtils.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index abfa99567ddd..6691a01b2cf2 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -4808,7 +4808,7 @@ SPEC CHECKSUMS: GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 GzipSwift: 893f3e48e597a1a4f62fafcb6514220fcf8287fa - hermes-engine: a0c087309de5ae9b2297a2cd8acfa9c53de099ee + hermes-engine: 2e1c982292492d79d35e77c5b5eeed38d86d9683 libavif: 84bbb62fb232c3018d6f1bab79beea87e35de7b7 libdav1d: 23581a4d8ec811ff171ed5e2e05cd27bad64c39f libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8 diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts index 940714b5ac24..fc0ed00bdf3a 100644 --- a/src/libs/SidebarUtils.ts +++ b/src/libs/SidebarUtils.ts @@ -171,6 +171,7 @@ import { isAnnounceRoom, isArchivedNonExpenseReport, isArchivedReport, + isChatReport, isChatRoom, isChatThread, isConciergeChatReport, @@ -335,7 +336,7 @@ function shouldDisplayReportInLHN({ isFocused || isSystemChat || !!report.isPinned || - isAdminRoom(report) || + (isChatReport(report) && isAdminRoom(report)) || // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing requiresAttention || (report.isOwnPolicyExpenseChat && !isReportArchived); From be40ac41a5fa514ade772717ec5717790fbb0881 Mon Sep 17 00:00:00 2001 From: emkhalid Date: Thu, 25 Jun 2026 18:54:15 +0430 Subject: [PATCH 3/5] Revert unrelated Podfile.lock change --- ios/Podfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6691a01b2cf2..abfa99567ddd 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -4808,7 +4808,7 @@ SPEC CHECKSUMS: GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 GzipSwift: 893f3e48e597a1a4f62fafcb6514220fcf8287fa - hermes-engine: 2e1c982292492d79d35e77c5b5eeed38d86d9683 + hermes-engine: a0c087309de5ae9b2297a2cd8acfa9c53de099ee libavif: 84bbb62fb232c3018d6f1bab79beea87e35de7b7 libdav1d: 23581a4d8ec811ff171ed5e2e05cd27bad64c39f libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8 From 160cb496c82dc66d56a5e41a96e8c486d2d5bbe4 Mon Sep 17 00:00:00 2001 From: emkhalid Date: Fri, 26 Jun 2026 14:45:16 +0430 Subject: [PATCH 4/5] Revert out-of-scope onboarding hook change --- src/hooks/useAutoCreateTrackWorkspace.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/hooks/useAutoCreateTrackWorkspace.ts b/src/hooks/useAutoCreateTrackWorkspace.ts index e2103a970497..e53fb71b7e4a 100644 --- a/src/hooks/useAutoCreateTrackWorkspace.ts +++ b/src/hooks/useAutoCreateTrackWorkspace.ts @@ -1,8 +1,6 @@ import {useCallback, useMemo} from 'react'; import type {OnyxCollection} from 'react-native-onyx'; import isSidePanelReportSupported from '@components/SidePanel/isSidePanelReportSupported'; -import {waitForWrites} from '@libs/API'; -import {WRITE_COMMANDS} from '@libs/API/types'; import Log from '@libs/Log'; import {navigateAfterOnboardingWithMicrotaskQueue} from '@libs/navigateAfterOnboarding'; import isTrackOnboardingChoice from '@libs/OnboardingUtils'; @@ -108,12 +106,6 @@ function useAutoCreateTrackWorkspace() { isSelfTourViewed, }); - if (!isSidePanelReportSupported) { - // Native navigates immediately to Concierge after Track onboarding, so wait for the - // sequential write queue to settle before building the LHN from hydrated reports. - await waitForWrites(WRITE_COMMANDS.COMPLETE_GUIDED_SETUP); - } - if (isSidePanelReportSupported) { rhpVariant = extractRHPVariantFromResponse(response); // Every Track onboarding choice should land in the Concierge RHP, but the backend From e0dc89757c9e88ca4b2e610492b986b8a1676ade Mon Sep 17 00:00:00 2001 From: emkhalid Date: Fri, 26 Jun 2026 16:14:03 +0430 Subject: [PATCH 5/5] Add regression test for admin room LHN visibility --- tests/unit/ReportUtilsTest.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/unit/ReportUtilsTest.ts b/tests/unit/ReportUtilsTest.ts index 0e78d8d4f67c..36925452595d 100644 --- a/tests/unit/ReportUtilsTest.ts +++ b/tests/unit/ReportUtilsTest.ts @@ -7033,6 +7033,29 @@ describe('ReportUtils', () => { ).toBeTruthy(); }); + it('should return true for empty admin room even when excludeEmptyChats is true', () => { + const report: Report = { + ...createAdminRoom(1), + participants: buildParticipantsFromAccountIDs([1, 2]), + lastMessageText: '', + lastVisibleActionCreated: DateUtils.getDBTime(), + }; + + expect( + shouldReportBeInOptionList({ + report, + chatReport: mockedChatReport, + currentReportId: '', + isInFocusMode: false, + betas: [CONST.BETAS.DEFAULT_ROOMS], + doesReportHaveViolations: false, + excludeEmptyChats: true, + draftComment: '', + isReportArchived: undefined, + }), + ).toBeTruthy(); + }); + it('should return false when the report has an unsupported type', () => { const report: Report = { ...LHNTestUtils.getFakeReport(),