The editor built the circuit-group subtree snapshot without
manualQuantity, while the server compares it with an exact capture that
includes the column. Deleting any group that contained a device row was
therefore rejected with "Circuit-group subtree changed before deletion."
The new integration test builds the snapshot from the real circuit-tree
read model, as the editor does, and deletes the group for a manual row
and for a row with a Revit quantity share.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tsx runs tests without type checking and tsconfig.json covers only src,
so 71 type errors had accumulated unnoticed. tsconfig.tests.json now
checks every test and helper, and npm run typecheck includes it.
Fixtures gain the fields the DTOs have grown since they were written
(manualQuantity, circuit apparent power/cos phi, downstream board loads,
section totals, building, cover and board info fields). Repository
lookups that return "row ?? null" now declare the null in their type,
which their callers already handle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>