tui: fix animated spinners inside terminal multiplexers#2035
Merged
dgageot merged 1 commit intodocker:mainfrom Mar 10, 2026
Merged
tui: fix animated spinners inside terminal multiplexers#2035dgageot merged 1 commit intodocker:mainfrom
dgageot merged 1 commit intodocker:mainfrom
Conversation
Two changes improve spinner rendering in tmux and screen: 1. Cap the Bubble Tea renderer at 30 FPS when a multiplexer is detected. The default 60 FPS can overwhelm the multiplexer's rendering pipeline, causing dropped frames that make spinners appear static. 2. Fall back to ASCII spinner frames (|, /, -, \\) instead of braille characters, which may not render correctly in every multiplexer configuration. Multiplexer detection checks $TMUX, $STY, and the $TERM prefix (tmux*, screen*) so it still triggers when individual env vars are stripped (containers, sudo, etc.). Assisted-By: docker-agent
There was a problem hiding this comment.
Review Summary
Assessment: 🟢 APPROVE
The implementation correctly detects terminal multiplexers and applies appropriate rendering optimizations:
✅ FPS limiting: Caps Bubble Tea renderer at 30 FPS when multiplexers detected, preventing dropped frames
✅ Spinner fallback: Uses ASCII frames (|, /, -, \) instead of braille characters in multiplexers
✅ Robust detection: Checks $TMUX, $STY, and $TERM prefixes to handle stripped environments
✅ Test coverage: Comprehensive unit tests for frame selection and multiplexer detection
✅ No resource leaks: Package-level variable initialization is safe and efficient
The code follows Go best practices with no bugs detected in the changed code.
rumpl
approved these changes
Mar 10, 2026
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
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.
Two changes improve spinner rendering in tmux and screen:
Cap the Bubble Tea renderer at 30 FPS when a multiplexer is detected. The default 60 FPS can overwhelm the multiplexer's rendering pipeline, causing dropped frames that make spinners appear static.
Fall back to ASCII spinner frames (|, /, -, \) instead of braille characters, which may not render correctly in every multiplexer configuration.
Multiplexer detection checks $TMUX, $STY, and the $TERM prefix (tmux*, screen*) so it still triggers when individual env vars are stripped (containers, sudo, etc.).
Assisted-By: docker-agent