Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 3, 2026

The spinner implementation was already using Bubbles but only supported the Dot style and lacked accessibility controls. This changes the spinner to use MiniDot style and adds ACCESSIBLE environment variable support.

Changes

Spinner Style:

  • Changed from Dot style to MiniDot style (⣾ ⣽ ⣻ ⢿ ⡿ ⣟ ⣯ ⣷)
  • NewSpinner() creates MiniDot spinners - backward compatible API

Accessibility:

  • Spinner disabled when ACCESSIBLE environment variable is set
  • Combined with existing TTY detection for complete accessibility support

Testing:

  • Accessibility mode test
  • Concurrent access and multiple start/stop cycle tests
  • All tests passing

Documentation:

  • Package-level docs with usage examples
  • MiniDot spinner documentation in console README
  • Accessibility and TTY detection behavior

Usage

// Creates MiniDot spinner (backward compatible API)
spinner := console.NewSpinner("Loading...")
spinner.Start()
// operation
spinner.Stop()
# Accessibility mode
ACCESSIBLE=1 gh aw compile workflow.md  # Spinners disabled

Files Modified

  • pkg/console/spinner.go - Simplified implementation with MiniDot and ACCESSIBLE support
  • pkg/console/spinner_test.go - Test coverage for core functionality
  • pkg/console/README.md - Spinner documentation with MiniDot style
Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Migrate spinner to Bubbles spinner models</issue_title>
<issue_description>## Objective

Replace the current spinner implementation in pkg/console/spinner.go with github.com/charmbracelet/bubbles/spinner for smoother animations and more spinner style options.

Context

The Terminal Stylist analysis (#8747) identified that while our current spinner works, Bubbles provides more sophisticated animations (dots, line, miniDots, etc.) that enhance user experience during long-running operations.

Approach

  1. Import github.com/charmbracelet/bubbles/spinner in pkg/console/spinner.go
  2. Create a Bubble Tea model that wraps the Bubbles spinner
  3. Maintain the existing Spinner API for backward compatibility
  4. Add support for multiple spinner styles (dots, line, miniDots, etc.)
  5. Ensure TTY detection works properly (no animations in non-TTY environments)
  6. Preserve accessibility support (ACCESSIBLE, NO_COLOR environment variables)

Files to Modify

  • Update: pkg/console/spinner.go - Replace spinner implementation
  • Update: pkg/console/spinner_test.go - Update tests for new implementation
  • Update: go.mod - Add Bubbles dependency if not already present

Acceptance Criteria

  • Spinner uses Bubbles spinner models internally
  • Existing Spinner API continues to work (backward compatible)
  • Multiple spinner styles are available (dots, line, miniDots)
  • Spinner animations are smoother than before
  • TTY detection prevents animations in pipes/redirects
  • Accessibility mode disables animations (ACCESSIBLE env var)
  • Tests cover TTY and non-TTY environments
  • No breaking changes to existing spinner usage

Example Usage

// After implementation
s := console.NewSpinner("Loading...")
s.Start()
// Long-running operation
s.Stop()

Related to #8748

AI generated by Plan Command for discussion #8747

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 3, 2026 19:06
- Add SpinnerStyle enum with 9 different spinner styles (Dot, Line, MiniDot, Points, Globe, Moon, Jump, Pulse, Ellipsis)
- Add NewSpinnerWithStyle() function to create spinners with custom styles
- Add ACCESSIBLE environment variable support to disable animations
- Add comprehensive tests for all spinner styles and accessibility mode
- Add package documentation explaining usage and accessibility
- Maintain backward compatibility with existing NewSpinner() API

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
- Document all 9 available spinner styles with examples
- Explain accessibility support with ACCESSIBLE env var
- Show usage examples for default and custom styles
- Document TTY detection behavior
- Add visual examples of each spinner style

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate spinner implementation to Bubbles spinner models Add multiple spinner styles and ACCESSIBLE environment variable support Jan 3, 2026
Copilot AI requested a review from mnkiefer January 3, 2026 19:13

- `SpinnerDot` (default) - Braille dots: ⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏
- `SpinnerLine` - Simple line: | / - \
- `SpinnerMiniDot` - Minimal dots: ⣾ ⣽ ⣻ ⢿ ⡿ ⣟ ⣯ ⣷
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Only support spinnerminidot

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified to only support MiniDot spinner style in commit 5a3f93f. Removed all other spinner styles (Dot, Line, Points, Globe, Moon, Jump, Pulse, Ellipsis) and the NewSpinnerWithStyle() function. The NewSpinner() function now creates MiniDot spinners by default.

- Remove SpinnerStyle enum and all style variants (Dot, Line, Points, Globe, Moon, Jump, Pulse, Ellipsis)
- Keep only MiniDot spinner style
- Remove NewSpinnerWithStyle function
- Update NewSpinner to use MiniDot by default
- Simplify tests to remove style-specific tests
- Update documentation to reflect single MiniDot style
- Maintain ACCESSIBLE environment variable support

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Add multiple spinner styles and ACCESSIBLE environment variable support Use MiniDot spinner style with ACCESSIBLE environment variable support Jan 3, 2026
Copilot AI requested a review from pelikhan January 3, 2026 19:34
@pelikhan
Copy link
Contributor

pelikhan commented Jan 3, 2026

@copilot Lint

Copy link
Contributor Author

Copilot AI commented Jan 3, 2026

@copilot Lint

Linting complete - all checks pass:

  • make lint: ✓ 0 issues
  • make golint: ✓ 0 issues
  • make fmt-check: ✓ All files properly formatted

No code changes needed.

Copilot AI requested a review from pelikhan January 3, 2026 19:43
@pelikhan pelikhan marked this pull request as ready for review January 3, 2026 19:45
@pelikhan pelikhan merged commit 84c3c89 into main Jan 3, 2026
4 of 5 checks passed
@pelikhan pelikhan deleted the copilot/migrate-spinner-to-bubbles branch January 3, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan] Migrate spinner to Bubbles spinner models

3 participants