Skip to content

chore: add task for wizard UI → config-first TUI refactor#28

Merged
TimBeyer merged 13 commits intomainfrom
claude/wizard-ui-provisioning-QKYJ5
Mar 17, 2026
Merged

chore: add task for wizard UI → config-first TUI refactor#28
TimBeyer merged 13 commits intomainfrom
claude/wizard-ui-provisioning-QKYJ5

Conversation

@TimBeyer
Copy link
Owner

claude and others added 13 commits March 17, 2026 06:58
Replace the 9-step interactive wizard with a two-pane config-building TUI
that produces an InstanceConfig and delegates to the existing headless
provisioning pipeline. This unifies the interactive and headless create
paths into a single execution flow.

New TUI features:
- Two-pane layout: form on left, contextual help sidebar on right
- Collapsible sections for all InstanceConfig fields (Provider, Services,
  Network, Agent Identity, Telegram)
- Inline Zod validation per field and section
- Review screen with validation summary before creating
- Full schema coverage (provider, bootstrap, telegram — previously
  headless-only)

Architecture changes:
- Extract runHeadlessFromConfig() from headless.ts with HeadlessCallbacks
  for structured progress events (onStage, onStep, onLine, onError)
- New Ink ProvisionMonitor component wraps headless pipeline with real-time
  progress tree, spinners, and log tail
- App.tsx simplified to 4 phases: prereqs → config → provision → done
- create.ts reduced from 270 lines to 60 — all post-wizard logic removed

Deleted 9 old wizard steps (configure, credentials, create-vm,
provision-status, credential-setup, onboard, finish, welcome, host-setup)
replaced by 2 new steps (prereq-check, config-builder) and 4 new
components (provision-monitor, completion-screen, config-review, sidebar).

https://claude.ai/code/session_01KVYE98eDHVsV1pZ5Vn33xy
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add useTerminalSize hook; set root Box height={rows} so every phase
  fills the terminal. Each component gets flexGrow={1}, pinned help
  text, and overflow="hidden" where needed.
- ProvisionMonitor: stages and steps side-by-side, dynamic maxLines
  for log viewer, logs shown by default.
- New ProvisionApp component and runCreateFromConfig for config-driven
  TUI mode (--config without --plain shows full progress UI).
- --plain flag preserves the old streaming log output for CI.
- Update bash/zsh completions with --plain, update docs and README.
- Fix pre-existing type errors: state.test.ts noop migration return
  type, claw-binary.ts Bun file import.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove unused `focused` destructure in ConfigReview, remove unused
VerboseContext import in ProvisionMonitor, apply Prettier formatting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move column headers ("Stages" / "Steps") outside the fixed-height
  container so they stay pinned when steps scroll.
- Add overflow="hidden" to the stages column so long detail text
  (e.g. "VM provisioned", "Token validated") doesn't wrap and break
  the two-column layout.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Gives room for stage labels with detail text (e.g. "Setting up
1Password Token validated (account)") without truncating.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace fixed width={44} with flexShrink={0} so the stages column
sizes to its content. Steps column takes remaining space via
flexGrow={1}. Headers are inside each column with overflow="hidden"
only on the steps content area.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use flexGrow={1} flexBasis={0} on both columns so they split equally
from the start. Prevents layout jumps when stage details appear or
steps accumulate. Steps column always renders (empty until first step).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The headless pipeline's subprocesses keep the event loop alive after
Ink exits. Add explicit process.exit(0) after registering the instance
and printing the summary.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Both the TUI completion screen and the post-alt-screen summary now
template the instance name into shell, status, oc dashboard, and
oc onboard commands so they work regardless of context.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The -i flag must come before the subcommand:
  clawctl oc -i sam dashboard (not oc dashboard -i sam)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The dashboard URL is already printed above. oc tui opens an interactive
chat with the agent, which is more useful right after setup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@TimBeyer TimBeyer merged commit 158c518 into main Mar 17, 2026
4 checks passed
@TimBeyer TimBeyer deleted the claude/wizard-ui-provisioning-QKYJ5 branch March 17, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants