#7762: feat: add 'go back' navigation to onboarding wizard
stale
Cluster:
Wizard Enhancements and Config Fixes
This PR implements a robust 'go back' feature for the onboarding process.
### Key Improvements:
- **State-Machine Navigation**: Refactored the linear onboarding flow into a step-based loop, allowing for seamless backward and forward movement.
- **User Guidance**: Added a 'Go Back' option to selection menus and a ':back' command for text inputs, making it easy for users to correct mistakes (e.g., if they accidentally skip the API key step).
- **Robustness**: The implementation ensures that state is correctly managed when moving between steps, preventing configuration corruption.
This addresses the user feedback regarding the lack of navigation options during the installation/onboarding process.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a “go back” capability to the onboarding wizard by introducing a `WIZARD_BACK` sentinel, plumbs `allowBack` through prompt parameter types, and updates the clack prompter to expose “Go Back” in selects and a `:back` escape hatch in text inputs. The onboarding flow itself was refactored into a step-based loop/state-machine to support backwards navigation across early steps.
Main concerns are around type-safety and completeness of the navigation behavior: `WizardProgress.stop` was narrowed to require a message (likely breaking existing callers), the new flow relies on several `any`/`as any` casts that can mask real bugs around handling `WIZARD_BACK`, and back navigation is only supported through some steps (later steps always advance).
<h3>Confidence Score: 2/5</h3>
- This PR is not safe to merge as-is due to a likely breaking type change and several type-safety regressions around the new back-navigation sentinel.
- The onboarding refactor is substantial, and `WizardProgress.stop` was narrowed to require a message, which is likely to break existing call sites. Additionally, several `any`/`as any` casts reduce confidence that all `WIZARD_BACK` paths are handled correctly, and back navigation is inconsistent across steps.
- src/wizard/prompts.ts (progress type change), src/wizard/onboarding.ts (state machine + any casts), src/wizard/clack-prompter.ts (typed back option injection)
<!-- greptile_other_comments_section -->
**Context used:**
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
<!-- /greptile_comment -->
Most Similar PRs
#5880: fix(wizard): resume interrupted installation from last completed step
by gavinbmoore · 2026-02-01
77.0%
#6624: Web Configure Wizard: channels + skills + agent runtime + diff + do...
by Oruga420 · 2026-02-01
69.4%
#16741: feat(wizard): add searchable select for model picker
by zzztimbo · 2026-02-15
68.2%
#6060: feat(onboarding): add Memory Optimization step to onboarding wizard
by GodsBoy · 2026-02-01
68.1%
#20504: fix: ESC returns to previous menu in configure wizard
by MisterGuy420 · 2026-02-19
67.2%
#15306: fix: explicit exit after onboarding command completes
by jeroenbaas · 2026-02-13
66.9%
#23117: wizard: add manual endpoint type selection when custom provider det...
by wjonaskr · 2026-02-22
66.8%
#23400: Onboarding: set sandbox defaults when Docker is available
by bmendonca3 · 2026-02-22
66.1%
#13849: fix(configure): preserve custom config keys across wizard sections
by mcaxtr · 2026-02-11
66.0%
#12168: feat: integrate Mission Control dashboard into Control UI
by riftagent-git · 2026-02-08
65.9%