Repository navigation
fix: skip spinner in non-interactive terminals - #1059
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
It adds an unrelated, likely-to-stale docs file and the non-terminal spinner path introduces an avoidable race by closing done asynchronously.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the internal/ui spinner wrapper to avoid starting a Bubble Tea spinner in non-interactive environments (e.g., CI) where opening a TTY can fail, and also adds a new documentation file.
Changes:
- Skip starting the Bubble Tea spinner when
os.Stderris not a terminal. - Add
docs/branches_report.mdcontaining a snapshot-style inventory of remote branches.
File summaries
| File | Description |
|---|---|
| internal/ui/spinner.go | Adds a terminal check to avoid starting Bubble Tea in non-interactive contexts. |
| docs/branches_report.md | Adds a branch inventory document (not directly related to spinner behavior). |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+86
to
+93
| if !term.IsTerminal(int(os.Stderr.Fd())) { | ||
| s.isRunning = true | ||
| s.done = make(chan struct{}) | ||
| go func() { | ||
| close(s.done) | ||
| }() | ||
| return | ||
| } |
Comment on lines
+1
to
+5
| # Branch Report for origin | ||
|
|
||
| ## Base | ||
| - `origin/main`: The primary stable branch containing the production-ready codebase. | ||
|
|
2 tasks done
cdalar
added a commit
that referenced
this pull request
Aug 27, 2026
fix: address PR #1059 review feedback on spinner
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.
This PR fixes an issue where the spinner would attempt to open a TTY even in non-interactive environments (like CI), leading to the error:
Error running spinner: could not open a new TTY: open /dev/tty: no such device or address. It now checks if the output is a terminal before starting the Bubble Tea program.