From 48a376f211fca286a3f4029d3f31d45a9add7882 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 18 Oct 2026 19:18:33 +0900 Subject: [PATCH] =?UTF-8?q?fix(445=20B06=20=EA=B4=80=20=ED=8F=BC):=20?= =?UTF-8?q?=EA=B4=80=20=EC=B4=88=EC=95=88=EC=97=90=20=EA=B4=80=20id=20?= =?UTF-8?q?=EC=8B=A4=EC=9D=8C=20=E2=80=94=20=EC=98=AE=EA=B8=B4=20=EA=B4=80?= =?UTF-8?q?=20=EC=B8=A1=EC=A0=90=EC=9D=B4=20=EC=95=9E=20=EC=84=A4=EA=B3=84?= =?UTF-8?q?(=EC=A7=80=EB=B0=98=20=C2=B7=20=EB=A9=94=EB=AA=A8=20=C2=B7=20?= =?UTF-8?q?=EC=A1=B0=EC=A0=88)=EB=A5=BC=20=EC=9E=83=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EA=B2=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - B06 구조물 패널이 관 초안을 쓸 때 id 를 빠뜨려 측점 열쇠가 pipe: → pipe:pipe-<누가거리> 로 바뀜 · 갈아끼움이 앞 횡단을 못 찾아 새 기본 설계(리핑암 · 메모 없음)로 섬(화면 실측 관 351 → 356) - PipeFacilityItem 에 id · 불러올 때 · 초안 쓸 때 실음(B05 초안과 같은 꼴) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013QyNXY2TUKXCFMwAca2APG --- B05_Profile/B05_Profile_UI_Structures_Panel_Types.ts | 2 ++ B06_Section/B06_Section_UI_Page_Structures_Panel.ts | 2 ++ resources/tester/test_445_save_patch.py | 12 ++++++++++++ 3 files changed, 16 insertions(+) diff --git a/B05_Profile/B05_Profile_UI_Structures_Panel_Types.ts b/B05_Profile/B05_Profile_UI_Structures_Panel_Types.ts index 36db77ddf..2e4734543 100644 --- a/B05_Profile/B05_Profile_UI_Structures_Panel_Types.ts +++ b/B05_Profile/B05_Profile_UI_Structures_Panel_Types.ts @@ -100,6 +100,8 @@ export const DEFAULT_INTERVAL_LENGTH_M = 15; /** 계곡 통과 시설 1건 — 관 지점 정본에서 온 병합 표시·폼 편집용 항목. */ export interface PipeFacilityItem { + /** 관 고정 id(측점 열쇠 `pipe:` · 옮겨도 그대로 — 초안에 안 실으면 옮긴 측점이 앞 설계를 잃음 · 445 H2). */ + id?: string | null; chainage_m: number; facility: PipeFacility; start_m?: number; diff --git a/B06_Section/B06_Section_UI_Page_Structures_Panel.ts b/B06_Section/B06_Section_UI_Page_Structures_Panel.ts index 42d898bde..eef1873f8 100644 --- a/B06_Section/B06_Section_UI_Page_Structures_Panel.ts +++ b/B06_Section/B06_Section_UI_Page_Structures_Panel.ts @@ -408,6 +408,7 @@ export function createB06StructuresPanel(deps: B06StructuresPanelDeps): B06Struc // 이래야 B05 에서 넣고 B06 으로 넘어와도 같은 목록이 보인다(2026-09-12 사용자). const pendingPipes = readPendingPipes(projectId); pipeFacilities = (pendingPipes ?? pipeResponse.pipe_points).map((pipe) => ({ + id: pipe.id, // 측점 열쇠 `pipe:` — 초안까지 들고 감(445 H2) chainage_m: pipe.chainage_m, facility: pipe.facility ?? "pipe", start_m: pipe.start_m, @@ -496,6 +497,7 @@ export function createB06StructuresPanel(deps: B06StructuresPanelDeps): B06Struc writePendingPipes( deps.projectId, pipeFacilities.map((pipe) => ({ + ...(pipe.id ? { id: pipe.id } : {}), // B05 초안과 같은 꼴(445 H2) chainage_m: pipe.chainage_m, source: pipe.source ?? "user", facility: pipe.facility, diff --git a/resources/tester/test_445_save_patch.py b/resources/tester/test_445_save_patch.py index 5efa33002..c95e83dc8 100644 --- a/resources/tester/test_445_save_patch.py +++ b/resources/tester/test_445_save_patch.py @@ -249,3 +249,15 @@ def test_H5_노선_저장_뒤_본문_M7_kindreset_옮김(): assert 'writeState("kindreset", rekey("revetx", resets), projectId)' in carry idle = keys[keys.index("function moveIdleStates") :] assert 'writeState("kindreset", move(resets), projectId)' in idle + + +def test_H2_B06_관_폼_초안이_관_id_를_실음(): + """B06 관 폼이 초안에 관 id 를 빠뜨리면 측점 열쇠가 `pipe:p…` → `pipe:pipe-356.00` 으로 바뀌어 + 옮긴 측점이 앞 설계(지반 · 메모 · 조절)를 잃음 — 화면 실측(관 351 → 356).""" + panel = (ROOT / "B06_Section" / "B06_Section_UI_Page_Structures_Panel.ts").read_text( + encoding="utf-8" + ) + load = panel[panel.index("pipeFacilities = (pendingPipes ?? pipeResponse.pipe_points)") :] + assert "id: pipe.id" in load[:200] + persist = panel[panel.index("function persistPipes") :] + assert "...(pipe.id ? { id: pipe.id } : {})" in persist[:400]