feat: Compare threat models in Studio - #117
Merged
Merged
Conversation
Comment on lines
+77
to
+85
| foreach (ElementDescriptor previous in baseline.Elements.Values.OrderBy(element => element.Id)) | ||
| { | ||
| if (!changed.Contains(previous.Id) && proposed.Elements.TryGetValue(previous.Id, out ElementDescriptor? current) && previous.DiagramId != current.DiagramId) | ||
| { | ||
| List<PropertyChange> properties = new List<PropertyChange>(); | ||
| AddPageMove(previous.Id, baseline, proposed, properties); | ||
| changes.Add(ElementChange(previous.Id, "structure", "modified", current.Name, baseline, proposed, properties)); | ||
| } | ||
| } |
Comment on lines
+277
to
+283
| foreach (string endpoint in new[] { "source", "target" }) | ||
| { | ||
| if (element.Attributes.TryGetValue(endpoint, out string? value) && Guid.TryParse(value, out Guid parsed)) | ||
| { | ||
| targets.Add(parsed); | ||
| } | ||
| } |
This was referenced Sep 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Make model revisions reviewable in Studio without merging files or modifying
the working canvas. Show structural changes, changed trust-boundary crossings,
and their effect on analysis findings in one place.
What changed
or proposed file, with independent read-only diagrams and page-aware highlighting.
before/after property details.
behind a shared comparison operation exposed through HTTP and WASM.
changes separately from introduced or resolved findings.
Unavailable analysis is explicitly reported, never presented as resolved findings.
Opening Compare invalidates pending Tidy/import operations, including responses
arriving after Review closes.
Scope
Both snapshots are analyzed with the current engine and active rule bundle;
this is not historical analysis replay or a merge operation.
Visual-only changes and full metadata/threat-register content are not compared
field by field. Metadata and author-owned threat-record differences produce
scope warnings. Input and change limits refuse oversized comparisons rather
than silently truncating results.