Skip install apps onboarding step for invitees (#23214)

Users joining an existing workspace via an invitation link were shown
the install apps onboarding step after skipping the email-connect step,
even though the backend never assigns them that step (and apps they
selected were silently not installed).

The frontend optimistic transition unconditionally mapped SYNC_EMAIL to
APPS_INSTALLATION. It now checks workspaceMembersCount === 1, like the
existing PROFILE_CREATION to INVITE_TEAM transition, so invitees go
straight to profile creation.

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/23214?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
This commit is contained in:
Raphaël Bosi
2026-07-23 18:39:19 +02:00
committed by GitHub
parent 5160415f40
commit 5c7915ba56
2 changed files with 17 additions and 1 deletions
@@ -133,6 +133,19 @@ describe('useSetNextOnboardingStatus', () => {
expect(shouldOpenAiChatAfterOnboarding).toBe(false);
});
it('should create profile after syncing emails when more than 1 workspaceMember exist', () => {
const {
nextOnboardingStatus,
isWelcomeAnimationVisible,
shouldOpenAiChatAfterOnboarding,
} = renderHooks(OnboardingStatus.SYNC_EMAIL, {
withOneWorkspaceMember: false,
});
expect(nextOnboardingStatus).toEqual(OnboardingStatus.PROFILE_CREATION);
expect(isWelcomeAnimationVisible).toBe(false);
expect(shouldOpenAiChatAfterOnboarding).toBe(false);
});
it('should create profile after installing apps', () => {
const {
nextOnboardingStatus,
@@ -41,7 +41,10 @@ const getNextOnboardingStatus = ({
}
if (currentUser?.onboardingStatus === OnboardingStatus.SYNC_EMAIL) {
return OnboardingStatus.APPS_INSTALLATION;
if (currentWorkspace?.workspaceMembersCount === 1) {
return OnboardingStatus.APPS_INSTALLATION;
}
return OnboardingStatus.PROFILE_CREATION;
}
if (currentUser?.onboardingStatus === OnboardingStatus.APPS_INSTALLATION) {