feat: auto-position nodes and auto-assign edge handles on create

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Nicola Bottini
2026-07-09 16:30:26 -04:00
committed by Pouzor
parent 2d00be71bb
commit 27e18f1c96
4 changed files with 122 additions and 1 deletions
+4
View File
@@ -38,6 +38,10 @@ class NodeBase(BaseModel):
class NodeCreate(NodeBase):
# Override pos_x/pos_y so callers can omit them; None signals "auto-place".
# The create_node route resolves None to a free grid slot before persisting.
pos_x: float | None = None # type: ignore[assignment]
pos_y: float | None = None # type: ignore[assignment]
design_id: str | None = None
# When a node with the same ip/mac already exists on the target design, the
# create/approve endpoints reject with 409 so the UI can ask the user. Set