Repository navigation
Step the preview with ↑ and ↓, like Quick Look on macOS - #174
Merged
Merged
Conversation
[Medium impact] The reviewed changes appear safe to merge. SummaryThe PR lets ↑ and ↓ move through previewed files using the folder’s layout, while keeping scrolling for longer content.
The numbered finding about skipping unknown text is fixed. No new actionable issues were found. Reviews (6) · Last reviewed commit: "Step past a one-page PDF with ↑ and ↓" · Reviewed by Greptile |
dhh
force-pushed
the
preview-up-down-rows
branch
from
November 18, 2026 15:42
9ce57c1 to
b1b60f2
Compare
In the preview, ↑ and ↓ only scrolled, so on a picture, a video or a folder they did nothing, and in the list and column views, where files sit one above the other, there was no way to step to the next one with the keys that move through them in the folder. Now ↑ and ↓ still scroll what's taller than the window (a long text, a zoomed picture, a PDF), and anything that fits moves to the item above or below as the folder view lays them out: the row above or below in the list and columns, the tile above or below in the grid. The preview asks Folio with a "step -1" or "step 1" line, since only the window knows its layout; Folio moves its selection and sends the new item back as it already does. A preview running on its own falls back to the previous and next file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xt loads After ↑ or ↓ the preview asked Folio for the row above or below, but an arrow pressed before the answer was taken from the old item: ↓ then → in a grid undid the ↓. Folio now sends the new item at once and then "stepped", and the preview keeps the arrows that came meanwhile until it does (a second at most, if no answer comes). A text still being read looked short, so ↑ and ↓ stepped past a long file on a slow mount. They do nothing until the text is in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Arrows pressed while the preview waited for Folio to step a row were queued and replayed once it had. Replayed, they were taken from a file nobody had looked at yet: a second ↓ queued on a picture stepped past the long text or PDF the first ↓ reached instead of scrolling it, or before its text was read; and a → queued behind a ↓ onto an opened folder's first child was played against a list of one, and lost. Folio answers a step within milliseconds, sooner than a held key repeats, so the arrows pressed in between are now simply let go, and the next one is judged from the file the step reached. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The preview reported each file it stepped to, and the list's cursor followed only a file directly in the folder shown. Previewing a file in a folder opened in the tree and stepping with → left the cursor behind, so ↓ then stepped from the old row, backward. A file anywhere under the folder shown now moves the cursor to its row. The preview's lines are read by Backend::previewSaid, which the test drives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dhh
force-pushed
the
preview-up-down-rows
branch
from
November 18, 2026 16:17
755bafa to
86c66c8
Compare
A file whose name gives no type is read off the UI thread to learn what it holds, and it may turn out to be a long text. While that read ran, readingText stayed off, so on a slow mount ↑ or ↓ could step past it as if it fit, before its text had appeared. The guard now stays on while such a file's type and possible text are read, as it does for a text whose name says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The PDF preview has no contentHeight, so the window always took it for something to scroll: ↑ and ↓ turned its pages, and on a PDF of a single page they went nowhere, never on to the item above or below. The PDF preview now says whether it scrolls, which it does with more than one page, and the window asks a view that says so before falling back on its content's height. 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.
In the preview, ↑ and ↓ only scrolled, so on a picture, a video or a folder they did nothing, and in the list and column views, where files sit one above the other, there was no way to step to the next one with the keys that move through them in the folder.
Now ↑ and ↓ still scroll what's taller than the window (a long text, a zoomed picture, a PDF), and anything that fits moves to the item above or below as the folder view lays them out: the row above or below in the list and columns, the tile above or below in the grid. The preview asks Folio with a "step -1" or "step 1" line, since only the window knows its layout; Folio moves its selection and sends the new item back as it already does. A preview running on its own falls back to the previous and next file.
Arrows pressed before Folio has answered a step (within milliseconds, or a second at most if it never does) are let go, so ↓ then → in a grid no longer undoes the ↓, and the next arrow is judged from the file the step reached. While a text is still being read, ↑ and ↓ do nothing, so a long file on a slow mount isn't stepped past before its length is known. The preview's shortcuts sheet lists ↑ and ↓ beside ← and → for the previous and next file.
Based on #21 by @kevinpardo, rebased onto today's main (the shortcuts sheet is now in groups) with his two commits as they were.
🤖 Generated with Claude Code