[HOLD] Bypass suggestedFollowups beta for MANAGE_TEAM + MICRO cohort#87282
[HOLD] Bypass suggestedFollowups beta for MANAGE_TEAM + MICRO cohort#87282marcochavezf wants to merge 3 commits intomainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The test for "without suggestedFollowups beta" was using MICRO company size, but our change makes MICRO + MANAGE_TEAM users bypass the beta gate. Changed to SMALL so the test still validates the beta gate for non-cohort users. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@ahmedGaber93 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a982fbeae
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // 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); |
There was a problem hiding this comment.
Keep task generation for MICRO in CreateWorkspace flow
This new || isPhase1Cohort branch makes prepareOnboardingOnyxData() skip tasks for all MANAGE_TEAM + MICRO users, but the createWorkspace path still only forwards guidedSetupData (see src/libs/actions/Policy/Policy.ts around buildPolicyData) and has no way to send bespokeWelcomeMessage / optimisticConciergeReportActionID (not present in CreateWorkspaceParams). In flows that rely on createWorkspace to apply onboarding (without a subsequent completeOnboarding call), this change turns the previous task payload into an empty guidedSetupData, so the server can create neither tasks nor followups and onboarding messages are not persisted correctly.
Useful? React with 👍 / 👎.
On hold for https://github.com/Expensify/Web-Expensify/pull/51917/
Explanation of Change
Phase 1 of the suggested followups rollout targets the MANAGE_TEAM + MICRO company size cohort (1-10 employees). The backend bypass is already in place (Web-Expensify #51917), but the frontend also gates on the
suggestedFollowupsbeta before generating thebespokeWelcomeMessageparameter.This PR adds a cohort check alongside the existing beta check: if
shouldPostTasksInAdminsRoomis true (which already implies MANAGE_TEAM) and the company size is MICRO, the beta gate is bypassed. The beta still works for non-cohort users.Deploy coordination: This PR activates the Phase 1 beta bypass on the frontend. The backend bypass is in Web-Expensify #51917. Feature activates when both PRs are deployed. Safe to merge independently — the backend bypass is a no-op without the frontend sending
bespokeWelcomeMessage.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/621379
Tests
Offline tests
N/A — onboarding data is generated optimistically on the client side and queued for server sync. Offline behavior is unchanged by this PR.
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A — logic-only change, no UI modifications
Android: mWeb Chrome
N/A — logic-only change, no UI modifications
iOS: Native
N/A — logic-only change, no UI modifications
iOS: mWeb Safari
N/A — logic-only change, no UI modifications
MacOS: Chrome / Safari
Bespoke welcome message with follow-ups (manage my team's expenses + 1-10 company size)
Onboarding task (other variants)