You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3454a0a
Browse filesBrowse the repository at this point in the historyBrowse files
feat(git): GitHub-style diff preview and commit view
One DiffView presents both the diff preview and the commit view as plain
editor tabs. Each file has a header row (status letter, dir + name, rename
arrow, +N -M, five squares, badges), a sticky header, a toolbar (file tree,
expand/collapse all, hide whitespace, wrap, previous/next change) and, in the
commit view, a filterable changed-files tree. The line-number margin
(old / new) is filled lazily; lockfiles, generated, deleted and large files
start collapsed behind "Load diff".
Pipeline: parse (file + hunk tables) -> classify -> per-file lexer style
slots -> document builder -> tree, in one pool job. The UI thread applies one
APPENDTEXT + SETSTYLINGEX. Markers and word indicators go on the visible
window at once and the rest in 4 ms slices. The commit view runs a single
`git show --diff-merges=first-parent` (one retry on old git), reads
`check-attr linguist-generated` for 2+ files and caches built documents.
Removes GitDiffPainter and GitCommitRenderer. Bugs fixed on the way: the
lexing result was computed but never used, numstat was unused, the hunk
colour lost its alpha, `--` deleted lines were misparsed as file headers,
and the diff lexers had no keywords.
Review fixes: diff requests carry a token so stale replies (whitespace
toggle in flight) are dropped; the preview cancels pending builds before
fetching; the commit view resolves revisions from the shown document;
the sticky header refreshes after theme and zoom changes; queued header-menu
actions check the document serial; files with nothing to fold show a muted,
non-clickable chevron; the file tree's context menu can collapse a file;
toolbar buttons keep focus and use 4px spacing; buildBody counts one file's
hunks instead of all of them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments