Diffs that show what changed, not just which lines.

Sailfork marks the words that changed inside a line, follows code that moved, and draws tables, notebooks and images as what they are.

src/billing/invoice.ts

18 18 export function invoiceTotal(lines: Line[], tax: number) {
19 − const subtotal = lines.reduce((sum, l) => sum + l.price, 0);
19 + const subtotal = lines.reduce((sum, l) => sum + l.price * l.quantity, 0);
20 − return Math.round(subtotal * (1 + tax));
20 + return roundCents(subtotal * (1 + tax));
21 21 }

src/billing/retry.ts

Moved from src/checkout/pay.ts:40 · 4 lines
8 + function backoff(attempt: number) {
9 + const base = 500 * 2 ** attempt;
10 + return Math.min(base, 30_000);
11 + }
From pull request #1 of sailfork/diff-demo, drawn by the engine. Open it

Try the engine

Edit either side. The diff below comes from the same Rust code that diffs every pull request on Sailfork, running in your browser.

src/checkout/pay.ts

Loading the diff engine…

See it on a real pull request

Pull request #1 of sailfork/diff-demo, a public repository, as the engine draws it. Open it and review it the way your team would.

Charge for quantities and share the retry policy #1

11 files +44 −24

Changed src/billing/invoice.ts +3 −3
1 − import type { Cents } from '../util/money';
1 + import { roundCents, type Cents } from './money';
2 2
3 3 export type Line = { sku: string; price: Cents; quantity: number };
4 4
5 5 export function invoiceTotal(lines: Line[], tax: number) {
6 − const subtotal = lines.reduce((sum, l) => sum + l.price, 0);
7 − return Math.round(subtotal * (1 + tax));
6 + const subtotal = lines.reduce((sum, l) => sum + l.price * l.quantity, 0);
7 + return roundCents(subtotal * (1 + tax));
8 8 }
9 9
10 10 export function invoiceLines(lines: Line[]) {
Changed src/checkout/pay.ts +4 −8
Moved to src/billing/retry.ts:3 · 4 lines
1 1 import Stripe from 'stripe';
2 − import type { Cents } from '../util/money';
2 + import type { Cents } from '../billing/money';
3 + import { MAX_ATTEMPTS, wait } from '../billing/retry';
3 4
4 5 const stripe = new Stripe(process.env.STRIPE_KEY ?? '');
5 −
6 − function backoff(attempt: number) {
7 − const base = 500 * 2 ** attempt;
8 − return Math.min(base, 30_000);
9 − }
10 6
11 7 export async function pay(customer: string, amount: Cents) {
12 − for (let attempt = 0; attempt <= 5; attempt++) {
8 + for (let attempt = 0; attempt < MAX_ATTEMPTS; attempt++) {
13 9 try {
14 10 return await stripe.paymentIntents.create({ customer, amount, currency: 'usd' });
15 11 } catch {
16 − await new Promise((done) => setTimeout(done, backoff(attempt)));
12 + await wait(attempt);
17 13 }
18 14 }
19 15 throw new Error('payment failed after retries');
Changed package.json +2 −1

Packages: 1 updated, 1 added

  • p-retry added 6.2.1
  • zod 3.23.8 → 3.24.1
6 6 "test": "bun test"
7 7 },
8 8 "dependencies": {
9 + "p-retry": "6.2.1",
9 10 "stripe": "16.2.0",
10 − "zod": "3.23.8"
11 + "zod": "3.24.1"
11 12 }
12 13 }
Open pull request #1 in Sailfork

Every kind of file, drawn as itself

Pick a kind to see it in a real diff.

Cells compared one by one: markdown cells rendered with their changed words marked, code cells as diffs, outputs before and after.

A notebook diff: a markdown cell rendered with an added phrase marked, a code cell with two lines replaced, and its output before and after.

The words that changed, marked inside the line

A one-character fix reads as one character, not two whole lines to compare by eye.

7 − return Math.round(total);
7 + return roundCents(total);

A removed line and the line that replaced it are paired, and only what differs is marked. The marks work in split and unified views, and you can comment on a selected word instead of the whole line.

The files view of a pull request: changed words marked in invoice.ts, a renamed money.ts, a function in retry.ts with a note saying it moved from checkout/pay.ts line 6, and cart.ts labeled formatting only.

Code that moved says where it went

Both ends link to each other, so a move is not reviewed twice as a delete and an add.

src/checkout/pay.ts
Moved to src/billing/retry.ts:8 · 4 lines
40 − function backoff(attempt: number) {
41 − const base = 500 * 2 ** attempt;
42 − return Math.min(base, 30_000);
43 − }
src/billing/retry.ts
Moved from src/checkout/pay.ts:40 · 4 lines
8 + function backoff(attempt: number) {
9 + const base = 500 * 2 ** attempt;
10 + return Math.min(base, 30_000);
11 + }

src/checkout/pay.ts:40 src/billing/retry.ts:8 4 lines, found across files

A block cut from one file and pasted in another is found across files and hunks, even when its indentation changed or it was edited on the way.

Made for the pull requests agents open

Vite 5.0.0 to 5.4.0 in one pull request: 173 files, with vendored code folded until you open it.

A pull request upgrading vendored Vite source: 173 files, 10,106 lines added and 4,006 removed, with the file tree on the left and client.ts unfolded to show its changed lines and words.
  • Renames are followed

    A file renamed with edits is found at 50% similarity, and its history follows it.
  • Formatting folds away

    Runs that only re-lay out the same code fold by default; in Python or YAML, indentation is never folded.
  • Generated files start folded

    Lockfiles, minified files and anything .gitattributes marks generated stay closed until you open them.
  • The first lines arrive with the page

    The first 2,000 changed lines come with the page; the rest load as you scroll.
  • Only what is on screen is drawn

    A long diff keeps the rows you see and drops the rest, so scrolling stays smooth.
  • A suggested reading order

    Code first, then tests, docs and generated files, each file ahead of the files that import it.

Fast on the server, light in the browser

The server works out the whole diff, the changed words in every line and the code that moved before the page asks.

ChangeFilesChanged linesDiffMoved code
All of Vite added to a small service22941,78775.7 ms55.4 ms
Vite upgraded from 5.0.0 to 5.4.017314,112109.3 ms87.5 ms
A feature pull request116820.2 ms8 ms

Server time from the production API’s own timing header, the first time each range was asked for, on 2026-11-14. Repeat reads of the same commits come back in under 2 ms. Every range is in the public sailfork/diff-demo repository.

Risky files are named before you merge

Whatever the diff says, these files get a badge in the diff and a line in the merge checklist.

  • Secrets
    Keys and passwords committed here are readable by everyone with access, and stay in the history after they are removed.
  • CI workflow
    Workflows run with the repository’s secrets and deploy rights.
  • Container
    Base images and build steps decide what runs in production.
  • Code owners
    This decides who must review future changes.
  • Migration
    It adds a migration, and a migration never merges without a person.
  • Infrastructure
    These files describe servers, networks and access.

Review from the keyboard

Select lines by dragging the gutter or with the keyboard, and link straight to a line range. Files and hunks you mark viewed stay marked.

  • j k

    Next and previous file
  • v

    Mark the file viewed
  • w

    Wrap long lines
  • Shift F10

    Comment, suggest or copy a link from the line menu

Loading Sailfork