From 276411712045a37384a48949dd700108fae9c6bc Mon Sep 17 00:00:00 2001 From: umsangdon Date: Fri, 16 Oct 2026 12:34:14 +0900 Subject: [PATCH] =?UTF-8?q?fix(=EC=A2=85=EB=8B=A8=EB=B3=B4=EA=B8=B0):=2034?= =?UTF-8?q?6-3=20=EB=8D=A7=20[=EC=A0=80=EC=9E=A5]=20=EB=92=A4=20=E3=80=8C?= =?UTF-8?q?=EB=85=B8=EC=84=A0=20=EB=B0=96=20=EA=B3=A0=EC=B9=A8=E3=80=8D=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC=20=EB=91=90=20=EC=A4=84=20=E2=86=92=20?= =?UTF-8?q?=ED=95=9C=20=EC=A4=84=20=E2=80=94=20carryStationDrafts=20?= =?UTF-8?q?=EC=A1=B0=EC=9A=A9=ED=9E=88=20=EA=BC=B4(quiet=20=C2=B7=20?= =?UTF-8?q?=EA=B8=B0=EB=B3=B8=EC=9D=80=20=EC=95=8C=EB=A6=BC=20=EA=B7=B8?= =?UTF-8?q?=EB=8C=80=EB=A1=9C)=20=C2=B7=20=EC=88=98=EB=8A=94=20=EA=B2=B0?= =?UTF-8?q?=EA=B3=BC=20=ED=95=9C=20=EC=A4=84=EC=97=90=20=ED=95=A9=EC=B9=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 시험: test_346_3_route_save_screen 9 · 관련 97 통과 · typecheck 통과 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VmC34fsxxbweEG3RUjs3Mn --- B05_Profile/B05_Profile_UI_RouteEdit_Apply.ts | 2 +- B06_Section/B06_Section_Station_Keys.ts | 4 ++- resources/tester/helper_346_3_route_save.cjs | 5 +++- .../tester/test_346_3_route_save_screen.py | 30 ++++++++++++++++++- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/B05_Profile/B05_Profile_UI_RouteEdit_Apply.ts b/B05_Profile/B05_Profile_UI_RouteEdit_Apply.ts index 38a350737..bd43901b7 100644 --- a/B05_Profile/B05_Profile_UI_RouteEdit_Apply.ts +++ b/B05_Profile/B05_Profile_UI_RouteEdit_Apply.ts @@ -150,7 +150,7 @@ export async function carryAfterRouteSave( invalidateSectionDetail(projectId, toRouteId); const detail = await loadSectionDetail(projectId, toRouteId); useStationKeys(projectId, toRouteId, detail); - const outside = carryStationDrafts(projectId, fromRouteId, toRouteId); + const outside = carryStationDrafts(projectId, fromRouteId, toRouteId, { quiet: true }); await saveCachedCrossPatches(projectId, toRouteId); return outside; } diff --git a/B06_Section/B06_Section_Station_Keys.ts b/B06_Section/B06_Section_Station_Keys.ts index 6710c8db1..f6c1cb6ae 100644 --- a/B06_Section/B06_Section_Station_Keys.ts +++ b/B06_Section/B06_Section_Station_Keys.ts @@ -273,11 +273,13 @@ export function writeKeyed( * 노선이 바뀜(새 측점 목록을 `useStationKeys` 로 세운 뒤) — 옛 노선 고침을 측점 열쇠로 새 노선에 넘김. * 넘김 = 카드 선택 넷(지반 유형 · 측구 종류 · 측구 선택 · 2단 경사) · 암 경계 · 암 경사 · 단면 유형 · 측구 * 방향은 새 지형이 정함 · 노견 확장 · 소단 깊이는 안 넘김. 돌려주는 값 = 노선 밖으로 나간 고침 수(측점 단위). + * `quiet` = 알림 없이 수만 돌려줌(부르는 쪽이 결과 한 줄에 합칠 때). */ export function carryStationDrafts( projectId: string, fromRouteId: number, toRouteId: number, + { quiet = false }: { quiet?: boolean } = {}, ): number { const outside = new Set(); for (const name of KEYED_STATES) { @@ -301,7 +303,7 @@ export function carryStationDrafts( } writeState(name, next, projectId, toRouteId); } - if (outside.size) + if (outside.size && !quiet) showToast(`노선 밖 고침 ${outside.size} 건 — 사라진 측점이라 버렸습니다.`, "info"); return outside.size; } diff --git a/resources/tester/helper_346_3_route_save.cjs b/resources/tester/helper_346_3_route_save.cjs index 9cd166030..149d689b1 100644 --- a/resources/tester/helper_346_3_route_save.cjs +++ b/resources/tester/helper_346_3_route_save.cjs @@ -43,7 +43,10 @@ const STUBS = { }, "../B06_Section/B06_Section_Station_Keys": { useStationKeys: (_p, routeId, detail) => calls.push(`keys:${routeId}:${detail.tag}`), - carryStationDrafts: (_p, from, to) => (calls.push(`carry:${from}->${to}`), 2), + carryStationDrafts: (_p, from, to, opts) => ( + calls.push(`carry:${from}->${to}${opts?.quiet ? ":quiet" : ""}`), + 2 + ), }, "./B05_Profile_Api_Fetch": { clearRouteLatestCache: () => calls.push("latest:clear") }, "./B05_Profile_Api_Replan": { diff --git a/resources/tester/test_346_3_route_save_screen.py b/resources/tester/test_346_3_route_save_screen.py index 154d25cb4..850545e9c 100644 --- a/resources/tester/test_346_3_route_save_screen.py +++ b/resources/tester/test_346_3_route_save_screen.py @@ -72,7 +72,13 @@ def test_저장_뒤_가게_초안_비움_결과_한_줄(out): def test_초안_넘김_차례(out): - assert out["carryCalls"] == ["invalidate:9", "load:9", "keys:9:9", "carry:7->9", "crossSave:9"] + assert out["carryCalls"] == [ + "invalidate:9", + "load:9", + "keys:9:9", + "carry:7->9:quiet", + "crossSave:9", + ] assert out["outside"] == 2 @@ -107,3 +113,25 @@ def test_노선_반영_단추_없앰_배선(): assert "saveRecommendedRoute(" in initial[at : at + 900] replan = _read("B05_Profile/B05_Profile_Api_Replan.ts") assert "body: JSON.stringify(body)" in replan and "as_initial?: boolean;" in replan + + +def test_넘김_알림은_결과_한_줄에_합침(): + """346-3 덧 — [저장] 뒤 「노선 밖 고침」 두 줄 → 한 줄 · 넘김은 조용히 수만 · 기본은 알림 그대로.""" + keys = _read("B06_Section/B06_Section_Station_Keys.ts") + assert "{ quiet = false }: { quiet?: boolean } = {}," in keys + assert "if (outside.size && !quiet)" in keys + apply = _read("B05_Profile/B05_Profile_UI_RouteEdit_Apply.ts") + assert "carryStationDrafts(projectId, fromRouteId, toRouteId, { quiet: true })" in apply + + +def test_노선_반영_글자_없음(): + recommend = _read("B05_Profile/B05_Profile_UI_Panel_Recommend.ts") + assert "노선 반영" not in recommend and "다시 계산은 [저장]에서" in recommend + for rel in ( + "B05_Profile/B05_Profile_UI_RouteEdit.ts", + "B05_Profile/B05_Profile_UI_RouteEdit_History.ts", + "B05_Profile/B05_Profile_UI_RouteEdit_Draft.ts", + "A00_Common/design/design_view_profile.ts", + ): + text = _read(rel) + assert "[노선 반영]" not in text and "[반영 전으로]" not in text, rel