Skip to content

Show larger files first in progress reporters#18918

Open
zanieb wants to merge 2 commits intoastral-sh:mainfrom
zaniebot:claude/fix-progress-bar-sorting-514r2
Open

Show larger files first in progress reporters#18918
zanieb wants to merge 2 commits intoastral-sh:mainfrom
zaniebot:claude/fix-progress-bar-sorting-514r2

Conversation

@zanieb
Copy link
Copy Markdown
Member

@zanieb zanieb commented Apr 8, 2026

Instead of using ascending order, we use descending order for progress reports. Larger downloads and uploads take longer. By inserting smaller items above them, we cause constant churn in the progress reporting. By inserting smaller items at the bottom, the progress should jump around less.

claude added 2 commits April 7, 2026 14:00
Previously, progress bars were inserted at a position determined by
download size using `partition_point`, which caused existing bars to
shift around as new downloads started. Now new bars are always appended
at the bottom, keeping existing bars stable. Since distributions are
pre-sorted by descending size before downloading, larger downloads
naturally appear first.

https://claude.ai/code/session_019jaa7kQPg1ZE4DveMHKhNg
Invert the sort order so larger downloads appear at the top of the
progress display. Previously the sizes list was in ascending order,
putting small downloads at the top and causing new small downloads to
push existing bars down. With descending order, new small downloads
are added at the bottom, keeping the larger (longer-running) bars
stable at the top.

https://claude.ai/code/session_019jaa7kQPg1ZE4DveMHKhNg
@zanieb zanieb changed the title Sort downloads by size in descending order in progress reporter Show larger files first in progress reporters Apr 8, 2026
@zanieb zanieb added the enhancement New feature or improvement to existing functionality label Apr 8, 2026
@zanieb
Copy link
Copy Markdown
Member Author

zanieb commented Apr 16, 2026

This is less important when the number of downloads or uploads is less than the concurrency limit, as there's no secondary insertion in that case and the item just moves up rather than being displaced. I think this is still a bit better.

@zanieb
Copy link
Copy Markdown
Member Author

zanieb commented Apr 16, 2026

Screen.Recording.2026-04-16.at.11.33.31.AM.mov
Screen.Recording.2026-04-16.at.11.34.03.AM.mov

@zanieb zanieb marked this pull request as ready for review April 16, 2026 16:35
@zanieb zanieb requested review from Gankra and konstin April 16, 2026 16:35
Copy link
Copy Markdown
Member

@konstin konstin left a comment

Choose a reason for hiding this comment

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

Thanks for the videos!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or improvement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants