feat(canvas): native field preservation, label materialization, batch workspace delete (#12)

* feat(canvas): native field preservation, label materialization, batch workspace delete

- fillNativeFields() + repairContainerBinding() in db layer ensure every
  element stored in SQLite is a complete, round-trippable Excalidraw element
  with correct containerId ↔ boundElements bidirectional binding
- materializeLabel() in server.ts: shapes with label.text/text produce a
  native bound text element at write time (create, update, batch) so text
  follows its container when moved — matches VSCode Excalidraw extension behavior
- Batch workspace UI: Select/Unselect All, per-row checkboxes, Delete N
  workspaces button with confirmation
- POST /api/tenants/batch-delete: delete up to 50 tenants in one request
- 42 new backend tests; 519 total passing
- Bump version 1.0.6 → 1.1.0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(tests): update e2e assertions for label materialization

phase2-regressions: label is now a native bound text element
(id: pos-stable-1-label) — check bound text element text instead
of container.label?.text which is no longer stored.

sync-flows FTS: search now matches the bound text element (fts-el-label)
rather than the container — accept either id as valid match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Maxime Roy (new.blacc)
2026-04-06 21:12:01 +02:00
committed by GitHub
co-authored by Claude Sonnet 4.6
parent d14d767c75
commit 9846e0ba0f
14 changed files with 1388 additions and 74 deletions
+22
View File
@@ -5,6 +5,28 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Unreleased]
## [1.1.0] - 2026-04-06
### Added
- Batch workspace select/delete UI: Select/Unselect All, per-row checkboxes,
Delete N workspaces button with confirmation — active workspace is disabled
from selection
- `POST /api/tenants/batch-delete` endpoint — delete up to 50 tenants in one
request with per-tenant cascade (projects, elements, snapshots)
- `fillNativeFields()` in db layer — fills all universal and type-specific
native Excalidraw fields (angle, strokeColor, roundness, seed, etc.) on
every write so elements are identical to those produced by the VSCode
Excalidraw extension
- `repairContainerBinding()` in db layer — enforces bidirectional
`containerId``boundElements` binding on every write path (create, update,
batch, sync/v2) so text labels always follow their container when moved
- Server-side label materialization (`materializeLabel` in server.ts): MCP
`create_element`/`update_element` calls with `label.text` or `text` on a
shape now produce a native bound text element in the DB instead of an MCP
label stub — no synthetic generation required on export
- 42 new backend non-regression tests for native field preservation, container
binding repair, and label materialization (519 total)
## [1.0.6] - 2026-04-06
### Added