Repository navigation
Anchor ERD relationships to attribute rows (closes #5) - #11
Merged
Merged
Conversation
Relationships were drawn entity-box to entity-box, so with composite keys or multiple relationships between the same pair the diagram said nothing about which columns actually join. They now anchor to the concrete attribute rows. - EntityNode renders a per-attribute source+target Handle keyed by the attribute ULID, plus reserved entity-level fallback handles (__entity_source/target) so an unmapped relationship still renders header-to-header exactly as before. - ModelCanvas.anchorFor() maps each relationship end to its attribute handle when the attribute resolves on that entity, else the fallback — a per-end decision. - Composite keys draw as ONE line anchored to the first member with a "(N)" count (IDEF1X-style), not N overlapping crow's-feet. Parallel relationships between the same pair now separate onto their own rows via distinct handles. - Hovering an attribute highlights the relationships it joins and dims the rest; hovering an edge emphasises both endpoint rows — folded into the existing dimmed/highlighted data-flow, no re-layout. - FK/relationship-endpoint attributes are pinned below the business keys so the anchored endpoints stay visible on tall cards. - Dragging column→column prefills the relationship modal with both attributes (from_attribute/to_attribute), reusing the existing create_relationship payload. Frontend only — the model already carried from/to attribute ULIDs, and create_relationship already accepted per-column attributes; the issue's assumed metadata dependency was already satisfied. Verified end to end in the browser against the ibor demo (row anchoring, attribute-hover highlight+dim, per-row connect ports). tsc + vite build clean (Node 20); works in both the architect canvas and SME ModelWorkspace since both mount ModelCanvas.
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.
Relationships were drawn entity-box to entity-box, so with composite keys or multiple relationships between the same pair the diagram said nothing about which columns actually join. They now anchor to the concrete attribute rows.
Frontend only — the model already carried from/to attribute ULIDs, and create_relationship already accepted per-column attributes; the issue's assumed metadata dependency was already satisfied. Verified end to end in the browser against the ibor demo (row anchoring, attribute-hover highlight+dim, per-row connect ports). tsc + vite build clean (Node 20); works in both the architect canvas and SME ModelWorkspace since both mount ModelCanvas.
What this changes
How it was tested
Checklist
uv run pytest)uv run ruff check packages/)