fix(854-3): M01 화면에 들어올 때 상세 부품 길을 M01 기본으로 되돌림

- M02 단가산출이 바꿔 둔 상세 부품 길(/m02/logic-lib)이 같은 탭에서 M01 로 가도 남아, M01 로직 목록 · 읽기가 M02 길로 가던 것 (M01 열 묶음 · 작업량 · 부모 · 관련 · 지문 칸이 M02 답엔 없음 · 로직 입력 · 개정 칸도 다름)
- renderM01MasterData 처음에 setLogicApiPaths() 한 줄
- 시험 test_854_3_screen_leak 에 M01 진입 뒤 길 = /m01 점검

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 17:35:34 +09:00
co-authored by Claude Sonnet 5.5
parent bf407c49d1
commit a02bd5b436
2 changed files with 9 additions and 1 deletions
+2
View File
@@ -32,6 +32,7 @@ import { fetchSessionUser } from "../A06_Login/A06_Login_Api_Fetch";
import { saveFiles, type FileInfo } from "./M01_MasterData_Api_Fetch";
import { discard, isStale, onDraftChange, payload, totalCount } from "./M01_MasterData_Draft";
import { buildHeadBar, buildHeadFilters } from "./M01_MasterData_UI_Head";
import { setLogicApiPaths } from "./M01_MasterData_UI_Logic_Api";
import { renderRows } from "./M01_MasterData_UI_Rows";
import { renderMachines } from "./M01_MasterData_UI_Machine";
import { openMachineDetail } from "./M01_MasterData_UI_MachineDetail";
@@ -69,6 +70,7 @@ let lastLogic: LogicHandle | null = null;
export async function renderM01MasterData(root: HTMLElement): Promise<void> {
lastLogic?.destroy(); // 지난 화면의 줄 쌓기 창 크기 듣기 해제
lastLogic = null;
setLogicApiPaths(); // M02 단가산출이 바꿔 둔 상세 부품 길 → M01 기본 길로
const user = await fetchSessionUser().catch(() => null);
if (user?.role !== "SYSTEM_ADMIN") {
showToast(L("M01_AdminOnly"), "error");
+7 -1
View File
@@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
"""PLAN 854-3 — 줄 쌓기 창 크기 듣기 해제(가짜 DOM · 진짜 코드).
"""PLAN 854-3 — 줄 쌓기 창 크기 듣기 해제 · M01 상세 길 되돌림(가짜 DOM · 진짜 코드).
① 줄 쌓기 화면 · M02 단가산출 그릇 = 열고 닫기를 다섯 번 되풀이해도 열린 동안 하나 · 닫으면 0
② M02 가 상세 길을 M02 로 바꿔 둔 뒤 M01 화면에 들어오면 M01 기본 길(`/m01`)
"""
from __future__ import annotations
@@ -28,3 +29,8 @@ def test_listeners_do_not_grow_and_m01_path_returns() -> None:
got = _run()
assert got["screen"] == [1, 0] * 5
assert got["tabs"] == [1, 0] * 5
def test_m01_entry_resets_logic_api_paths() -> None:
# M02 단가산출이 상세 길을 M02 로 바꿔 둔 뒤 M01 화면에 들어오면 M01 기본 길
assert _run()["page"] == {"before": "/m02/logic-lib", "after": "/m01"}