From c9cafa61365aaf625f17c4ea3172f60bc92add05 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 17 Oct 2026 17:44:10 +0900 Subject: [PATCH] =?UTF-8?q?fix(388-1=20=EB=B3=B4=EC=95=88):=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=95=84=EC=9B=83=20=EB=AC=BC=EC=9D=8C=20=E2=80=94=20?= =?UTF-8?q?=EC=A3=BC=EC=86=8C=20=EB=A8=BC=EC=A0=80=20=EC=98=AE=EA=B8=B4=20?= =?UTF-8?q?=EB=92=A4=20=EB=96=A0=EB=82=A8=20=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - B05 · B06 물음이 아직 같은 페이지로 보고 안 물어 초안 있는 채 바로 로그아웃되던 것 - 라우터처럼 주소를 홈으로 옮긴 뒤 물음 · [취소]면 주소 되돌림 - 화면: 초안 있는 채 로그아웃 → 확인창 · [취소] 머묾 · [폐기] 지움 · 밝음/어두움 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VmC34fsxxbweEG3RUjs3Mn --- A00_Common/app_shell.ts | 9 +++++++-- resources/tester/test_384_s_logout_wipe.py | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/A00_Common/app_shell.ts b/A00_Common/app_shell.ts index 6799c8064..791befddd 100644 --- a/A00_Common/app_shell.ts +++ b/A00_Common/app_shell.ts @@ -51,8 +51,14 @@ function onApp_Lang_Toggle_Click(): void { /** 로그아웃(388-1) — 떠남 확인 먼저 → 서버 로그아웃 → 이 브라우저 자료 지움 → 홈으로 새로고침. */ async function onApp_Logout_Click(): Promise { + // 물음은 라우터처럼 주소가 먼저 옮겨진 뒤 — 안 그러면 B05 · B06 물음이 「같은 페이지」로 보고 안 물음 + const back = window.location.hash; + history.replaceState(null, "", `#/${ROUTES.A01_HOME}`); // hashchange 없이 const guard = takeLeaveGuard(); - if (guard && !(await guard())) return; // [취소] — 머묾 + if (guard && !(await guard())) { + history.replaceState(null, "", back); // [취소] — 머묾 · 주소 되돌림 + return; + } setLeaveGuard(null); const { logout } = await import("../A06_Login/A06_Login_Api_Fetch"); try { @@ -62,7 +68,6 @@ async function onApp_Logout_Click(): Promise { } const { wipeAccountCache } = await import("./b_project_switch"); await wipeAccountCache(); - history.replaceState(null, "", `#/${ROUTES.A01_HOME}`); // hashchange 없이 — 바로 새로고침 window.location.reload(); } diff --git a/resources/tester/test_384_s_logout_wipe.py b/resources/tester/test_384_s_logout_wipe.py index 9f6d53d95..2b9da0ee9 100644 --- a/resources/tester/test_384_s_logout_wipe.py +++ b/resources/tester/test_384_s_logout_wipe.py @@ -65,8 +65,9 @@ def test_로그아웃_길_차례(): body = shell[shell.index("async function onApp_Logout_Click") :] body = body[: body.index("\n}\n")] order = [ - body.index(s) for s in ("takeLeaveGuard()", "logout()", "wipeAccountCache()", "reload()") - ] + body.index(s) + for s in ("replaceState(", "takeLeaveGuard()", "logout()", "wipeAccountCache()", "reload()") + ] # 주소 먼저 옮김 — B05 · B06 물음이 「같은 페이지」로 보고 안 묻는 일 막음 assert order == sorted(order) login = (ROOT / "A06_Login/A06_Login_Api_Fetch.ts").read_text(encoding="utf-8") assert "wipeIfOwnerChanged(data.user.id)" in login