Repository navigation
List an archive's names in one go - #207
Merged
Merged
Conversation
Contributor
Author
[Medium impact] The reviewed changes appear safe to merge. SummaryArchive names are collected off the UI thread and shown together, with one fallback sentence when listing fails.
Reviews (4) · Last reviewed commit: "Show an archive's names as they are, not..." · Reviewed by Greptile |
helper class of its own that kept the run's process group, its stderr and an output budget, decoded bsdtar's escapes, counted what it didn't show, and had a sentence each for an empty, encrypted, slow or unreadable archive and a missing bsdtar. Names arriving one part at a time also needed the preview to hold its scroll position and ↑/↓ to wait for them. Now bsdtar runs once, off the UI thread with the rest of what the preview and the details read, and is waited for (five seconds at most). The first 500 names are shown as the opening of a text is; when bsdtar is missing, fails, lists nothing or takes too long, one sentence says the archive couldn't be listed. Co-Authored-By: GM <gianmarcomorales@icloud.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bsdtar's whole listing was read into memory before its first 500 names were taken, so an archive of millions of entries held all of them, and was waited out. Its output is now read as it comes, and bsdtar is stopped once 500 names (or 256 KB of them) are in. The details listed an archive on the threads that read every item's permissions and trash notes, so a slow listing kept those waiting. Listings now take a thread of their own, one at a time, and one the selection has moved past isn't started. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Once the names shown were in, the loop still took whatever bsdtar had left when it had already exited, adding it after the ellipsis. It now stops there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dhh
force-pushed
the
simpler-archive-names
branch
from
November 21, 2026 12:17
d6bcff6 to
4d9e585
Compare
bsdtar lists a backslash in a name as two, and a byte it can't print as an octal escape, so "café \ two.txt" showed with a doubled backslash. Each line is now decoded back to the name before it's shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 simplifies #179. It streamed an archive's names in as bsdtar printed them, through a helper class of its own that kept the run's process group, its stderr and an output budget, decoded bsdtar's escapes, counted what it didn't show, and had a sentence each for an empty, encrypted, slow or unreadable archive and a missing bsdtar. Names arriving one part at a time also needed the preview to hold its scroll position and ↑/↓ to wait for them.
Now bsdtar runs once, off the UI thread, and is waited for (five seconds at most). Its output is read as it comes and it's stopped once 500 names (or 256 KB of them) are in; those are shown as the opening of a text is. When bsdtar is missing, fails, lists nothing or takes too long, one sentence says the archive couldn't be listed. The details list archives on a thread of their own, so the rest of what they read never waits on a slow one.
🤖 Generated with Claude Code