Skip to content

Show the names inside an archive in its preview - #179

Open
dhh wants to merge 3 commits into
mainfrom
archive-names
Open

dhh wants to merge 3 commits into
mainfrom
archive-names

Conversation

@dhh

@dhh dhh commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

An archive showed only its icon, in the details column and in the preview window, so the only way to see what was in a zip or a tarball was to extract it.

Selecting one now lists the names inside it in the details, and Space shows the whole list. bsdtar, which Folio already runs to extract and compress, reads them off the UI thread; they show as they arrive with their count, and the read is stopped (with anything bsdtar started to unpack with) when the selection moves on. The first 500 names, or 128 KB of them, are shown and the rest counted. An empty, encrypted or unreadable archive, one that gives no name within five seconds and a missing bsdtar each say so in a sentence instead. The preview keeps its scroll position while names are still arriving. An archive whose name says nothing of its type is listed once what it holds says it's one.

Based on #63 by @thisisgm: its first commit, rebased onto the details column (#153, #154, #155), without the font sheets and media lengths.

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable defects were found.

Summary

Adds archive contents to the details pane and Space preview, with bounded lists and clear messages when listing fails.

  • The details pane shows the names inside an archive.
  • Space opens a readable list for archives.

No new actionable issues found. The earlier missing-tarball finding is fixed. dhh accepted the CPIO and canonical ISO exclusions because previews intentionally share Folio’s existing archive classification.

Tests were not run.

Reviews (4) · Last reviewed commit: "Draw an archive's waiting sentence in th..." · Reviewed by Greptile

Comment thread src/previewer.cpp Resolved
Comment thread src/previewer.cpp Resolved
@dhh

dhh commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Before and after, with a made-up project.zip: the details had nothing for an archive, and now list what's in it.

Before: no picture for an archive. After: the names inside it

dhh and others added 3 commits November 18, 2026 17:34
An archive showed only its icon, in the details column and in the
preview window, so the only way to see what was in a zip or a tarball
was to extract it.

Selecting one now lists the names inside it in the details, and Space
shows the whole list. bsdtar, which Folio already runs to extract and
compress, reads them off the UI thread; they show as they arrive with
their count, and the read is stopped (with anything bsdtar started to
unpack with) when the selection moves on. The first 500 names, or
128 KB of them, are shown and the rest counted. An empty, encrypted
or unreadable archive, one that gives no name within five seconds and
a missing bsdtar each say so in a sentence instead. The preview keeps
its scroll position while names are still arriving. An archive whose
name says nothing of its type is listed once what it holds says it's
one.

Co-Authored-By: GM <gianmarcomorales@icloud.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Which archives had their names listed was a list of its own, apart from
the one Folio uses to call a file an archive and offer Extract, so a
.tar.lzma or a .tar.lz could be extracted but showed no names.

It is now that same notion of an archive, every compressed tar among
them, less a lone compressed file (notes.txt.gz), which bsdtar can't
list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Folio's text now follows the system font, and Sentence was a plain Text,
which stayed in Qt's default font. It is a FolioText now, and the
details' sentence gives its size as size: 12, so the system's text size
scales it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant