Skip to content

Skrive v0.0.9

Choose a tag to compare

@github-actions github-actions released this 24 Apr 22:35

v0.0.9 — Structural diff: algorithm picked, backend shipped

This release lands the research and backend work for Phase 3.3b (structural diff). The Svelte-side renderer upgrade was attempted and reverted — the diff UI users see is still the Phase
3.3a line-diff, which works cleanly. The algorithm work and Rust backend are in place so the next renderer attempt doesn't start from zero.

What's in

Algorithm decision (T1 resolved). Block-hash matching with Hungarian assignment. Chosen over Zhang-Shasha tree-edit-distance and block-Myers

Full transcripts and reasoning live in docs/3.3-algorithm-memo.md.

Production compute_diff in src-tauri/src/diff.rs. New Block, BlockKind, DiffOp (Kept/Added/Deleted/Moved/Reworded), and WordOp types. Fence-aware block splitter (code blocks with blank lines stay intact). Word-level intra-block diff for reworded paragraphs via similar::TextDiff::from_words. Exposed as a Tauri command. Covered by 10 new tests; full Rust suite at 147 passing.

TypeScript mirror. src/lib/diff/structural-diff.ts carries the frontend-side type definitions and a thin computeDiff invoke wrapper, ready for whenever the renderer gets picked back up.

What's deferred

The renderer. The Svelte preview-mode upgrade (moved banners, reworded inline word-level diff, sage/slate/brass palette) landed and was reverted after a reactivity bug that couldn't be reproduced or diagnosed remotely. The 3.3a line-diff renderer stays as the diff UI. When the structural renderer is picked back up, the approach is: build it as a standalone demo page with hardcoded DiffOp[] fixtures first, then wire into DiffView as a second render path alongside the line-diff, not a replacement. No date.

Upgrade notes

  • No user-visible changes. The diff view looks identical to v0.0.8.
  • No migration; no data format changes.

Under the hood

  • New: src-tauri/src/diff.rs (structural diff), src/lib/diff/structural-diff.ts
  • Updated: docs/3.3-algorithm-memo.md (decision + prototype transcripts), src-tauri/src/diff_memo.rs (P2 + P3 prototypes)
  • Tests: 10 new Rust, 147 total passing; frontend typecheck clean