mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-23 00:20:40 +07:00
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:
1 parent
a0a1451272
commit
150ef90c73
8 files changed
+235
-41
No files matched your search
@@ -66,7 +66,7 @@
|
||||
"mergeHint": "written to the branch — merge into master to deploy",
|
||||
"offline": "offline — showing bundled content, save disabled",
|
||||
"draftRestored": "draft restored from this session",
|
||||
"unionNote": "new ids are also appended to src/types/index.ts",
|
||||
"unionNote": "id unions in src/types/index.ts updated to match the saved content",
|
||||
"unionFailed": "could not update src/types/index.ts — finish that edit in Gitea",
|
||||
"appearsHome": "home",
|
||||
"appearsResume": "resume PDF",
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user