Skip to content

Keep download progress within terminal width - #23391

Merged
MikeMcQuaid merged 1 commit into
mainfrom
fix-download-size-unit
Aug 1, 2026
Merged

Keep download progress within terminal width#23391
MikeMcQuaid merged 1 commit into
mainfrom
fix-download-size-unit

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member

Fixes #23370

  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

OpenAI Codex 5.6 sol xhigh with local review and testing.


Copilot AI review requested due to automatic review settings August 1, 2026 06:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 - 1 visible 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.

Comment thread Library/Homebrew/test/download_queue_spec.rb
@MikeMcQuaid
MikeMcQuaid force-pushed the fix-download-size-unit branch from 26b1f24 to 1bbb1f5 Compare August 1, 2026 12:10
@MikeMcQuaid
MikeMcQuaid enabled auto-merge August 1, 2026 12:10
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Aug 1, 2026
Merged via the queue into main with commit 1f3abf4 Aug 1, 2026
43 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the fix-download-size-unit branch August 1, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'B' in 'MB' in total size of last download is missing

4 participants