refactor: move the Setup Wizard into @rocket.chat/ui-setup-wizard
Merged
TA
5d ago+333+333+012345678901234567890123456789-21-21-01234567890123456789
Proposed changes (including videos or screenshots)
Moves the Setup Wizard UI out of @rocket.chat/ui-client and the Meteor app into a new private workspace, @rocket.chat/ui-setup-wizard. Behavior doesn't change.
Each commit can be reviewed on its own:
- Add the
@rocket.chat/ui-setup-wizardworkspace. It's empty and set up likeui-media(tsc build, Jest, Storybook, oxlint). - Move the Setup Wizard view.
ui-client/src/views/setupWizardmoves into the package withgit mv, so history is kept. The only things it still takes from ui-client come through ui-client's public exports:ModalRegion,useInvalidateLicense,clientCallbacksandlinks.ui-clientno longer depends on@rocket.chat/onboarding-ui,@rocket.chat/toolsor@rocket.chat/layout. - Ship the
setup-wizardroute type with the package. The type now lives in a regular.tsmodule, so it ends up indist. That removes the duplicate declaration inapps/meteor/client/startup/routes.tsx. - Lazy-load the route from the package entry.
SetupWizardRouteis exported aslazy(() => import('./SetupWizardRoute')), the way ui-client exported it before. Importing the package doesn't pull the wizard or@rocket.chat/onboarding-uiinto the main bundle. - Move
useRedirectToSetupWizardinto the package. It now sits next touseRouteLock, so the rules for who enters and who leaves the wizard are in one place. - Add Storybook stories for each wizard step. They cover admin info, organization info (including an already-registered workspace), server registration with and without internet, offline registration, and awaiting confirmation. The stories render
SetupWizardPageagainst a mocked wizard context and use the real English translations.
No changeset, since the change isn't user-visible.
Issue(s)
Steps to test or reproduce
- Start a fresh workspace (
Show_Setup_Wizard=pending). You should be sent to/setup-wizard, and every step should behave as before. - On a workspace that has completed setup, opening
/setup-wizardshould redirect you to/home. yarn workspace @rocket.chat/ui-setup-wizard storybookshows a story for each step.
Further comments
What I verified: build, typecheck, lint and unit tests pass for ui-client and ui-setup-wizard, and apps/meteor typechecks. A static Storybook build renders every story without console errors. I haven't run the wizard in the app itself.
š¤ Generated with Claude Code
Summary by CodeRabbit
- Updates
- The setup wizard remains available at its existing route, and its setup flow is unchanged.
- Administrators can continue through administrator details, organization details, server registration, offline registration, and cloud confirmation.
- Existing workspaces that are already registered continue to skip cloud registration.
- No changes to the setup experience are noted.