refactor(onboarding): collapse wizard to 2 questions + 1 click, add test suite#106
Open
abdout wants to merge 1 commit into
Open
refactor(onboarding): collapse wizard to 2 questions + 1 click, add test suite#106abdout wants to merge 1 commit into
abdout wants to merge 1 commit into
Conversation
…est suite
Cut the install wizard surface and shrink the entry doc to match the new
flow. Total user touches: 15 → 3 (identity card · GitHub Authorize · Hogwarts Y/N).
Wizard surface
- Pre-flight: 11 questions → 2 dialogs. Welcome cut, GitHub/Anthropic
account checks auto-handled by gh status + Claude first-run, repos-dir
defaulted to $HOME, role/name/email merged into one identity card
(autofilled from git config + ~/.claude/mcp.json), Pro/Max & Tailscale &
Gist deferred to the final panel.
- Act 3: 3 round-trip dialogs → 0. Desktop sign-in, computer-use toggle,
WebStorm plugin moved to the post-install "things to do later" list.
- Final panel: single Done/Open-Docs acknowledge dialog with optional
follow-ups listed as commands.
- Wrapper messaging honest about the one unavoidable click ("1 GitHub
Authorize click around minute 2") instead of claiming pure silence.
- Linux uses zenity --forms for a true single-window identity card;
Windows uses WPF with TextBox + ComboBox; macOS chains autofill-aware
prompts.
Doc rewrite (content/docs/onboarding.mdx)
- 566 → 226 lines (-60%).
- New "What happens" table replaces the three-acts narrative.
- Deliverables + Verify + Modify collapsed into one matrix.
- Added "Manual fallback" section: clone kun, run the backend directly
(2-3 commands per OS) — replaces 155 lines of duplicated Path-B blocks
that linked out to claude-code.mdx.
- Dropped Tailscale / Apple Notes Dispatch references — use Anthropic's
native remote (claude.ai/code + mobile apps) and Cowork bridge.
Test suite (tests/onboarding/)
- 143 assertions across 4 suites, full pass in 1s, no extra deps.
- lint: shellcheck + JSON parse + doc structure + dialog-count budgets
- behavior: state file round-trip, git/mcp autofill, BACKEND_ARGS shape
- parity: all 3 installers expose same flags + state keys + final-panel
bullets; cut keys verified absent
- links: every /docs/<x> resolves; anti-regression on self-hosting/dispatch
- run.sh orchestrator + lib.sh assertion library (bash 3.2 compatible)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
content/docs/onboarding.mdx566 → 226 lines (-60%), with a new "Manual fallback" section (2-3 commands per OS) replacing 155 lines of duplicated Path-B blocks.tests/onboarding/, full green in ~1s with no extra deps.Wizard changes
git config --global, role from existing~/.claude/mcp.json(shadcn → engineer, linear → business, figma → content, posthog → ops). When everything autofills, Act 1 is just the Hogwarts Y/N for engineers, or zero dialogs for non-engineers.zenity --formsfor a true single-window identity card; Windows uses WPF (TextBox×2 + ComboBox); macOS chains autofill-aware prompts (1/3, 2/3, 3/3) only for fields not ingit configormcp.json.Doc changes (
content/docs/onboarding.mdx)claude-code.mdx.claude.ai/codefrom mobile/web) and the Cowork ↔ Code bridge instead.Tests (
tests/onboarding/)lintwizard-steps.jsonparses · doc ≤300 lines · Manual fallback present with all 3 OSes · no stale Tailscale / Apple Notes refs · Act 1 ≤ {macOS 5, Linux 3, Win 3} · Act 3 ≤ 1behaviorstate_get/state_setround-trip · git autofill reads sandbox$HOME· mcp.json → role for all 4 roles ·BACKEND_ARGSshapeparitywizard-steps.jsonversion=2links(/docs/<x>)resolves · external GH URLs well-formed · anti-regression on self-hosting/dispatch linksNo npm packages or test framework added. Pure bash + python3 + shellcheck (all already present). Bash 3.2 compatible.
Test plan
bash tests/onboarding/run.shexits 0 with✓ ALL GREEN — 143/143bash tests/onboarding/run.sh lintexits 0 (filter works)curl -fsSL https://kun.databayt.org/install | bashshows ≤4 dialogs (identity 1/3, 2/3, 3/3, hogwarts) on a truly fresh machine; ≤2 on a machine with git config preset; exactly 1 external click (Authorize)--formswindowgit clone … && bash onboarding-mac.sh engineerproduces the same end state as the wizard🤖 Generated with Claude Code