From 1fa5717fcaabe9bc144166e809db51f45e20dda4 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 17 Oct 2026 17:56:49 +0900 Subject: [PATCH] =?UTF-8?q?fix(388-3=20=EB=B3=B4=EC=95=88):=20=EC=84=B8?= =?UTF-8?q?=EC=85=98=20=EB=84=98=EC=B9=A8=20=EC=95=88=EB=82=B4=20=E2=80=94?= =?UTF-8?q?=20=ED=99=94=EB=A9=B4=20=EB=AA=A8=EB=93=88=EC=9D=84=20=EC=95=88?= =?UTF-8?q?=EC=97=90=EC=84=9C=EB=A7=8C=20=EA=B0=80=EC=A0=B8=EC=98=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - b_page_state 맨 위 로케일 가져오기가 이 파일을 Node 로 돌리는 시험(346-4 등)을 깨던 것 - 넘침 안내 때만 토스트 · 로케일을 함께 동적으로 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VmC34fsxxbweEG3RUjs3Mn --- A00_Common/b_page_state.ts | 7 +++---- resources/tester/helper_384_s_session.cjs | 9 ++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/A00_Common/b_page_state.ts b/A00_Common/b_page_state.ts index ae1575192..b5b583ffc 100644 --- a/A00_Common/b_page_state.ts +++ b/A00_Common/b_page_state.ts @@ -21,8 +21,6 @@ * 않는다** — ②·④는 두 화면이 같은 키를 쓴다. * ========================================================================== */ -import { t } from "@ui/ui_template_locale"; - /** 값이 속한 통. `pref`·`draft`·`result` 셋만 저장소를 쓴다(즉시 반영은 표에 없다). */ export type StateBucket = "pref" | "draft" | "result"; @@ -457,8 +455,9 @@ function setOrMakeRoom(store: Storage, key: string, value: string): void { try { store.setItem(key, value); } catch (error) { - void import("@ui/ui_template_elements").then(({ showToast }) => - showToast(t("Session_Storage_Full"), "warning", 8000), + // 화면 모듈은 안에서만 — 이 파일을 Node 로 돌리는 시험 · 묶음이 안 끌게 + void Promise.all([import("@ui/ui_template_elements"), import("@ui/ui_template_locale")]).then( + ([{ showToast }, { t }]) => showToast(t("Session_Storage_Full"), "warning", 8000), ); throw error; } diff --git a/resources/tester/helper_384_s_session.cjs b/resources/tester/helper_384_s_session.cjs index 3ac1a5d05..e16d6c389 100644 --- a/resources/tester/helper_384_s_session.cjs +++ b/resources/tester/helper_384_s_session.cjs @@ -45,11 +45,10 @@ function fakeStorage(limit = Infinity) { global.window = { sessionStorage: fakeStorage(), localStorage: fakeStorage() }; const toasts = []; -const pageState = load("A00_Common/b_page_state.ts", (id) => - id.includes("ui_template_locale") - ? { t: (key) => key } - : { showToast: (msg, kind) => toasts.push([msg, kind]) }, -); +const pageState = load("A00_Common/b_page_state.ts", () => ({ + t: (key) => key, + showToast: (msg, kind) => toasts.push([msg, kind]), +})); const purged = []; const config = { CURRENT_PROJECT_ID_KEY: "frd_current_project_id" }; const sw = load("A00_Common/b_project_switch.ts", (id) => {