5e5720fb ยท zzmq.dev@gmail.com/zz
Commit
5e5720fb42f377e629a1c16ec9ce30c68cbf0b30
Show an inline diff + the filechange's own Ladder context for a file at a historical commit Viewing a file at any non-HEAD ref (reached via a commit's own tree, or a direct historical /blob/<sha>/<path> link) rendered the exact same plain, syntax-highlighted file HEAD itself shows -- no sense of what that commit actually did to it, and the download link was the only thing already pinned to that commit's version. Now: a historical commit (one whose sha isn't the repo's current HEAD) with a real parent diffs this file's content against that parent (diffLines, a plain LCS line diff -- same algorithm `git diff` itself is built on, capped at 2000 lines either side since the DP table is O(n*m) and a Worker's CPU/memory budget isn't infinite), rendering every line tagged same/add/del instead of the plain highlighted block. The header's own "Ladder Summary" swaps from the file's current-state rung to this commit's own filechange rung for this path (same matching handleCommit's own file list already does, by full path or basename) -- what this specific commit did to this specific file, not what the file holistically is today. HEAD itself, a file too large to diff, or a commit with no parent (nothing to diff against) all fall back to the existing plain view unchanged. The diff view itself isn't syntax-highlighted (a real gap, not attempted here -- hljs lexes one contiguous block, and a per-line diff would need each added/removed line highlighted in isolation with no surrounding context to compose this from), but legible at all beats the plain-file view's complete silence on what changed.
Troy Howard <thoward37@gmail.com> -- 2026-10-14T01:58:56.000Z