7ad0e11873
Three fixes: 1. interaction/index.ts: Add layerId to created element in confirmDraw() 2. CanvasArea.tsx: Sync layers to LayerManager via layerManagerRef 3. App.tsx: Fallback to activeLayerId in handleElementCreated if layerId missing Root cause: LayerManager.activeLayerId was empty because layers were never synced from React state to the interaction layer LayerManager. New elements got layer_id="" which failed SQLite FOREIGN KEY constraint. Also includes Yjs sync race condition fix from previous commit.