Add canonical canvas edits, identity migration and idempotent resource/AI operations #19

Merged
Zayden-Jung merged 49 commits from codex/headless-canvas-v1 into main 2026-11-11 14:53:34 +00:00
Showing only changes of commit 31258b995f - Show all commits
@@ -275,8 +275,8 @@ func TestCanonicalModelMigrationAndIncrementalLifecycle(t *testing.T) {
modelChange{Kind: "element", ID: memberID, Before: modelJSON(nil), After: modelJSON(member)})
model = read()
oldGeometry := model.Elements[innerFrame]["geometry"]
geometry := oldGeometry.(map[string]any)
normalizedGeometry := response{"x": (geometry["x"].(float64) - 24) / 2, "y": (geometry["y"].(float64) - 36) / 2, "width": geometry["width"].(float64) / 2, "height": geometry["height"].(float64) / 2, "rotation": geometry["rotation"]}
containerGeometry := oldGeometry.(map[string]any)
normalizedGeometry := response{"x": (containerGeometry["x"].(float64) - 24) / 2, "y": (containerGeometry["y"].(float64) - 36) / 2, "width": containerGeometry["width"].(float64) / 2, "height": containerGeometry["height"].(float64) / 2, "rotation": containerGeometry["rotation"]}
normalizedPresentation := response{"contentScale": .75, "unitScale": .5, "future": response{"keep": "metadata"}}
movedInner := inner
movedInner.Parent = &modelParent{CanvasID: newCanvas, EntryElementID: innerFrame}