From 1ac6835235f42c2ecad9a934a34b2acfa943a3be Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 15 Jun 2026 08:29:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(web):=20=E9=9A=B1=E8=97=8F=E9=A0=81?= =?UTF-8?q?=E9=A6=96=E6=93=8D=E4=BD=9C=E5=93=A1=E5=80=8B=E4=BA=BA=E7=B8=AE?= =?UTF-8?q?=E5=AF=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/components/layout/header.tsx | 15 ++++++++++----- .../security/security-mirror-progress-guard.py | 6 ++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/apps/web/src/components/layout/header.tsx b/apps/web/src/components/layout/header.tsx index 0915de06..fd0d37ee 100644 --- a/apps/web/src/components/layout/header.tsx +++ b/apps/web/src/components/layout/header.tsx @@ -7,7 +7,7 @@ * - brand-area: AwoooI Pills V2 logo + display name * - page-title: Syne 26px 800 * - lang-btn: pill 樣式 (border-radius 20px) - * - avatar: 34px 圓形 #d97757 + * - operator marker: 34px 圓形 #d97757,僅顯示角色圖示,不顯示個人縮寫 * * Phase 19: 使用 Z_INDEX.HEADER (30) * @see lib/constants/z-index.ts @@ -17,6 +17,7 @@ import { useCallback } from 'react' import { useTranslations } from 'next-intl' import { usePathname } from 'next/navigation' +import { ShieldCheck } from 'lucide-react' import { Z_INDEX } from '@/lib/constants/z-index' // ============================================================================= @@ -194,8 +195,11 @@ export function Header({ {t('en')} - {/* Avatar — 34px 圓形 #d97757 */} -
- OG + }} + > +
diff --git a/scripts/security/security-mirror-progress-guard.py b/scripts/security/security-mirror-progress-guard.py index 04aecafa..e18fbfe5 100755 --- a/scripts/security/security-mirror-progress-guard.py +++ b/scripts/security/security-mirror-progress-guard.py @@ -276,6 +276,9 @@ def validate(root: Path) -> None: sidebar = (root / "apps" / "web" / "src" / "components" / "layout" / "sidebar.tsx").read_text( encoding="utf-8" ) + layout_header = (root / "apps" / "web" / "src" / "components" / "layout" / "header.tsx").read_text( + encoding="utf-8" + ) command_palette = ( root / "apps" / "web" / "src" / "components" / "command-palette" / "CommandPalette.tsx" ).read_text(encoding="utf-8") @@ -350,6 +353,7 @@ def validate(root: Path) -> None: governance_automation_inventory_tab, iwooos_bridge, public_security_redaction, + layout_header, ] ) for forbidden in [ @@ -368,6 +372,8 @@ def validate(root: Path) -> None: "ws={route.websocket_route_count}", ]: assert_text_not_contains("frontend.tenants_visible_internal_implementation_text", awooop_tenants_page, forbidden) + assert_text_not_contains("frontend.layout_header.personal_initials", layout_header, ">OG<") + assert_text_contains("frontend.layout_header.operator_marker_icon", layout_header, "ShieldCheck") for label, text in [ ("awooop_home_page", awooop_home_page),