Skrive 1.0.3
Skrive 1.0.3 is a correctness and performance release focused on the projection editor — the layer that keeps the Rich surface and the Markdown on disk telling the same story.
This release came out of a deep fidelity and performance audit of the projection architecture, conducted and implemented end to end with Claude (Fable 5), Anthropic's frontier model — the audit found the bugs, multi-agent sessions fixed them in parallel, and a new corpus-wide test gate now stands guard over the dirty path.
Round-trip fidelity fixes
The projection editor's promise is that editing one block never rewrites the rest of your file. The untouched-block path was already byte-identical; this release fixes a set of bugs that fired when a block was edited:
- Inline images are no longer silently deleted from the file when the paragraph around them is edited. Images now appear in the Rich surface as real inline elements and serialize faithfully (alt text, URL, and title preserved).
- Pressing Enter in the middle of a paragraph no longer risks losing the paragraph break on save. Split blocks now correctly forget the verbatim source they inherited, on every split path (Enter, list splits, input rules), with undo still restoring the original bytes exactly.
- The canonical serializer now escapes properly. Backslash escapes survive edits, text that happens to start with Markdown syntax ("> ", "# ", "1. ") can no longer change block structure on save, and inline code containing backticks round-trips correctly.
- Code fences keep their character and length: a ~~~ fence whose body contains ``` lines no longer corrupts when edited, and fence info strings (language plus meta) are preserved.
- Reference-style links and images, inline HTML, and footnote references now freeze their containing block rather than degrading to plain text when touched.
- Link titles survive edits. Hard breaks can no longer be smuggled into headings, where they produce invalid Markdown.
- Loose lists containing tight items keep their rhythm when edited.
A new acceptance gate backs all of this: every block of every document in the test corpus is dirtied, serialized, and re-parsed, asserting the result is structurally identical to the original.
Editor performance
- Moving the cursor within a line no longer re-walks the visible syntax tree to rebuild decorations — rebuilds happen only when the cursor changes lines, the document changes, or the viewport moves. This removes the dominant per-keystroke cost in the Text surface on large documents.
- The preview outline rail no longer re-measures every heading on every keystroke. It now invalidates on heading structure, caches heading elements, and coalesces resize bursts — an image-heavy document measures a handful of times while loading instead of dozens.
- Typing-to-preview latency dropped by ~150ms: the preview's debounce sat downstream of the editor's store sync and coalesced nothing, so it was removed. Preview, word count, and outline now read the same snapshot.
- Word count is memoized instead of re-scanning the document on every state emission.
Verification
297 tests pass, including the new dirty-corpus fidelity gate, a split-block editing matrix driven through the production plugin stack, and unit coverage for the new invalidation logic.