fix(edit): balance id unions when a record is deleted

Deleting a record in edit mode removed the structure row and its text but left the id union member in src/types/index.ts, so Record<SkillGroupId, SkillGroupText> rejected the shortened text document (TS2741) and pnpm build failed. draft.ts: readUnionBlock reads a union as its declaration span (CRLF/LF safe, never round-trips), diffIdsWithUnions reports missing and stale members against committedStructures(), applyUnionChanges rewrites only that member list in one PUT; newIdsInCommitted/patchUnionSource removed. types/index.ts drops logistics-technology. Verified: smoke-draft 12/12 (new checks 9-12), validate:content, lint (no new warnings), build.
This commit is contained in:
dong.nguyen committed 2026-10-24 10:08:58 +07:00
1 parent a0a1451272
commit 150ef90c73
8 files changed
+235 -41

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@
"mergeHint": "đã ghi lên branch — merge vào master để deploy",
"offline": "ngoại tuyến — đang hiển thị nội dung đóng gói, không lưu được",
"draftRestored": "bản nháp đã khôi phục từ phiên này",
"unionNote": "id mới cũng được thêm vào src/types/index.ts",
"unionNote": "các id union trong src/types/index.ts đã được cập nhật theo nội dung đã lưu",
"unionFailed": "không cập nhật được src/types/index.ts — hãy hoàn tất sửa trong Gitea",
"appearsHome": "Trang chủ",
"appearsResume": "CV PDF",