feat(calm-hub-ui): POC of a new Diff View between architectures#2429
feat(calm-hub-ui): POC of a new Diff View between architectures#2429aamanrebello wants to merge 9 commits into
Conversation
|
/easycla |
|
Video evidence: video1066756758.mp4 |
Wires up the architecture diff page from PR finos#2429 against the new calm-models/diff layer. The diff function and its data types are imported from @finos/calm-models/diff so the same comparison logic backs the calm diff CLI, the shared runDiff runner, and this UI. UI-only types (DiffGraphProps, DiffPanelProps, DiffNodeData, etc.) live in src/diff/model/diff-ui-types.ts so they don't leak into the shared package; everything else (DiffResult, NodeChange, RenameMapping, etc.) comes from @finos/calm-models/diff. Tests, fixtures, components, and the calmHelpers extension are ported from finos#2429 with updated import paths.
|
For consideration alongside this PR — I've raised #2442 as an alternative implementation that pushes the diff detection logic out of The architectural intent matches @markscott-ms's comment on #2289 — same diff function backing the UI, the CLI (with The UI in #2442 uses your components from this PR with import paths rewired to the shared module — same screen, same behaviour. Test fixtures and unit tests are largely ported from your work. The two PRs are mutually exclusive and only one should land. Posting it so reviewers can compare the two approaches end-to-end and pick the one they prefer; happy to close #2442 if folks would rather keep the diff UI-only at this stage. |
Have approved your PR and moved this one to draft. I think it makes sense to have diff logic in calm-models, and the test cases have been devised by making Copilot (with different models) repeatedly think of missing edge cases so they are pretty solid. I am confident the diff logic should be reliable. |
First step towards addressing #2289.
Description
CALM Hub UI Diff Feature Plan
Aim
Build a battle-ready CALM architecture diff experience in
calm-hub-uithat can compare two architecture JSON files and identify:unique-idchanged but the node/relationship is otherwise unchangedDone so far
src/model/diff.tssrc/service/diff-service.tssrc/fixtures/diff-test-architectures.jsonsrc/service/diff-service.test.tsunique-idhandling or invalid shapes/diffroute insrc/App.tsxDiff.tsxcontainer pageDiffGraphPanel.tsxfor side-by-side architecture graphsDiffPanel.tsxfor diff summary and detailsparseCALMData()and node/edge rendering to support diff status stylingWhat is left
Screenshots:
Type of Change
Affected Components
cli/)calm/)calm-ai/)calm-hub/)calm-hub-ui/)calm-server/)calm-widgets/)docs/)shared/)calm-plugins/vscode/)Commit Message Format ✅
Testing
Checklist