From 1eb9c0f0b7dca7e0e78faadab0072618de6199fb Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 17 Oct 2026 17:35:48 +0900 Subject: [PATCH] =?UTF-8?q?fix(388-1=20=EB=B3=B4=EC=95=88):=20=EA=B3=84?= =?UTF-8?q?=EC=A0=95=20=EB=B0=94=EB=80=9C=20=ED=8C=90=EC=A0=95=20=E2=80=94?= =?UTF-8?q?=20=EC=88=98=20id=20=EB=A5=BC=20=EA=B8=80=EB=A1=9C=20=EA=B2=AC?= =?UTF-8?q?=EC=A4=8C(=EC=83=88=EB=A1=9C=EA=B3=A0=EC=B9=A8=20=EB=90=98?= =?UTF-8?q?=ED=92=80=EC=9D=B4=20=EB=A7=89=EC=9D=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 서버 사용자 id 가 수(3)로 와 저장값 "3" 과 늘 달라 지움 · 새로고침이 되풀이됨 - String() 으로 같은 꼴 견줌 · 시험에 수 id 경우 더함 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VmC34fsxxbweEG3RUjs3Mn --- A00_Common/b_project_switch.ts | 3 ++- resources/tester/helper_384_s_session.cjs | 3 +++ resources/tester/test_384_s_logout_wipe.py | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/A00_Common/b_project_switch.ts b/A00_Common/b_project_switch.ts index 616cd37d4..91f3fd032 100644 --- a/A00_Common/b_project_switch.ts +++ b/A00_Common/b_project_switch.ts @@ -140,7 +140,8 @@ export async function wipeAccountCache(): Promise { } /** 로그인 확인 때 — 앞서 자료를 남긴 계정과 다르면 지우고 true(부른 쪽이 새로고침). */ -export async function wipeIfOwnerChanged(userId: string): Promise { +export async function wipeIfOwnerChanged(user: string | number): Promise { + const userId = String(user); // 서버 id 가 수로 옴 — 저장값(글)과 같은 꼴로 견줌 let previous: string | null = null; try { previous = window.localStorage.getItem(OWNER_KEY); diff --git a/resources/tester/helper_384_s_session.cjs b/resources/tester/helper_384_s_session.cjs index 8f988a40e..3ac1a5d05 100644 --- a/resources/tester/helper_384_s_session.cjs +++ b/resources/tester/helper_384_s_session.cjs @@ -100,6 +100,9 @@ const tick = () => new Promise((r) => setTimeout(r, 0)); out.owner.otherKeys = sessionKeys().length; out.owner.otherProject = local("frd_current_project_id"); out.owner.stored = local("aislo:owner"); + // 서버 id 가 수로 옴 — 같은 계정 수 id 는 두 번째에 안 지움(새로고침 되풀이 막음) + await sw.wipeIfOwnerChanged(3); + out.owner.numericAgain = await sw.wipeIfOwnerChanged(3); // 세션 넘침 — 결과 칸 비우고 다시 · 그래도 넘치면 안내 global.window.sessionStorage = fakeStorage(400); diff --git a/resources/tester/test_384_s_logout_wipe.py b/resources/tester/test_384_s_logout_wipe.py index 1d29b37c6..9f6d53d95 100644 --- a/resources/tester/test_384_s_logout_wipe.py +++ b/resources/tester/test_384_s_logout_wipe.py @@ -44,6 +44,7 @@ def test_계정_바뀜_지움(out): assert owner["same"] is False and owner["sameKeys"] == 4 assert owner["other"] is True and owner["otherKeys"] == 0 assert owner["otherProject"] is None and owner["stored"] == "u2" + assert owner["numericAgain"] is False # 수 id 3 == 저장 "3" def test_세션_넘침_결과_비우고_다시(out):