Animate window title while working for tmux activity detection#1949
Merged
dgageot merged 1 commit intodocker:mainfrom Mar 6, 2026
Merged
Conversation
There was a problem hiding this comment.
Review Summary
Assessment: 🟢 APPROVE
No bugs found in the changed code. The implementation is safe and well-structured:
- Spinner animation: The
animFramecounter is managed correctly on the main UI thread with no race conditions - Bounds safety: The
Frame(index)function uses modulo arithmetic to prevent index out of bounds - User prompt improvements: Title field and free-form input handling are implemented correctly with appropriate nil checks
The changes successfully address the tmux activity detection issue by animating the window title with a rotating spinner character.
When running inside tmux, the TUI's alternate screen and progress bar protocol are not visible in the tmux status bar. This makes it hard to tell whether the agent is actively working. Prepend a rotating braille spinner character to the terminal window title while the agent is working. tmux detects title changes as pane activity, making the working state visible in the status bar. Also improve the user_prompt TUI dialog with title, free-form input, and keyboard navigation. Assisted-By: cagent
dce298d to
4058fa0
Compare
rumpl
approved these changes
Mar 6, 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.
When running inside tmux, the TUI's alternate screen and progress bar protocol are not visible in the tmux status bar. This makes it hard to tell whether the agent is actively working.
This PR prepends a rotating braille spinner character to the terminal window title while the agent is working. tmux detects title changes as pane activity, making the working state visible in the status bar.
Changes
pkg/tui/tui.go: Track animation frame inappModeland prepend a spinner character to the window title when working.pkg/tui/components/spinner/spinner.go: Add exportedFrame(index)accessor for the spinner characters, keeping the slice unexported to prevent external mutation.pkg/tools/builtin/user_prompt.go,pkg/tui/dialog/elicitation.go,pkg/tui/dialog/elicitation_test.go: Improve user_prompt TUI dialog with title, free-form input, and keyboard navigation.