F7: intra-diagram mermaid diffing (beyond the whole-diagram "changed" badge) #22

Closed
opened 2026-06-11 15:13:22 +00:00 by benstull · 0 comments
Owner

Deferred refinement of the F7 rendered track-changes preview (#21).

v1 behavior (shipping first): a changed or added ```mermaid block renders as the new diagram with a "changed since baseline" badge; removed diagrams shown struck/ghosted at the block level. Mermaid fences are treated as atomic blocks — no diffing inside the diagram.

This task — flesh out later: design and implement intra-diagram mermaid diffing — show what changed within a diagram against the baseline (added/removed/changed nodes, edges, labels, subgraphs), not just a whole-block badge. Open questions to work through:

  • diff at the mermaid source level (text) vs the parsed graph (nodes/edges) vs the rendered SVG;
  • how to visually mark added/removed nodes & edges in the rendered diagram (color/opacity/badges);
  • handling layout shifts (a single node change can reflow the whole diagram);
  • which mermaid diagram types to support first (flowchart/sequence/class/...).

Out of scope for F7 v1; capture only. Builds on #21, F6 baseline (#17/#19), Epic #1.

Deferred refinement of the F7 rendered track-changes preview (#21). **v1 behavior (shipping first):** a changed or added ```mermaid block renders as the **new diagram** with a **"changed since baseline" badge**; removed diagrams shown struck/ghosted at the block level. Mermaid fences are treated as **atomic** blocks — no diffing *inside* the diagram. **This task — flesh out later:** design and implement **intra-diagram mermaid diffing** — show what changed *within* a diagram against the baseline (added/removed/changed nodes, edges, labels, subgraphs), not just a whole-block badge. Open questions to work through: - diff at the mermaid **source** level (text) vs the **parsed graph** (nodes/edges) vs the **rendered SVG**; - how to visually mark added/removed nodes & edges in the rendered diagram (color/opacity/badges); - handling layout shifts (a single node change can reflow the whole diagram); - which mermaid diagram types to support first (flowchart/sequence/class/...). Out of scope for F7 v1; capture only. Builds on #21, F6 baseline (#17/#19), Epic #1.
benstull added the type/task label 2026-06-11 15:13:22 +00:00
Sign in to join this conversation.