Preview markdown, and say what a file with no diff is - #16
Open
siegfriedpammer wants to merge 2 commits into
Open
siegfriedpammer wants to merge 2 commits into
siegfriedpammer wants to merge 2 commits into
Conversation
Two kinds of file reach a review with no lines in them: a binary one, which git compares byte by byte and reports only as differing, and one that changed without its content changing - a rename, or a permission bit. Both were built as a diff of two empty sides. That opens as a blank document, which a reader cannot tell from a tool that failed to load the file, and the changed-files list showed them with no counts at all, beside files that genuinely changed nothing. Now the tab says which of the two it is, and for a binary file how the sides compare in size - whether the image got bigger is the whole of what a review can say about it, and git already knows it without reading the blob. The list carries the same word where the counts would be. It is still the file's own tab, with the file's own path, so it can be marked viewed and stepped past like any other: a binary file is part of a change and a reader ticking files off should not have to skip it. Claude-Session: https://claude.ai/code/session_01EgJ3xXgcismuaFmKhF6KD9 Assisted-by: Claude:claude-opus-5:Claude Code
A change to a README or a document is read for what it will look like as much as for what it says, and the diff can only show the source: a reader deciding whether a table still lines up, whether a link points where it claims, or how a nested list comes out had nowhere in the tool to find out. The preview is a tab of its own rather than a mode of the diff, so the source and the rendering can be open at once - which is the arrangement the question is usually asked in. It renders the head side, because that is what the change produces, and the base side for a file the change deletes, which has no head side left to render. Nothing new draws it: the renderer, the link command, the selection handling and the emphasis repair are the ones the overview's description already uses, so a preview picks up whatever those learn. On 'm', and in the View menu, where it is enabled only for a file there is something to render for - offered on a .cs file it would do nothing, which reads as a broken command rather than one that does not apply. Typing 'm' into a comment still types an m: the gesture handlers already stand aside for a text box. Claude-Session: https://claude.ai/code/session_01EgJ3xXgcismuaFmKhF6KD9 Assisted-by: Claude:claude-opus-5:Claude Code
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.
Two small reading features, one commit each.
Markdown preview (
m, or View > Markdown Preview)A change to a README or a document is read for what it will look like as much
as for what it says, and the diff can only show the source. The preview opens
as a tab of its own, so the source and the rendering are open at once:
a file the change deletes, which has no head side left;
that the overview's description already uses, so it picks up whatever those
learn. No new dependency, no new markdown code;
.csfile the menuitem is greyed rather than silently doing nothing;
minto a comment still types anm— the gesture handlers alreadystand aside for a text box.
Files with no diff are pointed out
A binary file, and a file that changed without its content changing (a rename,
a permission bit), were both built as a diff of two empty sides. That opens as
a blank document, which a reader cannot tell from a tool that failed to
load the file — and the changed-files list showed them with no counts at all,
beside files that genuinely changed nothing.
Now the tab says which of the two it is, and for a binary file how the sides
compare in size — whether the image got bigger is the whole of what a review
can say about it, and git knows it via
cat-file -swithout reading the blob:The file list carries the same word (
binary/no lines) where the countswould be. It is still the file's own tab with the file's own path, so it can
be marked viewed and stepped past like any other — a binary file is part of a
change, and a reader ticking files off should not have to skip it.
Testing
Build clean, 0 warnings. 353 tests, 352 passing, 1 skipped (the pre-existing
basedpyright bootstrap); 11 new cases cover the description and size logic,
which is a pure function in
Stampeded.Core.Both features were driven in the running app against a scratch repo holding a
markdown change, a pure rename and a binary change — the preview via both the
menu and the
mkey, the binary page and the list badges by opening them.Deliberately not included
The overview's cost table still shows
+0 -0 ~0 minfor these files. Thatreads as accurate there — nothing to read is zero minutes — and a column for
it would be the one place this got wider rather than clearer. The queue you
pick files from and the document you open both say it, which is where the
question is asked.
🤖 Generated with Claude Code