chore: add task for wizard UI → config-first TUI refactor#28
Merged
Conversation
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>
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.
https://claude.ai/code/session_01KVYE98eDHVsV1pZ5Vn33xy