fix(web): 收斂 IwoooS 單一資安入口
This commit is contained in:
@@ -127,6 +127,7 @@ export function AppLayout({
|
||||
<Header
|
||||
locale={locale}
|
||||
sidebarCollapsed={shellCollapsed}
|
||||
compact={mobileShell}
|
||||
/>
|
||||
|
||||
{/* Main Content */}
|
||||
|
||||
@@ -177,6 +177,7 @@ export function Header({
|
||||
<button
|
||||
onClick={() => switchLocale('zh-TW')}
|
||||
style={{
|
||||
display: compact ? 'none' : 'block',
|
||||
padding: '5px 12px',
|
||||
fontFamily: 'var(--font-body), "DM Mono", monospace',
|
||||
fontSize: 11,
|
||||
@@ -194,6 +195,7 @@ export function Header({
|
||||
<button
|
||||
onClick={() => switchLocale('en')}
|
||||
style={{
|
||||
display: compact ? 'none' : 'block',
|
||||
padding: '5px 12px',
|
||||
fontFamily: 'var(--font-body), "DM Mono", monospace',
|
||||
fontSize: 11,
|
||||
@@ -211,11 +213,11 @@ export function Header({
|
||||
|
||||
{/* Avatar — 34px 圓形 #d97757 */}
|
||||
<div style={{
|
||||
display: compact ? 'none' : 'flex',
|
||||
width: 34,
|
||||
height: 34,
|
||||
borderRadius: '50%',
|
||||
background: '#d97757',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
fontSize: 12,
|
||||
|
||||
@@ -72,7 +72,7 @@ type NavSection = {
|
||||
// 可觀測性 /observability → 整合: 監控 + APM + 錯誤 + 應用 + 服務 (5 Tab) [暫指 /monitoring]
|
||||
// 自動化 /automation → 整合: 自動修復 + 神經指揮 + Drift (3 Tab) [暫指 /auto-repair]
|
||||
// 營運 /operations → 整合: 部署 + 工單 + 成本 + 行動日誌 + 計費 (5 Tab) [暫指 /deployments]
|
||||
// IwoooS 安全合規 /iwooos → 整合: IwoooS + 安全合規;/security-compliance 保留相容高亮
|
||||
// IwoooS /iwooos → 單一資安主入口;/security-compliance 保留相容高亮
|
||||
// 知識 /knowledge → 知識庫 [暫指 /knowledge-base]
|
||||
// ============================================================
|
||||
|
||||
@@ -85,7 +85,7 @@ const NAV_SECTIONS: NavSection[] = [
|
||||
{ id: 'observability', href: '/observability', labelKey: 'observability', Icon: Monitor },
|
||||
{ id: 'automation', href: '/automation', labelKey: 'automation', Icon: Wrench },
|
||||
{ id: 'operations', href: '/operations', labelKey: 'operations', Icon: Package },
|
||||
{ id: 'iwooos-security', href: '/iwooos', labelKey: 'iwooosSecurityCompliance', Icon: Radar, aliases: ['/security-compliance'] },
|
||||
{ id: 'iwooos-security', href: '/iwooos', labelKey: 'iwooos', Icon: Radar, aliases: ['/security-compliance'] },
|
||||
{ id: 'knowledge', href: '/knowledge', labelKey: 'knowledge', Icon: BookOpen },
|
||||
{ id: 'governance', href: '/governance', labelKey: 'governance', Icon: ShieldCheck },
|
||||
{ id: 'awooop', href: '/awooop/work-items', labelKey: 'awooop', Icon: BrainCircuit },
|
||||
|
||||
@@ -1,3 +1,49 @@
|
||||
## 2026-05-31|IwoooS 側欄單一資安入口收斂
|
||||
|
||||
**背景**:
|
||||
|
||||
- 正式站驗收確認 `https://awoooi.wooo.work/zh-TW/iwooos` 已可見 Kali 112 只讀快照,但桌面側欄仍把主入口顯示成「IwoooS 安全合規」,容易讓使用者以為「安全合規」與 IwoooS 是兩個菜單或兩套資安敘事。
|
||||
- 使用者要求兩個菜單整合在一起;本輪採取低風險處理:不移除 `/security-compliance` 相容路由,只把側欄主入口收斂為單一 `IwoooS`。
|
||||
|
||||
**本次調整**:
|
||||
|
||||
- `apps/web/src/components/layout/sidebar.tsx`:側欄項目 `iwooos-security` 改用 `nav.iwooos`,顯示文字成為 `IwoooS`;`/security-compliance` 繼續保留為 alias,避免既有連結失效。
|
||||
- `apps/web/src/components/layout/app-layout.tsx` / `apps/web/src/components/layout/header.tsx`:手機 shell 啟用 compact header,收起語系按鈕與頭像,避免 IwoooS 手機寬度出現橫向溢出。
|
||||
- `scripts/security/security-mirror-progress-guard.py`:guard 改為要求側欄使用 `labelKey: 'iwooos'`,並禁止回到 `labelKey: 'iwooosSecurityCompliance'`。
|
||||
- 維持 Gate 0 邊界:不新增掃描、修復、批准、部署按鈕或主機動作。
|
||||
|
||||
**驗證狀態**:
|
||||
|
||||
```text
|
||||
local:
|
||||
python3 scripts/security/security-mirror-progress-guard.py
|
||||
-> SECURITY_MIRROR_PROGRESS_GUARD_OK
|
||||
python3 scripts/security/source-control-owner-response-guard.py
|
||||
-> SOURCE_CONTROL_OWNER_RESPONSE_GUARD_OK
|
||||
python3 -m json.tool apps/web/messages/zh-TW.json / en.json
|
||||
-> pass
|
||||
cmp apps/web/messages/zh-TW.json apps/web/messages/en.json
|
||||
-> pass
|
||||
python3 -m py_compile scripts/security/security-mirror-progress-guard.py scripts/security/source-control-owner-response-guard.py
|
||||
-> pass
|
||||
git diff --check
|
||||
-> pass
|
||||
NEXT_PUBLIC_API_URL=https://awoooi.wooo.work pnpm --dir apps/web run build
|
||||
-> pass
|
||||
pnpm --dir apps/web run typecheck
|
||||
-> pass
|
||||
local production smoke on 127.0.0.1:3017:
|
||||
zh-TW/en desktop + mobile
|
||||
visible: 只讀通過 / 待更新套件 1994 / 失敗 systemd unit 1
|
||||
desktop nav: IwoooS visible, 安全合規 not visible
|
||||
mobile: horizontalOverflow=false after mobile shell hydration
|
||||
Incident ID English residual=false
|
||||
```
|
||||
|
||||
**待辦**:
|
||||
|
||||
- 待推版後補上正式部署標記與 production smoke。
|
||||
|
||||
## 2026-05-31|AwoooP Run 詳情單一 Incident 處理流程 drill-down
|
||||
|
||||
**背景**:
|
||||
|
||||
@@ -204,18 +204,19 @@ def validate(root: Path) -> None:
|
||||
assert_contains("intake.contracts", intake_contracts, "iwooos_posture_projection_v1")
|
||||
|
||||
assert_text_contains("sidebar.iwooos_security_unified_entry", sidebar, "id: 'iwooos-security'")
|
||||
assert_text_contains("sidebar.iwooos_security_label", sidebar, "labelKey: 'iwooosSecurityCompliance'")
|
||||
assert_text_contains("sidebar.iwooos_security_label", sidebar, "labelKey: 'iwooos'")
|
||||
assert_text_not_contains("sidebar.iwooos_security_duplicate_label", sidebar, "labelKey: 'iwooosSecurityCompliance'")
|
||||
assert_text_contains("sidebar.security_compliance_alias", sidebar, "aliases: ['/security-compliance']")
|
||||
assert_text_not_contains("sidebar.duplicate_security_compliance_entry", sidebar, "id: 'security-compliance'")
|
||||
assert_equal(
|
||||
"web_messages.zh-TW.nav.iwooosSecurityCompliance",
|
||||
web_messages_zh["nav"]["iwooosSecurityCompliance"],
|
||||
"IwoooS 安全合規",
|
||||
"web_messages.zh-TW.nav.iwooos",
|
||||
web_messages_zh["nav"]["iwooos"],
|
||||
"IwoooS",
|
||||
)
|
||||
assert_equal(
|
||||
"web_messages.en.nav.iwooosSecurityCompliance",
|
||||
web_messages_en["nav"]["iwooosSecurityCompliance"],
|
||||
"IwoooS 安全合規",
|
||||
"web_messages.en.nav.iwooos",
|
||||
web_messages_en["nav"]["iwooos"],
|
||||
"IwoooS",
|
||||
)
|
||||
assert_equal("web_messages.en.nav.traditional_chinese_mirror", web_messages_en["nav"], web_messages_zh["nav"])
|
||||
assert_equal("web_messages.en.iwooos.traditional_chinese_mirror", web_messages_en["iwooos"], web_messages_zh["iwooos"])
|
||||
|
||||
Reference in New Issue
Block a user