Skip to content

feat: add interactive wizards for sr create and sr add-update#23

Merged
thibaultleouay merged 1 commit intomainfrom
interactive-cli
Mar 30, 2026
Merged

feat: add interactive wizards for sr create and sr add-update#23
thibaultleouay merged 1 commit intomainfrom
interactive-cli

Conversation

@thibaultleouay
Copy link
Copy Markdown
Member

When required flags are missing and stdin is a TTY, launch a step-by-step wizard using charmbracelet/huh instead of erroring out. Flags still work for scripting and CI — non-TTY/--json mode returns a clear missing-flags error.

Wizard features:

  • Status page select with URL display (sr create)
  • Component multi-select from the selected page (sr create)
  • Status report select with unresolved-first filtering (sr add-update)
  • Multi-line message input for create, single-line for add-update
  • Summary note + confirmation before submission
  • Ctrl+C prints "Aborted." and exits 130

Also adds IsStdinTerminal() to internal/cli for proper stdin TTY detection.

When required flags are missing and stdin is a TTY, launch a step-by-step
wizard using charmbracelet/huh instead of erroring out. Flags still work
for scripting and CI — non-TTY/--json mode returns a clear missing-flags
error.

Wizard features:
- Status page select with URL display (sr create)
- Component multi-select from the selected page (sr create)
- Status report select with unresolved-first filtering (sr add-update)
- Multi-line message input for create, single-line for add-update
- Summary note + confirmation before submission
- Ctrl+C prints "Aborted." and exits 130

Also adds IsStdinTerminal() to internal/cli for proper stdin TTY detection.
@thibaultleouay thibaultleouay merged commit 7ceb4ce into main Mar 30, 2026
1 check passed
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.

1 participant