-
Notifications
You must be signed in to change notification settings - Fork 307
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Objective
Add non-empty validation to the workflow intent text field in pkg/cli/interactive.go, consistent with the existing validation on the workflow name field.
Context
From the Terminal Stylist audit (discussion #21455), the huh.NewText() field for workflow intent in interactive.go accepts empty strings without warning, while the workflow name field already has a Validate() call requiring non-empty input.
Current State
// workflow name — has validation ✅
huh.NewInput().
Title("Workflow name").
Value(&builder.WorkflowName).
Validate(func(s string) error {
if s == "" { return errors.New("workflow name cannot be empty") }
return nil
}),
// intent text — missing validation ❌
huh.NewText().
Title("What should this workflow do?").
Value(&builder.Intent),Approach
- Open
pkg/cli/interactive.go(or whichever file contains the intenthuh.NewText()field) - Add a
.Validate()call that rejects empty strings with an actionable error message - Optionally add a minimum length check (e.g., 10 characters) for meaningful intent descriptions
Files to Modify
pkg/cli/interactive.go(or the file containing the intent Huh form field)
Acceptance Criteria
- The intent text field has a
.Validate()that rejects empty strings - The error message is actionable (e.g., "workflow intent cannot be empty")
- Existing tests pass, new test added if a test file exists for this form
-
make fmt && make lint && make test-unitpass
Generated by Plan Command for issue #discussion #21455 · ◷
- expires on Mar 19, 2026, 11:44 PM UTC
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.