diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index f3000e9c33bc3..61e96e6a8e6ef 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -11724,8 +11724,11 @@ function prepareOnboardingOnyxData({ // 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, betas, betaConfiguration); + // Phase 1 cohort (MANAGE_TEAM + MICRO company size) bypasses the beta gate — the backend + // handles gating via NVP, so all MICRO users get followups without needing the beta flag. + const isPhase1Cohort = companySize === CONST.ONBOARDING_COMPANY_SIZE.MICRO; + // When posting to admins room and the user is in the suggestedFollowups beta (or Phase 1 cohort), we skip tasks in favor of backend-generated followups. + const shouldUseFollowupsInsteadOfTasks = shouldPostTasksInAdminsRoom && (Permissions.isBetaEnabled(CONST.BETAS.SUGGESTED_FOLLOWUPS, betas, betaConfiguration) || isPhase1Cohort); const adminsChatReport = deprecatedAllReports?.[`${ONYXKEYS.COLLECTION.REPORT}${adminsChatReportID}`]; const conciergeChat = getChatByParticipants([CONST.ACCOUNT_ID.CONCIERGE, deprecatedCurrentUserAccountID ?? CONST.DEFAULT_NUMBER_ID], deprecatedAllReports, false) ?? diff --git a/tests/unit/ReportUtilsTest.ts b/tests/unit/ReportUtilsTest.ts index 39dc8a92efcb7..17ee05968e74c 100644 --- a/tests/unit/ReportUtilsTest.ts +++ b/tests/unit/ReportUtilsTest.ts @@ -782,9 +782,10 @@ describe('ReportUtils', () => { }, adminsChatReportID, selectedInterestedFeatures: ['areCompanyCardsEnabled'], - companySize: CONST.ONBOARDING_COMPANY_SIZE.MICRO, + companySize: CONST.ONBOARDING_COMPANY_SIZE.SMALL, }); - // Without the beta, tasks SHOULD be generated (old behavior) + // Without the beta, tasks SHOULD be generated (old behavior) — uses SMALL (not MICRO) + // because MICRO + MANAGE_TEAM users bypass the beta gate and get followups directly expect(result?.guidedSetupData).toHaveLength(3); const taskReportIDs = result?.guidedSetupData.reduce((acc, item) => {