Skip to content

web-next: implement guided onboarding UX and define backend onboarding RPC contract#172

Merged
dgarson merged 1 commit intofeat/horizon-ui-completefrom
codex/flesh-out-onboarding-designs-and-specs
Feb 24, 2026
Merged

web-next: implement guided onboarding UX and define backend onboarding RPC contract#172
dgarson merged 1 commit intofeat/horizon-ui-completefrom
codex/flesh-out-onboarding-designs-and-specs

Conversation

@dgarson
Copy link
Copy Markdown
Owner

@dgarson dgarson commented Feb 24, 2026

Motivation

  • Replace a placeholder onboarding surface with a production-ready guided first-run flow aligned to the docs and copy deck so web clients can deliver the same day‑0 experience as the macOS app and CLI wizard.
  • Provide a clear backend contract so the Gateway can be wired to the web flow without ambiguity about required RPCs, events, validation, and telemetry.

Description

  • Implemented a full guided onboarding UI in apps/web-next/src/views/OnboardingFlow.tsx that covers: welcome/resume messaging, gateway mode selection and auth gating, permissions review with grant simulation, optional CLI detection/install state machine, onboarding-chat prompt selection, progress bar, skip/reset behavior, and local persistence via localStorage for resume.
  • Added client-side validation to prevent insecure configurations (for example, blocking remote mode with authMode=none) and basic UX state machines for cliStatus and permission grants.
  • Added apps/web-next/docs/ONBOARDING_BACKEND_SPEC.md, a complete backend API / Gateway RPC specification that defines onboarding.start, onboarding.get, onboarding.step.update, onboarding.permissions.*, onboarding.cli.*, onboarding.chat.handoff, push events, data models (OnboardingSession), validation rules, telemetry/event names, security and retry semantics, and a migration plan.
  • Kept the UI self-contained so apps/web-next can run with a local mock/fallback until the Gateway RPCs are implemented; the spec is the implementation target for the server-side follow-up.

Testing

  • Built the web app after installing deps by running pnpm install and pnpm build from apps/web-next, and the build completed successfully.
  • Launched a dev server (pnpm dev --host 0.0.0.0 --port 4173) and captured a Playwright screenshot of the Onboarding view to verify UI layout and navigation (artifact: browser:/tmp/codex_browser_invocations/713b85a7fc46b607/artifacts/artifacts/onboarding-flow.png).
  • Smoke validations performed: navigation between steps, localStorage resume behavior, gating of remote+no-auth, CLI install flow transitions, and permission toggle/grant interactions all behaved as expected in the running dev build.

Files changed: apps/web-next/src/views/OnboardingFlow.tsx, apps/web-next/docs/ONBOARDING_BACKEND_SPEC.md.

Docs referenced:
https://docs.openclaw.ai/start/onboarding
https://docs.openclaw.ai/start/wizard
https://docs.openclaw.ai/start/onboarding-tour-spec
https://docs.openclaw.ai/start/wizard-cli-reference


Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 47554d028d

ℹ️ 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".

<section className="rounded-2xl border border-zinc-800 bg-zinc-900 p-6 md:p-8">
{state.step === 'welcome' && (
<div className="space-y-4">
{localStorage.getItem(STORAGE_KEY) && <p className="rounded-xl bg-indigo-500/10 p-3 text-sm text-indigo-200">Welcome back — we saved your progress.</p>}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate resume banner on restored session data

The welcome-step banner currently checks localStorage.getItem(STORAGE_KEY) directly, but this key is always written on mount by the persistence effect, so first-time users (and users who just pressed Skip) are incorrectly shown “Welcome back — we saved your progress.” even when no prior session was resumed. This makes resume state unreliable and confuses onboarding state recovery logic.

Useful? React with 👍 / 👎.

Comment on lines +163 to +167
const resetProgress = () => {
const fresh = createInitialState();
fresh.packageManager = detectPackageManager();
localStorage.removeItem(STORAGE_KEY);
setState(fresh);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make "Skip setup" actually skip onboarding

The Skip setup control is wired to resetProgress, which resets the flow back to welcome instead of marking onboarding as skipped or exiting the flow, so users who click Skip are kept inside onboarding and must still proceed through steps. That behavior contradicts the control label and the documented skip semantics, and will block integrations expecting a real skipped state.

Useful? React with 👍 / 👎.

@dgarson dgarson merged commit 9651a47 into feat/horizon-ui-complete Feb 24, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant