-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Closed
Copy link
Labels
Description
Objective
Replace the manual prompt/scanln pattern in remove_command.go with the proper console.ConfirmAction() helper for consistency and better UX.
Context
From discussion #11611: The remove_command.go file uses a bare prompt (fmt.Print + fmt.Scanln) instead of the Huh-based console.ConfirmAction() wrapper.
Current Issue: remove_command.go:118 uses manual prompt handling instead of the standardized console helper.
Approach
-
Locate the prompt code around line 118 in
pkg/cli/remove_command.go -
Replace with
console.ConfirmAction():- Use existing console package function
- Provide clear question text
- Handle error case properly
-
Test the change:
- Verify interactive prompt works
- Test with and without TTY
- Ensure accessibility mode is respected
Files to Modify
- Update:
pkg/cli/remove_command.go(line ~118)
Implementation Example
// Before (remove_command.go:118):
fmt.Print("Are you sure you want to remove the workflow? (yes/no): ")
var response string
fmt.Scanln(&response)
if response != "yes" {
return fmt.Errorf("workflow removal cancelled")
}
// After:
confirmed, err := console.ConfirmAction(
"Remove workflow?",
"Yes, remove",
"No, cancel",
)
if err != nil {
return fmt.Errorf("failed to get confirmation: %w", err)
}
if !confirmed {
return fmt.Errorf("workflow removal cancelled")
}Acceptance Criteria
- Manual prompt replaced with
console.ConfirmAction() - Error handling properly implemented
- Interactive prompt works in terminal
- Accessibility mode is respected
- Code passes
make fmtandmake lint -
make agent-finishcompletes successfully
Priority
Phase 1: Critical Fix (1-2 hours estimated)
AI generated by Plan Command for discussion #11611
Reactions are currently unavailable