-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
Objective
Implement a new spinner using the idiomatic Bubble Tea pattern identified in the research phase.
Context
Based on the design document from the research task, implement a new spinner that follows Bubble Tea best practices while maintaining existing functionality.
Approach
- Create new implementation in
pkg/console/spinner_v2.go(keep old for now) - Use recommended Bubble Tea pattern (e.g.,
tea.WithoutRenderer()or direct component) - Maintain existing API:
Start(),Stop(),SetMessage() - Preserve TTY detection and accessibility support
- Eliminate manual goroutine management and mutexes
Files to Modify
- Create:
pkg/console/spinner_v2.go(new implementation) - Reference:
pkg/console/spinner.go(for API compatibility)
Implementation Checklist
- Implement
SpinnerV2struct with same public API - Use Bubble Tea program or direct component (no custom goroutines)
- TTY detection works (disable in pipes/CI)
- Accessibility support (ACCESSIBLE env var)
- MiniDot animation style maintained
- Clean start/stop semantics
- No mutex required
Acceptance Criteria
- New implementation compiles without errors
- API is compatible with existing
SpinnerWrapper - TTY and accessibility checks work
- Code is ~30% smaller than current implementation
- No manual goroutine or mutex management
Related to [plan] Refactor spinner to use idiomatic Bubble Tea pattern #9189
AI generated by Plan Command for discussion #9188
Copilot