feat(domain): Interactivity Wizard for domain commands - #235
feat(domain): Interactivity Wizard for domain commands#235rts1-godaddy wants to merge 17 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a new gddy domain register interactive wizard to guide users through domain discovery, configuration, contact collection, review/consent, and execution, and integrates wizard entry points from other domain commands.
Changes:
- Added a multi-step, back/forward domain registration wizard (
domain register) plus a new markdown guide. - Added “handoff into registration” prompts from
domain available,domain suggest, anddomain quote. - Introduced a generic async retry helper for transient network errors and added new TUI dependencies (
dialoguer,console,indicatif).
Reviewed changes
Copilot reviewed 18 out of 20 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| rust/src/retry.rs | New async retry helper with exponential backoff and transient-error heuristic. |
| rust/src/main.rs | Wires the new retry module into the binary; leaves auto-interactive disabled (commented). |
| rust/src/domain/suggest.rs | Offers interactive handoff into the registration wizard from suggestions. |
| rust/src/domain/register/wizard.rs | Implements wizard runner/state, step header, and back/continue/cancel flow. |
| rust/src/domain/register/steps/review.rs | Wizard “Review & Confirm” step: quote fetch, agreements display, consent, payment-required handling, cache write. |
| rust/src/domain/register/steps/options.rs | Wizard “Options” step: period/privacy/auto-renew/nameserver prompting. |
| rust/src/domain/register/steps/mod.rs | Declares the wizard step modules. |
| rust/src/domain/register/steps/execute.rs | Wizard “Execute/Register” step: submit registration + poll async operation. |
| rust/src/domain/register/steps/discovery.rs | Wizard “Discovery” step: availability check and suggestions when taken. |
| rust/src/domain/register/steps/contacts.rs | Wizard “Contacts” step: account defaults vs contacts.toml vs manual entry + optional save. |
| rust/src/domain/register/mod.rs | Adds domain register command spec, interactive/non-interactive entrypoints, and result shaping. |
| rust/src/domain/register/bridge.rs | Bridge helpers to launch wizard from other commands when interactive. |
| rust/src/domain/quote.rs | Adds interactive “purchase now?” handoff into the wizard after quoting. |
| rust/src/domain/mod.rs | Registers the new register command and guide; updates domain group description. |
| rust/src/domain/guides/domain-register.md | New user guide for the interactive registration flow and entry points. |
| rust/src/domain/available.rs | Adds interactive “register this domain?” handoff when availability is true. |
| rust/src/config/settings_form.rs | Small match-guard refactor in settings validation. |
| rust/Cargo.toml | Adds new TUI dependencies required by the wizard. |
| rust/Cargo.lock | Locks new transitive dependencies for dialoguer/console/indicatif. |
| .gitignore | Ignores .cursor/ directory. |
Suppressed comments (3)
rust/src/domain/register/bridge.rs:55
unwrap_or(false)ondialoguerinteractions swallows prompt errors/cancellation (Ctrl+C/EOF) and treats them as a declined registration. It would be better to surface a consistent "prompt cancelled" error so the caller can handle interruption explicitly.
let proceed = Confirm::new()
.with_prompt("Would you like to register one of these domains?")
.default(false)
.interact()
.unwrap_or(false);
rust/src/domain/register/bridge.rs:68
unwrap_or(items.len() - 1)swallows prompt errors (including Ctrl+C) and forces the fallback selection. This can lead to surprising behavior where an interrupted prompt is treated as "enter a different domain" rather than a cancellation/error.
let selection = dialoguer::Select::new()
.with_prompt("Select a domain")
.items(&items)
.default(0)
.interact()
.unwrap_or(items.len() - 1);
rust/src/domain/register/bridge.rs:105
unwrap_or(false)on the confirmation prompt swallows errors/cancellation and treats them as a normal “no”. For consistency with the rest of the wizard prompts (and to ensure Ctrl+C is handled cleanly), this should return a "prompt cancelled" error instead of defaulting.
let proceed = Confirm::new()
.with_prompt(format!("Would you like to purchase {domain} now?"))
.default(false)
.interact()
.unwrap_or(false);
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…nteractive mode, using a cached quote, using saturated_sub
|
Collected findings going through the flow:
|
- Number mid-flow steps relative to the entry point (1/4 from suggest, not 2/5) - Pad the order summary with visible width so ANSI styles keep the box aligned - Drop duplicate stderr next-steps; envelope owns a single footer with domain filled - Render register-shaped human output when the wizard returns via suggest/available/quote
* Dynamic list of years based on the quote api. * Doesn't show the pricing table if purchase is cancelled or interrupted
Summary
gddy domain register, an interactive step-by-step wizard that guides users through the entire domain registration flow in a single session: discovery, configuration, contacts, review, and purchase.gddy guide domain-register