fix(network): persist group node type, size, and child parentId on save/load

Backend DiagramNode schema was missing nodeType, style, and parentId fields —
Pydantic stripped them on save, so group nodes lost their identity on reload
and re-appeared as small device icons.

- Backend: add nodeType, style (NodeStyle), parentId to DiagramNode schema
- Frontend: serialize parentId for device nodes inside groups
- Frontend: restore parentId + extent:'parent' on both deserializer paths (setNodes + history init)
- Frontend: add parentId to DiagramNode interface

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-04-13 23:49:26 +00:00
parent e41d7bd960
commit 4a12c9b37d
3 changed files with 12 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ export interface DiagramNode {
properties: DeviceProperties
nodeType?: string
style?: { width?: number; height?: number } | null
parentId?: string | null
}
export interface DiagramEdge {