mirror of
https://github.com/runbear-io/beardrive.git
synced 2026-08-25 08:08:08 +02:00
Per-file history rows carried identity and a byte size and nothing else — to answer "what did the agent change?" you had to download two blobs and diff them by hand. Every non-first version now expands to a line diff against the previous version of that path, with a +N −M count. No new endpoint: /blob?sha= already serves both sides and the history response already names both shas. No new dependency: the LCS is ~40 lines in src/lib/diff.ts, unit-tested on node's built-in runner (npm test) — node ≥ 23 strips the types, so the frontend gains no dev dependency. Blobs are fetched only on expand and cached by sha with an infinite staleTime (content-addressed, so staleness never applies). Binary is decided on the bytes, never the extension; either side over 1 MB gets the too-large fallback, checked against Content-Length before the body is read. Diffs are per-file only — the subtree feed mixes paths. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>