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
MultiStepProgress component in pkg/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
AI generated by Plan Command for #14013
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
MultiStepProgresscomponent inpkg/console/progress.goImplementation Details
Files to Modify
pkg/console/progress.go- Add MultiStepProgress componentpkg/cli/compile.go- Use multi-step progress for compilationpkg/cli/deploy.go- Use multi-step progress for deploymentpkg/workflow/compiler.go- Integrate progress tracking hookspkg/console/progress_test.go- Add comprehensive testsExample Usage
Acceptance Criteria
Related to Terminal Stylist Analysis: Console Output Patterns in gh-aw #14013