docs(f7): manual smoke script + README section (#21)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -164,6 +164,38 @@ instead of git archaeology.
|
||||
Design: `vscode-cowriting-plugin-content/specs/coauthoring-diff-view.md`.
|
||||
Live smoke: [`docs/MANUAL-SMOKE-F6.md`](docs/MANUAL-SMOKE-F6.md).
|
||||
|
||||
## F7 — Rendered track-changes preview (Feature #21)
|
||||
|
||||
**`Ctrl+Alt+R`** (or **Cowriting: Open Track-Changes Preview**) opens a
|
||||
read-only webview **beside** a **Markdown** editor that renders the document and
|
||||
marks what changed since the F6 baseline — the "track changes" / "suggesting
|
||||
mode" altitude rather than a raw-text split-diff:
|
||||
|
||||
- **Prose** additions are highlighted (`<ins>`), deletions struck (`<del>`),
|
||||
refined to the word.
|
||||
- **Code and mermaid fences** are diffed **whole** (atomic, INV-23): a changed or
|
||||
added one renders fully with a small **"changed"** badge; a removed one renders
|
||||
struck. Mermaid fences render as **diagrams** (mermaid runs in the webview).
|
||||
Intra-diagram node/edge diffing is deferred (#22).
|
||||
- It **updates live** as you and Claude edit (debounced), and **re-bases** when
|
||||
Claude lands an edit (baseline advances, INV-18) or you pin — so accepted text
|
||||
drops its marks. It **reuses the F6 baseline** and adds **no** persistence
|
||||
(pure read-only, INV-20).
|
||||
- The webview is **sealed** (INV-21): local bundled assets only, strict CSP with
|
||||
a per-load nonce, no network/CDN, no LLM. Mermaid is bundled into the
|
||||
**webview** asset only, never the extension-host bundle.
|
||||
- The render engine (`src/trackChangesModel.ts`) is a **pure, vscode-free**
|
||||
function (INV-22), unit-tested with no editor and no webview; host E2E
|
||||
(`test/e2e/suite/trackChangesPreview.test.ts`) drives the same programmatic
|
||||
propose/accept seam with no LLM.
|
||||
|
||||
F7 is **markdown-only**; for any other file (incl. code), use F6's diff toggle
|
||||
(`Ctrl+Alt+D`). The webview's visual rendering (mermaid, theming) is verified by
|
||||
the manual smoke, not the sealed-sandbox E2E.
|
||||
|
||||
Design: `vscode-cowriting-plugin-content/specs/coauthoring-rendered-preview.md`.
|
||||
Live smoke: [`docs/MANUAL-SMOKE-F7.md`](docs/MANUAL-SMOKE-F7.md).
|
||||
|
||||
## Develop
|
||||
|
||||
- `npm run watch` — rebuild on change.
|
||||
|
||||
Reference in New Issue
Block a user