Skip to content

feat(diff): Show change kind apart from review risk in diff diagrams - #302

Open
mhiro2 wants to merge 2 commits into
feat/display-densityfrom
feat/diff-change-kind
Open

mhiro2 wants to merge 2 commits into
feat/display-densityfrom
feat/diff-change-kind

Conversation

@mhiro2

@mhiro2 mhiro2 commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Diff diagrams now show what changed (added / removed / modified) separately from how risky the change is, instead of reusing lint severities for change kinds
  • SVG cards mark changes with + / − / ~ markers, faint tints, and colored outlines, draw type changes inline as before → after, and carry a separate breaking 1-style risk label from the review rules
  • The HTML viewer lists changes and risks in the detail drawer, shows the same risk label in the popover and object browser, and filters by both
  • Adds the fixtures/diff/change-risk evaluation fixture mixing safe and risky additions, removals, and modifications

Changes

  • afc6794 : feat(diff): show change kind apart from review risk in diff diagrams
    • DiagramOverlay records node, column (with previous type), and relationship change kinds in their own fields; annotations now hold only review findings ranked by ReviewSeverity, and OverlaySeverity is removed
    • Visual diffs run every review rule for the dialect both inputs resolve to; SVG and HTML draw change kinds and risk labels from a shared per-theme palette checked for AA contrast, and cards are sized for before → after types
    • Relationship changes are keyed by both column lists so parallel or repointed FKs between the same tables keep their own change kind
  • 472151a : docs: describe change kinds and risk labels in diff diagrams
    • CLI reference, README, and agent skill explain the change markers, type changes, and risk labels, and that [review] config does not apply to visual diffs
    • ARCHITECTURE.md covers the overlay fields, the shared palette, and how both renderers draw them

Diff overlays reused lint severities for change kinds (added as info,
removed as error, modified as warning), so what changed and how risky
it was shared one color. Overlays now record the change kind of tables,
columns, and relationships, with the previous type of retyped columns,
while annotations carry review findings from every rule for the
dialect both inputs resolve to. SVG cards mark changes with + / − / ~
markers, faint tints, and outlines, draw type changes as before → after,
and show risk as a separate breaking 1-style label; the HTML viewer
lists changes and risks in the drawer and filters by both. Edge
changes are keyed by both column lists so parallel relationships keep
their own change kind.
The CLI reference, README, and agent skill explain how visual diffs
mark change kinds and type changes apart from the review risk label,
and that the [review] config does not apply to them. ARCHITECTURE.md
covers the overlay's change and annotation fields, the shared diff and
risk palette, and how the SVG and HTML renderers draw them.
@github-actions

Copy link
Copy Markdown

Code Metrics Report

main (8fa087d) #302 (3df4f70) +/-
Coverage 95.7% 96.0% +0.2%
Test Execution Time 2m7s 2m11s +4s
Details
  |                     | main (8fa087d) | #302 (3df4f70) |  +/-  |
  |---------------------|----------------|----------------|-------|
+ | Coverage            |          95.7% |          96.0% | +0.2% |
  |   Files             |            106 |            109 |    +3 |
  |   Lines             |          42589 |          43437 |  +848 |
+ |   Covered           |          40798 |          41719 |  +921 |
- | Test Execution Time |           2m7s |          2m11s |   +4s |

Code coverage of files in pull request scope (96.1% → 96.5%, patch 97.7%)

Details
Files Coverage +/- Patch Coverage Status
crates/relune-app/src/usecases/diff.rs 93.3% +4.0% 97.1% modified
crates/relune-app/src/usecases/render.rs 97.0% +0.2% 100.0% modified
crates/relune-app/src/usecases/review.rs 97.3% 0.0% 100.0% modified
crates/relune-cli/src/cli.rs 87.0% -1.0% - affected
crates/relune-cli/src/commands/diff.rs 95.1% -0.1% - affected
crates/relune-cli/src/commands/mod.rs 100.0% +100.0% - affected
crates/relune-cli/src/commands/render.rs 98.4% -0.1% - affected
crates/relune-cli/src/config.rs 96.6% +0.0% - affected
crates/relune-core/src/config.rs 95.9% +0.0% - affected
crates/relune-core/src/review.rs 95.5% +0.6% - affected
crates/relune-core/src/review/rules.rs 98.8% -0.1% - affected
crates/relune-layout/src/diagram_export.rs 94.5% +0.0% 100.0% modified
crates/relune-layout/src/graph.rs 98.8% +0.0% 100.0% modified
crates/relune-layout/src/layout/density.rs 100.0% +100.0% - affected
crates/relune-layout/src/layout/edge_routing.rs 95.5% +0.0% - affected
crates/relune-layout/src/layout/mod.rs 97.4% +0.1% - modified
crates/relune-layout/src/layout/spacing.rs 99.5% +0.0% 100.0% modified
crates/relune-layout/src/metrics.rs 98.2% +5.2% 100.0% modified
crates/relune-layout/src/overlay.rs 100.0% +0.5% 100.0% modified
crates/relune-layout/src/port.rs 97.7% +0.4% 100.0% modified
crates/relune-layout/src/route/obstacle.rs 93.6% +1.6% - affected
crates/relune-parser-sql/src/create_table.rs 85.9% -0.3% - affected
crates/relune-render-html/src/components.rs 100.0% 0.0% 100.0% modified
crates/relune-render-html/src/css.rs 100.0% 0.0% 100.0% modified
crates/relune-render-html/src/html.rs 99.8% -0.1% - affected
crates/relune-render-html/src/lib.rs 100.0% 0.0% 100.0% modified
crates/relune-render-html/src/metadata.rs 100.0% +0.3% 100.0% modified
crates/relune-render-svg/src/diff.rs 92.5% +92.5% 92.5% added
crates/relune-render-svg/src/edge.rs 95.6% -0.2% - affected
crates/relune-render-svg/src/group.rs 98.8% -0.2% - affected
crates/relune-render-svg/src/legend.rs 96.1% -1.1% - affected
crates/relune-render-svg/src/lib.rs 98.7% +0.8% 99.2% modified
crates/relune-render-svg/src/node.rs 93.2% -1.5% 93.7% modified
crates/relune-render-theme/src/lib.rs 100.0% 0.0% 100.0% modified
crates/relune-testkit/src/lib.rs 87.4% +0.1% - affected
crates/relune-wasm/src/lib.rs 4.6% -0.1% - affected
crates/relune-wasm/src/request.rs 98.5% +0.0% - affected

Reported by octocov

@github-actions

Copy link
Copy Markdown

Schema review

Tip

✅ No risk findings — schema changes look safe to merge.

@mhiro2
mhiro2 added this pull request to stack #294 October 11, 2026 12:37

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant