F7.1: intra-diagram mermaid diffing (#22) #28
Reference in New Issue
Block a user
Delete Branch "f7.1-intra-diagram-mermaid-diff"
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?
Summary
Refines the F7 rendered track-changes preview's whole-diagram "changed" badge
into a node/edge-level diff inside flowchart and sequence diagrams against the
F6 baseline (task #22; design = spec §11, INV-29..31).
before/after source into a typed element model, diff it, and re-emit the
current diagram source augmented with mermaid's own styling directives so
mermaid renders a colored diagram. Host stays pure (INV-22); webview unchanged
(INV-21); nothing persisted (INV-20).
src/mermaidDiff.ts— dispatch + total fallback (never throws)src/mermaidFlowchartDiff.ts— node/edge diff ->classDef/class/linkStylesrc/mermaidSequenceDiff.ts— participant/message diff ->rect rgb(...)runsblocks, and any parse failure fall back to the v1 badge (INV-30).
position (INV-31). Layout reflow accepted (no position pinning).
media/preview.css).Test Plan
npm run typecheck— cleannpm test— 189 unit tests greennpm run test:e2e— 38 + 5 green (new: a changed flowchart augments theemitted mermaid source via the
renderHtmlForseam)docs/MANUAL-SMOKE-F7.1.md) — colors paintFixes #22