Keep download progress within terminal width - #23391
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a TTY rendering edge case where download progress output can reach the final terminal column and trigger autowrap/erase behavior, causing the last character (e.g. the “B” in “MB”) to disappear.
Changes:
- Reduce the progress-message renderable width by one column to avoid writing into the terminal’s final column.
- Add a regression spec asserting the rendered progress line stays within
Tty.width - 1visible columns.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Library/Homebrew/download_queue.rb | Adjusts progress rendering width to keep output within terminal bounds. |
| Library/Homebrew/test/download_queue_spec.rb | Adds a regression test for the “final column” progress rendering behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
carlocab
approved these changes
Aug 1, 2026
ZhongRuoyu
approved these changes
Aug 1, 2026
MikeMcQuaid
force-pushed
the
fix-download-size-unit
branch
from
August 1, 2026 12:10
26b1f24 to
1bbb1f5
Compare
MikeMcQuaid
enabled auto-merge
August 1, 2026 12:10
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.
Fixes #23370
brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?OpenAI Codex 5.6 sol xhigh with local review and testing.