Repository navigation
feat(studio): metamodel diagram in the metamodel editor - #116
Merged
Merged
Conversation
The metamodel editor gets a List / Diagram switch. The Diagram tab draws the metamodel itself: node types as boxes (colour, icon, properties) in a frame per palette category, containment and every relation type as edges that end on the types they connect, with the relation name on each edge. - Placement is Smart Layout followed by the live WebCoLa physics, the same pipeline as the model canvas; edges use the canvas's port allocation and routing. The physics has a time budget because it does not always converge with nested groups. - The legend filters edge kinds; a narrowed filter keeps and lays out only the types the shown edges connect. - Clicking a type dims everything it is not connected to and frames it; clicking a relation shows only its sources and targets. The inspector lists parents, children, relations and properties, and "Edit type" opens the card in the list. - Node type categories move to @radical/common/metamodel/categories.ts and the Elements palette uses them too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hines ReactFlow 11 rebuilds its node state from the node objects it is given and does not keep the measured size. The diagram hands it new nodes every physics frame without width/height, so ReactFlow hid the boxes and skipped their edges until it measured them again; on a slow CI runner the last frame stayed that way (16 nodes, 0 edges). Every node now carries the size the layout already knows. - e2e: a CPU-throttled run (6x) reproduces the bug; it fails without the fix. - e2e: read the overview zoom only after the post-physics fit has finished. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
The metamodel editor gets a List / Diagram switch. The Diagram tab draws the metamodel itself:
LiveColaLayoutsettles from those positions). Edges use the canvas'sallocatePorts+computeRoutedEdge.Node type categories move to
packages/common/src/metamodel/categories.ts; the Elements palette (RightPanel.tsx) uses them too, so both stay in step.Notes
known-issues.spec.ts.fitBoundson the known frame geometry instead offitView:fitViewreturns false while the physics replaces the nodes every frame.apps/studionow declares@radical/layout(it imports Smart Layout's core and the edge routing directly).docs/IMPROVEMENTS.md→ "Metamodel diagram".Tests
apps/studio/tests/metamodelGraph.test.ts(15): graph rules, categories, filters, Smart Layout input, positions taken unchanged, no overlapping boxes / frames.apps/e2e/tests/studio/metamodel-diagram.spec.ts(2): types, categories, labels, no overlaps after the physics, Contains / properties defaults, filters, relation-only view, framing on selection, inspector → Edit.check:workspacesclean.🤖 Generated with Claude Code