F7: rendered track-changes markdown preview (#21) #23
Reference in New Issue
Block a user
Delete Branch "f7-rendered-preview"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements Feature #21 (F7) — a rendered track-changes markdown preview — from the graduated Solution Design
coauthoring-rendered-preview.md.Summary
Ctrl+Alt+R/ Cowriting: Open Track-Changes Preview command opens a read-only webview beside a Markdown editor that renders the document and marks what changed since the F6 baseline: prose<ins>/<del>(word-refined) and atomic code/mermaid fences with a "changed" badge (INV-23). Mermaid renders as diagrams (runs in the webview).src/trackChangesModel.ts(splitBlocks/diffBlocks/renderTrackChanges) — block-level LCS diff over normalized blocks + word-level prose refinement; deterministic (INV-22).out/media/preview.js, esbuild second entry) — host bundle stays ~68kb.TrackChangesPreviewControllerreuses the F6 baseline (new additiveDiffViewController.onDidChangeBaselineevent) and adds no persistence (pure read-only, INV-20). Live debounced update on edit; re-bases on machine landing / pin.Test Plan
test/trackChangesModel.test.ts— 18 cases (addition/deletion/prose-change ins-del/atomic code+mermaid/reorder/unchanged/determinism/error-chip). Full suite 122 passing.@vscode/test-electron, no LLM):test/e2e/suite/trackChangesPreview.test.ts— open/PUC-1, type/PUC-2, propose+accept epoch advance/PUC-3, pin/PUC-4, non-markdown guard/PUC-6. Full E2E 33 + 4 passing.npm run typecheckclean;npm run buildproducesout/media/preview.js+out/media/preview.css.docs/MANUAL-SMOKE-F7.md(webview visual rendering — sealed sandbox, not E2E-asserted).Non-shippable POC (no marketplace publish); host-E2E tier per spec §7.2.
Co-authored with Claude (session 0021).