hermes-office/tests/unit
robotica4us-collab c2cbdeec44
feat(issue-17): add onboarding wizard for new users (#26)
* feat(issue-17): add onboarding wizard for new users

Adds a step-based onboarding wizard that guides new users through their
first Claw3D setup: welcome, prerequisites, gateway connection, agent
discovery, and a completion screen.

Architecture:

src/features/onboarding/ (new feature module):
  - types.ts: Step definitions, navigation helpers (getNextStep/getPrevStep)
  - useOnboardingState.ts: localStorage-backed persistence hook
  - index.ts: Barrel exports for clean imports
  - components/OnboardingWizard.tsx: Main wizard container with step
    navigation, progress bar, and modal overlay
  - components/WelcomeStep.tsx: Feature highlights grid
  - components/PrerequisitesStep.tsx: Checklist with links/commands
  - components/ConnectStep.tsx: Compact gateway connection form
  - components/AgentsStep.tsx: Agent discovery feedback
  - components/CompleteStep.tsx: Final screen with CTA

Design decisions:
  - Modular step system: new steps can be added by extending
    OnboardingStepId and registering a component in the switch
  - localStorage persistence: wizard shows once per browser, resettable
    from settings (future: wire into Studio settings API)
  - Connect step gates forward navigation: users cannot skip connection
  - Follows Claw3D conventions: feature-first module, no shared state
    pollution, Tailwind utility classes, lucide-react icons
  - Does NOT modify existing routes or components — zero-risk integration
    (parent wiring left to maintainer preference)

Integration guide (for maintainer):
  1. Import { OnboardingWizard, useOnboardingState } from the module
  2. Add useOnboardingState() to the root layout or agents page
  3. Render <OnboardingWizard /> when showOnboarding is true
  4. Pass gateway connection props from existing store

tests/unit/onboardingTypes.test.ts (13 tests):
  - Step structure validation, navigation helpers, ordering

tests/unit/onboardingState.test.ts (5 tests):
  - localStorage persistence, show/hide/reset lifecycle

Addresses #17

* fix(onboarding): wire wizard launch into office UI

Mount the onboarding wizard in OfficeScreen and add a settings action that can re-open it so the new-user flow is reachable and testable.

Made-with: Cursor

---------

Co-authored-by: Neo <neo@openclaw.ai>
Co-authored-by: iamlukethedev <lucas.guilherme@smartwayslfl.com>
2026-03-21 17:37:54 -05:00
..
accessGate.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentAvatarCreatorModal.test.tsx Avatar Customization + Update Agent Brain (#23) 2026-03-20 23:05:14 -05:00
agentBrainPanel.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentChatPanel-approvals.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentChatPanel-composer-autoresize.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentChatPanel-controls.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentChatPanel-markdown-rendering.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentChatPanel-scroll.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentCreateModal.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentEditorModal.test.ts Avatar Customization + Update Agent Brain (#23) 2026-03-20 23:05:14 -05:00
agentFilesBootstrap.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentFleetHydration.test.ts Avatar Customization + Update Agent Brain (#23) 2026-03-20 23:05:14 -05:00
agentFleetHydrationDerivation.test.ts Avatar Customization + Update Agent Brain (#23) 2026-03-20 23:05:14 -05:00
agentPermissionsOperation.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentPermissionsRoleHelpers.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentReconcileOperation.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentSettingsMutationWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentSettingsPanel-header.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentSettingsPanel.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentStateExecutor.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentStateLocal.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentStateRoute.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
agentStore.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
browserPreview.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
chatInteractionWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
chatItems.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
chatSendOperation.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
colorSemantics.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
colorSemanticsGuard.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
configMutationGatePolicy.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
connectionPanel-close.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
createAgentBootstrapOperation.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
createAgentBootstrapWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
cronCreateFlowState.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
cronCreatePayloadBuilder.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
cronGatewayClient.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
cronSelectors.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
deleteAgentOperation.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
deskDirectives.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
deskMonitor.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
execApprovalControlLoopWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
execApprovalEvents.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
execApprovalLifecycleWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
execApprovalPausePolicy.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
execApprovalResolveOperation.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
execApprovalRunControlOperation.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
execApprovalRunControlWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
execApprovalRuntimeCoordinator.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
extractThinking.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
fetchJson.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
fleetLifecycleWorkflow.integration.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
fleetLifecycleWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
fleetSidebar-create.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayAgentFiles.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayAgentOverrides.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayAgentSkillsAllowlist.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayBrowserClient.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayClient.connectErrors.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayClient.gap.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayClient.reconnect-recovery.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayConfigPatch.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayConfigSyncWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayConnectRetryPolicy.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayEventIngressWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayExecApprovals.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayFrames.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayMediaRoute.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayModelsPolicy.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayProxy.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayReloadMode.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayRestartPolicy.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayRuntimeEventHandler.agent.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayRuntimeEventHandler.chat.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayRuntimeEventHandler.policyDelegation.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewayRuntimeEventHandler.summaryRefresh.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
gatewaySshTarget.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
headerBar-brain-toggle.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
heartbeatAgentConfig.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
heartbeatGatewayClient.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
historyLifecycleWorkflow.integration.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
historyLifecycleWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
historySyncOperation.integration.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
historySyncOperation.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
janitorActors.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
janitorReset.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
latestUpdateWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
lifecycleControllerWorkflow.integration.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
livePatchQueue.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
mediaMarkdown.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
messageExtract.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
messageHelpers.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
multiavatar.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
mutationLifecycleWorkflow.create.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
mutationLifecycleWorkflow.integration.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
mutationLifecycleWorkflow.lifecycle.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
mutationLifecycleWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
navigation.diagonalCorner.test.ts fix(issue-6): prevent A* diagonal corner-cutting through blocked cells (#19) 2026-03-21 16:04:15 -05:00
navigation.navBlockers.test.ts fix(issue-4): replace hardcoded BLOCKING_TYPES with metadata-driven ITEM_METADATA (#20) 2026-03-21 16:06:51 -05:00
officeEventTriggers.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
officePathfinding.test.ts fix(issue-5): add collision-aware pathfinding to Phaser office viewer (#24) 2026-03-21 17:23:11 -05:00
onboardingState.test.ts feat(issue-17): add onboarding wizard for new users (#26) 2026-03-21 17:37:54 -05:00
onboardingTypes.test.ts feat(issue-17): add onboarding wizard for new users (#26) 2026-03-21 17:37:54 -05:00
packageManifest.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
pathSuggestionsRoute.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
pendingExecApprovalsStore.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
personalityBuilder.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
rafBatcher.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
runSshJson.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
runtimeAgentEventWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
runtimeChatEventWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
runtimeEventBridge.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
runtimeEventCoordinatorWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
runtimeEventPolicy.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
runtimeSyncControlWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
runtimeTerminalWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
scrollNearBottom.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
serverNetworkPolicy.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
sessionKey.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
sessionSettings.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
sessionSettingsMutations.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
settingsRouteWorkflow.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
skillsGatewayClient.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
skillsPresentation.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
skillsRemoveClient.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
skillsRemoveExecutor.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
skillsRemoveLocal.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
skillsRemoveRoute.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
specialLatestUpdateOperation.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
store.transcript-upsert.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
studioBootstrapOperation.test.ts Avatar Customization + Update Agent Brain (#23) 2026-03-20 23:05:14 -05:00
studioBootstrapWorkflow.test.ts Avatar Customization + Update Agent Brain (#23) 2026-03-20 23:05:14 -05:00
studioDeskAssignments.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
studioSettings.test.ts Avatar Customization + Update Agent Brain (#23) 2026-03-20 23:05:14 -05:00
studioSettingsCoordinator.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
studioSettingsRoute.test.ts Avatar Customization + Update Agent Brain (#23) 2026-03-20 23:05:14 -05:00
studioSetupPaths.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
studioUpstreamGatewaySettings.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
themeToggle.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
transcript.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
useAgentSettingsMutationController.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
useChatInteractionController.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
useGatewayConfigSyncController.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
useGatewayConnection.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
useRuntimeSyncController.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
useSettingsRouteController.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
uuid.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
voiceTranscription.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00
worktreeHelpers.test.ts First Release of Claw3D (#11) 2026-03-19 23:14:04 -05:00