-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
Description
Objective
Integrate huh/spinner to show progress feedback during workflow compilation in the interactive builder.
Context
After users complete the interactive form, the workflow compilation happens silently. This can be confusing, especially if compilation takes time. The huh library provides a built-in spinner component perfect for this use case.
Approach
Use huh/spinner to show compilation progress:
import "github.com/charmbracelet/huh/spinner"
func (b *InteractiveWorkflowBuilder) compileWorkflow(verbose bool) error {
var compileErr error
err := spinner.New().
Title("Compiling your workflow...").
Action(func() {
config := CompileConfig{
WorkflowFiles: []string{b.workflowPath},
Verbose: verbose,
}
_, compileErr = CompileWorkflows(config)
}).
Run()
if err != nil {
return err
}
return compileErr
}Consider adding:
- Success message after compilation completes
- Error handling with clear messages
- Optional accessible mode support
Files to Modify
- Update:
pkg/cli/interactive.go- Add spinner to compilation step - Update:
go.mod- Ensurehuh/spinneris imported (likely already available)
Acceptance Criteria
- Spinner displays during workflow compilation
- Clear "Compiling your workflow..." message shown
- Spinner stops when compilation completes
- Success message shown after successful compilation
- Errors are displayed clearly if compilation fails
- Works in both accessible and standard modes
Related to [plan] Enhance interactive workflow builder with huh v0.7.0+ features #7216
AI generated by Plan Command for discussion #7214