seams
new comments sync with github pull requests

seams

a diff viewer for files too big for everything else.

a line diff engine in hand-written assembly and webassembly, drawn with webgl. a million-line diff opens in 0.19 s.

watch it work

v0.3mit licencelinux · windows · macchrome & edge extensionnothing leaves your machine

watch it

three screen recordings on one laptop, in real time. nothing is sped up, and the numbers on screen are the ones the page measured as it ran.

0:00
0:00

try it

this is seams itself, rendering a real change to its own source. scroll it, press n for the next change, v for split view, ctrl f to find. drag to select, copy works.

loading…

your files never leave this tab: they are read, diffed and drawn on your machine.

a whole pull request

five thousand files, generated in this tab. the first one opens straight away, and every other file is diffed in the background while you read it. ] and [ move between files, the box filters them.

not opened yet

guide

four ways in. pick the one that matches where your diff lives. none of them send your code anywhere.

  1. get the extension. download seams-extension.zip from the latest release and unzip it somewhere it can stay.
  2. load it. open chrome://extensions (or edge://extensions), turn on developer mode, click load unpacked and pick the folder.
  3. open any pull request. an open in seams button sits next to the title. it opens the whole pull request in a new tab, every file at its exact commit.
  4. add a token (optional) in the extension's options: a fine-grained token with contents: read and pull requests: read and write. it opens private repositories, lets you comment, and checks for changes every 10 seconds instead of every 2 minutes.
comments go both waysgithub's review comments show as pins on their lines. hover a line number, click +, write, ctrl enter: it lands on the pull request as yours.
pushes show up by themselvesa new commit is picked up while the tab is open. only files that changed are fetched again, and you stay on the same file and line.
big ones tooover 100 files, both sides come down as two snapshots unpacked while they download. a 1,150-file pull request opens in about 20 s.
is my code uploaded anywhere?

no. the site diffs in your tab, the cli and the local review never touch the network, and the extension talks only to github, for the pull request you opened.

is it free?

yes, mit licence, all of it. the source is on github.

does it replace github's review?

for reading, mostly: every file, comments in and out, live updates. approving, requesting changes and suggestions still happen on github.

where is it still behind?

with --minimal, on files with thousands of edits scattered all through them, seams is slower than imara-diff's default mode, because it insists on the shortest diff; the default fast mode is now ahead of imara there too. there's no native arm64 build yet, and the windows binary isn't signed. syntax highlighting is a small set of lexers, not full grammars.

numbers

one laptop, one browser, the same files and the same scroll gestures, against @pierre/diffs 1.6.4 at its best settings with highlighting on.

first screen

31x faster
seams
0.19 s
pierre
5.98 s

fully highlighted

84x faster
seams
0.49 s
pierre
41.4 s

memory

5x less
seams
113 MiB
pierre
570 MiB

scrolling

3x smoother
seams
145 fps
pierre
48 fps
a 1,000,000-line diff, opened and scrolled. same laptop (rtx 5060, 145 hz), same edge, same files, same scroll gestures.
255 msto diff all 1,218 files of a real pull request (tinygrad, 3,000 commits), matching git's totals line for line
0.46 sfirst frame of the million-line demo with the cpu slowed down 6x, and still smooth to scroll
34 msfirst screen of a 1M-line diff packed ahead of time, on a laptop at 16% battery

fair caveats: pierre computes its diff with jsdiff from two whole files, which is most of its first-screen time; its grammars are richer than seams' lexers; it has annotations and a merge ui that seams does not. the scrolling gap holds either way.

what it's for

most diffs are small, and any viewer is fine for those. seams is for the ones that break the others.

the diff github won't show

lockfiles, generated code, snapshots, vendored dependencies, migrations. "large diffs are not rendered" is where seams starts.

reviewing what an agent wrote

coding agents change thousands of lines at once. you still have to read them, and the review tool should not be the slow part.

data, not code

sql dumps, json exports, csv, logs, terraform state. text files with a million lines are normal outside of source trees.

diff once, in ci

seams-pack diffs on the server and writes a pack; the browser opens it with nothing left to compute. a pr page that is instant on any laptop.

inside your own tool

one import by url, a plain api and a react component. code review apps, editors, internal dashboards, docs.

patches and merges

the cli writes patches that carry their own bytes and refuse the wrong base, and does three-way merges with conflict markers.

how it works

two files go in as bytes. nothing is turned into strings, nothing becomes a dom node. the blog post has the long version.

  1. 01scanfind every newline, 32 bytes at a time with avx2, 16 with simd128
  2. 02trimskip the common start and end, which is most of a real edit
  3. 03hashone 64-bit hash per line, 8 bytes at a time
  4. 04interneach distinct line becomes a number, so the diff runs on numbers only
  5. 05myerslinear-space myers on what is left, with a budget so the worst case stays bounded
  6. 06drawevery glyph is one instanced quad from a glyph atlas; one webgl draw call a frame, only the rows on screen
nativenasm x86-64 with avx2. the linux, windows and mac builds give the same bytes.
browserthe same stages again in hand-written webassembly with simd128, about 5 kb.
checkedboth produce identical edit scripts on hundreds of thousands of random pairs.