From 15d9ffac5d9f1bc98e1a6a9e3a2f718d8ed7f6d6 Mon Sep 17 00:00:00 2001 From: Faizan Shoukat Abbasi Date: Wed, 18 Feb 2026 18:36:45 +0500 Subject: [PATCH 1/3] 82244: Sign up - Still assign guide for Track users after created workspace --- src/libs/ReportUtils.ts | 8 +++++--- tests/unit/ReportUtilsTest.ts | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 0712d2280b1a6..8a8ca066e3928 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -11447,7 +11447,7 @@ function prepareOnboardingOnyxData({ onboardingMessage = getOnboardingMessages().onboardingMessages[CONST.ONBOARDING_CHOICES.SUBMIT]; } - // Guides are assigned and tasks are posted in the #admins room for the MANAGE_TEAM and TRACK_WORKSPACE onboarding actions, except for emails that have a '+'. + // Only the MANAGE_TEAM onboarding action uses the #admins room (with a guide); TRACK_WORKSPACE uses Concierge. Excludes emails that have a '+'. const shouldPostTasksInAdminsRoom = isPostingTasksInAdminsRoom(engagementChoice); // When posting to admins room and the user is in the suggestedFollowups beta, we skip tasks in favor of backend-generated followups. const shouldUseFollowupsInsteadOfTasks = shouldPostTasksInAdminsRoom && Permissions.isBetaEnabled(CONST.BETAS.SUGGESTED_FOLLOWUPS, allBetas, betaConfiguration); @@ -12111,13 +12111,15 @@ function isChatUsedForOnboarding( /** * Whether onboarding tasks should be posted in the #admins room instead of Concierge. - * Onboarding guides are assigned to signup with emails that do not contain a '+' and select the "Manage my team's expenses" intent. + * Only the "Manage my team's expenses" (MANAGE_TEAM) intent uses the #admins room with a guide; + * Track and budget expenses (TRACK_WORKSPACE) uses Concierge chat. Guides are assigned to signups + * with emails that do not contain a '+' and who select MANAGE_TEAM. */ function isPostingTasksInAdminsRoom(engagementChoice?: OnboardingPurpose): boolean { const userHasPhonePrimaryEmail = Str.endsWith(currentUserEmail ?? '', CONST.SMS.DOMAIN); return ( engagementChoice !== undefined && - [CONST.ONBOARDING_CHOICES.MANAGE_TEAM, CONST.ONBOARDING_CHOICES.TRACK_WORKSPACE].includes(engagementChoice as 'newDotManageTeam' | 'newDotTrackWorkspace') && + engagementChoice === CONST.ONBOARDING_CHOICES.MANAGE_TEAM && (!currentUserEmail?.includes('+') || userHasPhonePrimaryEmail) ); } diff --git a/tests/unit/ReportUtilsTest.ts b/tests/unit/ReportUtilsTest.ts index 5e28dd1c7e6a8..ee78189f711d9 100644 --- a/tests/unit/ReportUtilsTest.ts +++ b/tests/unit/ReportUtilsTest.ts @@ -3966,6 +3966,20 @@ describe('ReportUtils', () => { expect(isChatUsedForOnboarding(report, onboardingValue, undefined, CONST.ONBOARDING_CHOICES.MANAGE_TEAM)).toBeTruthy(); }); + it('should return false for admins room when engagement choice is TRACK_WORKSPACE (Concierge is used for onboarding)', async () => { + const onboardingValue = {hasCompletedGuidedSetupFlow: true} as Onboarding; + + await Onyx.multiSet({ + [ONYXKEYS.NVP_ONBOARDING]: onboardingValue, + }); + + const report = { + ...LHNTestUtils.getFakeReport(), + chatType: CONST.REPORT.CHAT_TYPE.POLICY_ADMINS, + }; + expect(isChatUsedForOnboarding(report, onboardingValue, undefined, CONST.ONBOARDING_CHOICES.TRACK_WORKSPACE)).toBeFalsy(); + }); + it('should return true for concierge chat when conciergeReportID matches report ID', async () => { const conciergeReportID = '12345'; const report: Report = { From 5338b26e7f9a6a92c07857a3291a2dc80551d4f9 Mon Sep 17 00:00:00 2001 From: Faizan Shoukat Abbasi Date: Wed, 18 Feb 2026 18:56:52 +0500 Subject: [PATCH 2/3] fixed spellings --- src/libs/ReportUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 8a8ca066e3928..9674ff9b29032 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -12112,7 +12112,7 @@ function isChatUsedForOnboarding( /** * Whether onboarding tasks should be posted in the #admins room instead of Concierge. * Only the "Manage my team's expenses" (MANAGE_TEAM) intent uses the #admins room with a guide; - * Track and budget expenses (TRACK_WORKSPACE) uses Concierge chat. Guides are assigned to signups + * Track and budget expenses (TRACK_WORKSPACE) uses Concierge chat. Guides are assigned to users who sign up * with emails that do not contain a '+' and who select MANAGE_TEAM. */ function isPostingTasksInAdminsRoom(engagementChoice?: OnboardingPurpose): boolean { From 5c7eaa54d8ca01f2127c0481b94285ebfe67619c Mon Sep 17 00:00:00 2001 From: Faizan Shoukat Abbasi Date: Wed, 18 Feb 2026 18:59:53 +0500 Subject: [PATCH 3/3] Fixed prettier issues --- src/libs/ReportUtils.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 9674ff9b29032..fed8104d1d9f0 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -12117,11 +12117,7 @@ function isChatUsedForOnboarding( */ function isPostingTasksInAdminsRoom(engagementChoice?: OnboardingPurpose): boolean { const userHasPhonePrimaryEmail = Str.endsWith(currentUserEmail ?? '', CONST.SMS.DOMAIN); - return ( - engagementChoice !== undefined && - engagementChoice === CONST.ONBOARDING_CHOICES.MANAGE_TEAM && - (!currentUserEmail?.includes('+') || userHasPhonePrimaryEmail) - ); + return engagementChoice !== undefined && engagementChoice === CONST.ONBOARDING_CHOICES.MANAGE_TEAM && (!currentUserEmail?.includes('+') || userHasPhonePrimaryEmail); } /**