From c771193c83cd760bb7ef0d6f235fca1e258fe11c Mon Sep 17 00:00:00 2001 From: Steffen Becker Date: Sat, 15 Aug 2026 16:42:28 +0200 Subject: [PATCH] fix: an opened document is nobody's tracked insertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With revision recording on, setContent inserted the whole file in one transaction, so the recorder marked every run as the reader's own insertion — the document then rendered underlined in the author colour (#c69200) from the first character. Measured: 19 843 of 19 843 characters on an 11-page import, 436 revision spans. Both loads (new document, import) now carry the RECORDING meta; what is typed after the open is still recorded, as in both word processors. --- src/App.svelte | 14 ++++++-- src/lib/editor/extensions/CLAUDE.md | 2 +- tests/unit/track-changes-load.test.ts | 46 +++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 tests/unit/track-changes-load.test.ts diff --git a/src/App.svelte b/src/App.svelte index fa3a31a..c17e14a 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,7 +1,7 @@