Skip to content

Add Sirius .aird view import (Phase 4)#15

Open
haphantran wants to merge 1 commit into
mainfrom
feature/sirius-aird-import
Open

Add Sirius .aird view import (Phase 4)#15
haphantran wants to merge 1 commit into
mainfrom
feature/sirius-aird-import

Conversation

@haphantran

Copy link
Copy Markdown
Collaborator

Summary

Imports Sirius .aird session/representation files into SpatialDSL views. Each DSemanticDiagram becomes a view whose elements resolve against an already-imported model and viewpoint, with GMF notation layout preserved. .aird export remains deferred (Phase 5).

Scope decisions

  • GMF layout parsing: node Bounds → element x/y/width/height; edge waypoints → points.
  • Require-already-imported: semantic targets resolve by xmi:id fragment then unique name; representation descriptions resolve against the supplied viewpoint. Unresolved/ambiguous refs are reported, never silently dropped.

Changes

  • Backend: parseAird/importAird in the Sirius interop service; POST /sirius/aird/import; aird dispatch in /sirius/validate.
  • Frontend: validateAird/importAird service methods + an "Import .aird View" action in the Viewpoint manager.
  • Fixtures/types/docs: fixtures/sirius/aird-layout/ with GMF notation; SiriusAird* shared types; updated docs/reference/sirius-file-compatibility.md and the parity roadmap.

Tests

  • Backend: 7 service tests (incl. a disk-fixture test) + 3 route tests.
  • Frontend: 2 service tests; full frontend suite (108) + backend tsc green.

Reviewer notes / caveats

  • Imported views surface after a reload — the backend creates the views, but the frontend diagram service has no public refresh (only a private init-time loadFromAPI). The success message says as much.
  • Model selection: when a metamodel has multiple imported models, the first is used (with a status note); no picker yet.
  • The full DB-backed backend suite was not run locally (no Postgres); it runs in CI.

Import Sirius .aird session/representation files into SpatialDSL views.
Each DSemanticDiagram becomes a view whose elements resolve against an
already-imported model (semantic targets by xmi:id fragment, then unique
name) and viewpoint (representation description by id/name). GMF
notation:Diagram layout is preserved: node Bounds map to element
x/y/width/height and edge waypoints map to points. Unresolved or
ambiguous references are reported, never silently dropped.

Backend: parseAird/importAird in the Sirius interop service, a
POST /sirius/aird/import route, and aird dispatch in /sirius/validate.
Frontend: validateAird/importAird service methods plus an "Import .aird
View" action in the Viewpoint manager (resolves the metamodel's model and
the selected viewpoint). Adds an aird-layout fixture with GMF notation,
shared SiriusAird* types, and backend/frontend tests.

Updates docs/reference/sirius-file-compatibility.md and the parity
roadmap for the new .aird import subset.
Copilot AI review requested due to automatic review settings June 25, 2026 13:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

2 participants