Skip to content

fix(model-editor): resolve relationship names for MCP-created elements#80

Merged
victorsoriadrp merged 1 commit into
mainfrom
fix/model-editor-relationship-names
May 7, 2026
Merged

fix(model-editor): resolve relationship names for MCP-created elements#80
victorsoriadrp merged 1 commit into
mainfrom
fix/model-editor-relationship-names

Conversation

@victorsoriadrp

Copy link
Copy Markdown
Contributor

Summary

  • elementsById was indexed by source_id only, which works for AOEF-imported elements (where source_element references the ArchiMate identifier) but not for MCP-created elements (where source_element references the database UUID)
  • Fix: index by both id and source_id so lookups work regardless of origin

Test plan

  • Open Model Editor on a workspace created via MCP — relationships should show element names, not UUIDs
  • Open Model Editor on an AOEF-imported workspace (e.g. Archisurance) — relationships should still show element names correctly

…reated elements

Elements created via MCP use their UUID as the relationship source/target reference,
while AOEF-imported elements use their source_id (the original ArchiMate identifier).
Index elementsById by both id and source_id so lookups work in both cases.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying archipulse with  Cloudflare Pages  Cloudflare Pages

Latest commit: e030c59
Status: ✅  Deploy successful!
Preview URL: https://eb90cbc5.archipulse.pages.dev
Branch Preview URL: https://fix-model-editor-relationshi.archipulse.pages.dev

View logs

@victorsoriadrp victorsoriadrp merged commit 4f1b4de into main May 7, 2026
2 checks passed
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