-
Notifications
You must be signed in to change notification settings - Fork 266
Closed as not planned
Closed as not planned
Copy link
Labels
automationcli-improvementcode-qualitycookieIssue Monster Loves Cookies!Issue Monster Loves Cookies!task-mininguser-experience
Description
Description
Apply console.FormatErrorMessage() formatting to the top 5 CLI files with the highest unformatted error counts. These 5 files contain 388 unformatted errors representing 25% of all unformatted errors in the codebase. Currently only 4.4% (69/1,581) of error output sites use proper console formatting.
Suggested Changes
Replace raw error outputs with console-formatted errors in:
pkg/cli/add_interactive.go- 107 unformatted errors (interactive wizard - critical UX)pkg/cli/init.go- 100 unformatted errors (first-time setup - critical onboarding)pkg/cli/add_command.go- 72 unformatted errors (workflow creation - common operation)pkg/cli/audit_report_render.go- 61 unformatted errors (audit reports - troubleshooting)pkg/cli/trial_command.go- 48 unformatted errors (workflow testing - developer workflow)
Pattern to apply:
// ❌ BEFORE - Raw error output
if err != nil {
fmt.Fprintln(os.Stderr, err)
return err
}
// ✅ AFTER - Console formatted error
if err != nil {
fmt.Fprintln(os.Stderr, console.FormatErrorMessage(err.Error()))
return err
}Files Affected
pkg/cli/add_interactive.gopkg/cli/init.gopkg/cli/add_command.gopkg/cli/audit_report_render.gopkg/cli/trial_command.go
Success Criteria
- All 388 errors updated to use
console.FormatErrorMessage() - No stdout error outputs remain (all errors go to stderr)
- Import
\"github.com/github/gh-aw/pkg/console\"added where needed - Manual testing confirms formatting appears correctly:
./gh-aw init /nonexistent/path./gh-aw add /invalid/workflow.md./gh-aw trial nonexistent-workflow./gh-aw audit 99999999
- All tests pass:
make agent-finish
Source
Extracted from Error Experience Engineering discussion #12265
Priority
High - Maximum user-facing impact, improves error visibility and readability
AI generated by Discussion Task Miner - Code Quality Improvement Agent
- expires on Feb 6, 2026, 1:27 AM UTC
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
automationcli-improvementcode-qualitycookieIssue Monster Loves Cookies!Issue Monster Loves Cookies!task-mininguser-experience