Feature Details
Problem Statement
When iterating on a JSON Schema, it's hard to understand what structurally changed between two versions. You have to manually read both schemas side by side and mentally trace which $defs, properties, or types were added, removed, or modified. There's no visual way to compare them.
Proposed Solution
Add a "Diff" toggle button in the editor panel toolbar that switches Monaco into its native diff editor mode (splitting the editor into two panes). The left pane holds the current schema; the right pane accepts a second schema to compare against. The graph view updates to reflect both schemas simultaneously, with nodes color-coded by diff status:
- Green: added in the new schema
- Red: removed from the original
- Yellow: modified (e.g. type change, added/removed properties)
- Default: unchanged
Clicking a highlighted node in the graph scrolls the diff editor to the corresponding change.
Demo Video/Screenshots
N/A
Alternatives Considered
- Manual comparison: reading two schema files side by side in a text editor. Works but gives no structural overview and doesn't scale with schema complexity.
- External diff tools (e.g. jsondiff): produce textual diffs but have no graph context, so understanding the structural impact of a change still requires mental tracing.
Additional Context
Monaco's diff editor (monaco.editor.createDiffEditor) is already bundled as a dependency, so this requires no new packages. The graph diff layer can be built on top of the existing processAST pipeline by running it twice, once per schema, and matching nodes by URI fragment for stable identity comparison.
Good First Issue
Contribution
Feature Details
Problem Statement
When iterating on a JSON Schema, it's hard to understand what structurally changed between two versions. You have to manually read both schemas side by side and mentally trace which $defs, properties, or types were added, removed, or modified. There's no visual way to compare them.
Proposed Solution
Add a "Diff" toggle button in the editor panel toolbar that switches Monaco into its native diff editor mode (splitting the editor into two panes). The left pane holds the current schema; the right pane accepts a second schema to compare against. The graph view updates to reflect both schemas simultaneously, with nodes color-coded by diff status:
Clicking a highlighted node in the graph scrolls the diff editor to the corresponding change.
Demo Video/Screenshots
N/A
Alternatives Considered
Additional Context
Monaco's diff editor (monaco.editor.createDiffEditor) is already bundled as a dependency, so this requires no new packages. The graph diff layer can be built on top of the existing processAST pipeline by running it twice, once per schema, and matching nodes by URI fragment for stable identity comparison.
Good First Issue
Contribution