feat: wizard Ctrl+C exit with confirmation#39
Merged
Conversation
Upgrade to verdagostack v1.3.0 which introduces the composite wizard model — a single Bubble Tea program runs for the entire wizard lifetime instead of creating separate programs per prompt. This enables proper Ctrl+C handling via key bindings intercepted at the composite level. Changes: - Upgrade verdagostack dependency from v1.2.0 to v1.3.0 - Enable WithExitConfirmation() on vm create, template create, and auth login wizards (Ctrl+C shows "Exit wizard?" confirm prompt) - Update wizard tests to use WithTestResults() instead of the old tui/testing.Prompter (composite model uses result channels) - Extract buildInstanceTypeChoices() to reduce cyclomatic complexity - Add kindCPU constant, use billingTypeSpot constant consistently - Add clear error message when no instance types are available Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
What changed
go.mod: verdagostack v1.2.0 → v1.3.0cmd/vm/create.go,cmd/vm/wizard.go,cmd/auth/login.go: addwizard.WithExitConfirmation()cmd/vm/wizard.go: usekindCPU/billingTypeSpotconstants, add no-availability errorcmd/vm/wizard_cache.go: extractbuildInstanceTypeChoices()(lint fix)cmd/auth/wizard_test.go,cmd/vm/wizard_test.go: usewizard.WithTestResults()for composite modelTest plan
verda vm create— Ctrl+C on any step shows "Exit wizard?" confirmverda vm create— Esc goes back one stepverda vm create— Confirm Y exits, N stays on current stepverda template create— same Ctrl+C behaviorverda auth login— same Ctrl+C behaviorverda settings theme— Ctrl+C exits silently (no confirmation)make pre-commitpasses🤖 Generated with Claude Code