feat: minimal-cluster tracked changes

↗ view on GitHub · Eli Ziff · 2026-07-27 · 0db47d69

applyTrackedEdits now splits each matched edit into minimal change
clusters via fast-diff semantic cleanup instead of collapsing to one
delete-and-reinsert span. Fixing 'paras 332-334' tracks a single deleted
'3'; a two-spot edit becomes two tiny independent w:del/w:ins changes
with the untouched middle left alone; word swaps stay whole words.
Content-control protection, atomic per-edit rejection, and the
change-consumer shape (one card per change) are preserved.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yXxuitxX5h4wm1v88hnga
Repository eliziff/Beaver
Author Eli Ziff <eliasziff@gmail.com>
Authored
Parents 2959ca8c
Stats 2 files changed , +133 , -60
Part of SourceDoc / DOCX engine: redlines, tracked changes, editing benchmark

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-0db47d69.md from inside the repo you want the change in.

⬇ Download capture-commit-0db47d69.md