-
Notifications
You must be signed in to change notification settings - Fork 54
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Objective
Create a multi-step progress tracker component to provide better visual feedback during complex operations like workflow compilation, deployment, and validation.
Context
Issue #14013 identified that while progress bars and spinners work well for single operations, complex multi-step processes could benefit from a dedicated tracker showing overall progress through multiple stages.
Approach
- Create
MultiStepProgresscomponent inpkg/console/progress.go - Use emoji/symbols for step status (✓ complete, ▶ current, ○ pending)
- Apply appropriate colors: success green, progress yellow, pending gray
- Integrate with accessibility mode for plain text output
- Apply to compilation, validation, and deployment workflows
Implementation Details
type MultiStepProgress struct {
steps []string
current int
complete []bool
}
func NewMultiStepProgress(steps []string) *MultiStepProgress {
return &MultiStepProgress{
steps: steps,
current: 0,
complete: make([]bool, len(steps)),
}
}
func (m *MultiStepProgress) Advance() {
if m.current < len(m.steps) {
m.complete[m.current] = true
m.current++
}
}
func (m *MultiStepProgress) Render() string {
var output strings.Builder
for i, step := range m.steps {
if m.complete[i] {
output.WriteString(applyStyle(styles.Success, "✓ "))
} else if i == m.current {
output.WriteString(applyStyle(styles.Progress, "▶ "))
} else {
output.WriteString(applyStyle(styles.Comment, "○ "))
}
output.WriteString(step)
output.WriteString("\n")
}
return output.String()
}Files to Modify
- Update:
pkg/console/progress.go- Add MultiStepProgress component - Update:
pkg/cli/compile.go- Use multi-step progress for compilation - Update:
pkg/cli/deploy.go- Use multi-step progress for deployment - Update:
pkg/workflow/compiler.go- Integrate progress tracking hooks - Create:
pkg/console/progress_test.go- Add comprehensive tests
Example Usage
// In compilation process
progress := console.NewMultiStepProgress([]string{
"Parsing frontmatter",
"Validating schema",
"Compiling workflow",
"Generating YAML",
})
fmt.Fprintln(os.Stderr, progress.Render())
// ... parse frontmatter
progress.Advance()
fmt.Fprintln(os.Stderr, progress.Render())
// ... validate schema
progress.Advance()
fmt.Fprintln(os.Stderr, progress.Render())Acceptance Criteria
- MultiStepProgress component displays current step
- Completed steps show ✓ (or [✓] in accessible mode)
- Current step shows ▶ (or [▶] in accessible mode)
- Pending steps show ○ (or [ ] in accessible mode)
- Colors adapt to light/dark terminal themes
- Accessibility mode uses plain text symbols
- TTY detection prevents output when piped
- Integration with compile, deploy, and validate commands
- Tests cover step advancement and rendering
Related to Terminal Stylist Analysis: Console Output Patterns in gh-aw #14013
AI generated by Plan Command for #14013
- expires on Feb 8, 2026, 1:01 AM UTC
Reactions are currently unavailable