-
Notifications
You must be signed in to change notification settings - Fork 36
Replace existing spinner with simplified state management and 33% code reduction #9264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
- Create spinner_v2.go with 43.7% code reduction (104 vs 185 lines) - Eliminate 'running' state field - use program != nil check - Maintain full API compatibility with SpinnerWrapper - Add comprehensive test suite with 14 tests - All tests pass, code formatted and linted Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement new idiomatic spinner using Bubble Tea
Implement SpinnerV2 with simplified state management and 43% code reduction
Jan 7, 2026
Contributor
|
@copilot replace existing spinner |
- Merge SpinnerV2 improvements into main spinner.go - Remove spinner_v2.go and spinner_v2_test.go files - Maintain SpinnerWrapper type and NewSpinner() function - Eliminate redundant 'running' state field - Reduce code by 32.6% (184 → 124 lines) - All tests pass, 100% API compatible Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Done. Replaced the existing spinner implementation with the simplified version. The improvements are now in |
Copilot
AI
changed the title
Implement SpinnerV2 with simplified state management and 43% code reduction
Replace existing spinner with simplified state management and 33% code reduction
Jan 7, 2026
Contributor
|
@copilot format, lint go |
The file was reintroduced during merge with main but is no longer needed since SpinnerV2 implementation was merged into main spinner. Removing it fixes typecheck errors about missing 'running' field. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaced Existing Spinner with Simplified Implementation
Summary
Merged the SpinnerV2 improvements directly into
spinner.go, replacing the previous implementation while maintaining 100% API compatibility.Changes Made
pkg/console/spinner.gowith simplified implementation (124 lines vs 184)pkg/console/spinner_v2.go(no longer needed)pkg/console/spinner_v2_test.go(no longer needed)SpinnerWrappertype name andNewSpinner()functionKey Improvements
Code Reduction: 32.6%
Simplified State Management
runningboolean fieldprogram != nilcheck insteadCleaner Logic
Compact Syntax
API Compatibility
✅ 100% Compatible - No breaking changes:
NewSpinner(message string) *SpinnerWrapperStart(),Stop(),StopWithMessage(),UpdateMessage(),IsEnabled()All existing code using
NewSpinner()continues to work without modification.Validation
make fmt: PASSmake lint: PASSAddresses feedback: @pelikhan requested to replace the existing spinner implementation and ensure code is formatted and linted.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.