From e5ebd26182853011305d75713b2799046f9b2235 Mon Sep 17 00:00:00 2001
From: kyy
Date: Wed, 1 Apr 2026 14:47:00 +0900
Subject: [PATCH] =?UTF-8?q?local=20=EB=B8=8C=EB=9F=B0=EC=B9=98=20code-chec?=
=?UTF-8?q?k=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/layout/AppLayout.tsx | 25 +++++++------------
.../src/components/layout/RoleSwitcher.tsx | 8 ++++--
adminfront/src/lib/sessionSliding.test.ts | 16 +++++++++---
adminfront/src/locales/template.toml | 2 ++
devfront/src/components/layout/AppLayout.tsx | 9 ++-----
devfront/src/lib/devApi.ts | 2 +-
devfront/src/locales/template.toml | 1 +
locales/en.toml | 5 ++++
locales/ko.toml | 5 ++++
locales/template.toml | 5 ++++
10 files changed, 48 insertions(+), 30 deletions(-)
diff --git a/adminfront/src/components/layout/AppLayout.tsx b/adminfront/src/components/layout/AppLayout.tsx
index caa86328..62a5e680 100644
--- a/adminfront/src/components/layout/AppLayout.tsx
+++ b/adminfront/src/components/layout/AppLayout.tsx
@@ -46,10 +46,9 @@ function AppLayout() {
const isMockRoleEnabled =
isDevRoleOverrideEnabled &&
window.localStorage.getItem("X-Mock-Role-Enabled") === "true";
- const mockRoleOverride =
- isMockRoleEnabled
- ? window.localStorage.getItem("X-Mock-Role")
- : null;
+ const mockRoleOverride = isMockRoleEnabled
+ ? window.localStorage.getItem("X-Mock-Role")
+ : null;
const [theme, setTheme] = useState<"light" | "dark">(() => {
const stored = window.localStorage.getItem("admin_theme");
return stored === "dark" ? "dark" : "light";
@@ -337,10 +336,7 @@ function AppLayout() {
const handleSessionExpiryToggle = () => {
setIsSessionExpiryEnabled((prev) => {
const next = !prev;
- window.localStorage.setItem(
- "baron_session_expiry_enabled",
- String(next),
- );
+ window.localStorage.setItem("baron_session_expiry_enabled", String(next));
return next;
});
};
@@ -413,10 +409,7 @@ function AppLayout() {
{t("ui.admin.header.plane", "ADMIN PLANE")}
- {t(
- "ui.admin.header.subtitle",
- "Manage your organization",
- )}
+ {t("ui.admin.header.subtitle", "Manage your organization")}
@@ -518,9 +511,7 @@ function AppLayout() {
onClick={handleSessionExpiryToggle}
className={[
"relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition",
- isSessionExpiryEnabled
- ? "bg-primary"
- : "bg-muted",
+ isSessionExpiryEnabled ? "bg-primary" : "bg-muted",
].join(" ")}
>
{
setIsProfileOpen(false);
- navigate(`/users/${profile?.id || auth.user?.profile.sub}`);
+ navigate(
+ `/users/${profile?.id || auth.user?.profile.sub}`,
+ );
}}
className="mt-2 flex w-full items-center gap-2 rounded-lg border border-border px-3 py-2 text-left text-sm text-foreground transition hover:bg-muted/20"
>
diff --git a/adminfront/src/components/layout/RoleSwitcher.tsx b/adminfront/src/components/layout/RoleSwitcher.tsx
index 3a63c2f9..ea6405cd 100644
--- a/adminfront/src/components/layout/RoleSwitcher.tsx
+++ b/adminfront/src/components/layout/RoleSwitcher.tsx
@@ -130,8 +130,12 @@ const RoleSwitcher: FC = () => {
alignItems: "center",
}}
>
- {t("ui.admin.dev_role_switcher_real", "실제 역할 사용")}
- {!isOverrideEnabled && ✅}
+
+ {t("ui.admin.dev_role_switcher_real", "실제 역할 사용")}
+
+ {!isOverrideEnabled && (
+ ✅
+ )}
{(["super_admin", "tenant_admin", "rp_admin", "user"] as const).map(
(role) => (
diff --git a/adminfront/src/lib/sessionSliding.test.ts b/adminfront/src/lib/sessionSliding.test.ts
index 7d7441e1..410ac63e 100644
--- a/adminfront/src/lib/sessionSliding.test.ts
+++ b/adminfront/src/lib/sessionSliding.test.ts
@@ -10,7 +10,9 @@ describe("shouldAttemptSlidingSessionRenew", () => {
it("returns false when remaining time is above the 5 minute threshold", () => {
expect(
shouldAttemptSlidingSessionRenew({
- expiresAtSec: Math.floor((nowMs + SESSION_RENEW_THRESHOLD_MS + 1_000) / 1000),
+ expiresAtSec: Math.floor(
+ (nowMs + SESSION_RENEW_THRESHOLD_MS + 1_000) / 1000,
+ ),
nowMs,
isEnabled: true,
isAuthenticated: true,
@@ -24,7 +26,9 @@ describe("shouldAttemptSlidingSessionRenew", () => {
it("returns true when remaining time is within the 5 minute threshold", () => {
expect(
shouldAttemptSlidingSessionRenew({
- expiresAtSec: Math.floor((nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000),
+ expiresAtSec: Math.floor(
+ (nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000,
+ ),
nowMs,
isEnabled: true,
isAuthenticated: true,
@@ -38,7 +42,9 @@ describe("shouldAttemptSlidingSessionRenew", () => {
it("returns false when automatic renewal is disabled", () => {
expect(
shouldAttemptSlidingSessionRenew({
- expiresAtSec: Math.floor((nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000),
+ expiresAtSec: Math.floor(
+ (nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000,
+ ),
nowMs,
isEnabled: false,
isAuthenticated: true,
@@ -52,7 +58,9 @@ describe("shouldAttemptSlidingSessionRenew", () => {
it("returns false when the last renew attempt is still within the throttle window", () => {
expect(
shouldAttemptSlidingSessionRenew({
- expiresAtSec: Math.floor((nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000),
+ expiresAtSec: Math.floor(
+ (nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000,
+ ),
nowMs,
isEnabled: true,
isAuthenticated: true,
diff --git a/adminfront/src/locales/template.toml b/adminfront/src/locales/template.toml
index f22098c4..868d4f8d 100644
--- a/adminfront/src/locales/template.toml
+++ b/adminfront/src/locales/template.toml
@@ -702,6 +702,7 @@ title = ""
[ui.admin]
brand = ""
dev_role_switcher = ""
+dev_role_switcher_real = ""
title = ""
[ui.admin.api_keys]
@@ -1429,6 +1430,7 @@ type = ""
[ui.dev.clients.type]
pkce = ""
private = ""
+pkce_headless = ""
[ui.dev.dashboard]
ready_badge = ""
diff --git a/devfront/src/components/layout/AppLayout.tsx b/devfront/src/components/layout/AppLayout.tsx
index 875344f3..21c43d00 100644
--- a/devfront/src/components/layout/AppLayout.tsx
+++ b/devfront/src/components/layout/AppLayout.tsx
@@ -276,10 +276,7 @@ function AppLayout() {
const handleSessionExpiryToggle = () => {
setIsSessionExpiryEnabled((prev) => {
const next = !prev;
- window.localStorage.setItem(
- "baron_session_expiry_enabled",
- String(next),
- );
+ window.localStorage.setItem("baron_session_expiry_enabled", String(next));
return next;
});
};
@@ -467,9 +464,7 @@ function AppLayout() {
onClick={handleSessionExpiryToggle}
className={[
"relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition",
- isSessionExpiryEnabled
- ? "bg-primary"
- : "bg-muted",
+ isSessionExpiryEnabled ? "bg-primary" : "bg-muted",
].join(" ")}
>
;
redirectUris: string[];
scopes: string[];
- metadata?: Record;
+ metadata?: Record;
};
export type ClientListResponse = {
diff --git a/devfront/src/locales/template.toml b/devfront/src/locales/template.toml
index c4c08089..f1128ef1 100644
--- a/devfront/src/locales/template.toml
+++ b/devfront/src/locales/template.toml
@@ -846,6 +846,7 @@ name = ""
[ui.admin.header]
plane = ""
+subtitle = ""
[ui.admin.nav]
api_keys = ""
diff --git a/locales/en.toml b/locales/en.toml
index 4ca7de99..752d2139 100644
--- a/locales/en.toml
+++ b/locales/en.toml
@@ -776,6 +776,7 @@ title = "Sign-up complete"
[ui.admin]
brand = "Brand"
dev_role_switcher = "🛠 DEV Role Switcher"
+dev_role_switcher_real = "Use real role"
title = "Admin Control"
[ui.admin.api_keys]
@@ -899,6 +900,7 @@ name = "NAME"
[ui.admin.header]
plane = "Admin Plane"
+subtitle = "Manage tenants, policies, and operators"
[ui.admin.nav]
api_keys = "API Keys"
@@ -1560,6 +1562,7 @@ type = "Type"
[ui.dev.clients.type]
pkce = "PKCE"
private = "Server side App"
+pkce_headless = "Headless PKCE"
[ui.dev.dashboard]
ready_badge = "devfront ready"
@@ -1596,7 +1599,9 @@ plane = "Dev Plane"
subtitle = "Manage your applications"
[ui.dev.session]
+auto_extend = "Session expiry controls"
active = "Checking expiration..."
+disabled = "Auto extend disabled"
unknown = "Unknown"
expired = "Session expired"
expiring = "Expiring soon: {{minutes}}m {{seconds}}s left"
diff --git a/locales/ko.toml b/locales/ko.toml
index 97e6ee97..a7a090a1 100644
--- a/locales/ko.toml
+++ b/locales/ko.toml
@@ -70,6 +70,7 @@ greeting = "안녕하세요, {{name}}님"
[ui.admin]
brand = "Baron 로그인"
dev_role_switcher = "🛠 DEV Role Switcher"
+dev_role_switcher_real = "실제 역할 사용"
title = "Admin Control"
[ui.common]
@@ -375,6 +376,7 @@ import_csv = "CSV 임포트"
[ui.admin.header]
plane = "Admin Plane"
+subtitle = "관리 및 정책 운영"
[ui.admin.nav]
api_keys = "API 키"
@@ -463,7 +465,9 @@ plane = "Dev Plane"
subtitle = "Manage your applications"
[ui.dev.session]
+auto_extend = "세션 만료 관리"
active = "세션 활성"
+disabled = "자동 연장 비활성화"
unknown = "알 수 없음"
expired = "세션 만료"
expiring = "만료 임박: {{minutes}}분 {{seconds}}초 남음"
@@ -1277,6 +1281,7 @@ type = "유형"
[ui.dev.clients.type]
private = "Server side App"
pkce = "PKCE"
+pkce_headless = "Headless PKCE"
[ui.dev.dashboard.badge]
consent_guard = "Consent guard ready"
diff --git a/locales/template.toml b/locales/template.toml
index 2cfc85db..9e64a7ac 100644
--- a/locales/template.toml
+++ b/locales/template.toml
@@ -70,6 +70,7 @@ greeting = ""
[ui.admin]
brand = ""
dev_role_switcher = ""
+dev_role_switcher_real = ""
title = ""
[ui.common]
@@ -375,6 +376,7 @@ import_csv = ""
[ui.admin.header]
plane = ""
+subtitle = ""
[ui.admin.nav]
api_keys = ""
@@ -463,7 +465,9 @@ plane = ""
subtitle = ""
[ui.dev.session]
+auto_extend = ""
active = ""
+disabled = ""
unknown = ""
expired = ""
expiring = ""
@@ -1277,6 +1281,7 @@ type = ""
[ui.dev.clients.type]
pkce = ""
private = ""
+pkce_headless = ""
[ui.dev.dashboard.badge]
consent_guard = ""