diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index 9b4819267..d94ea9111 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -72,9 +72,12 @@ "governance": "AI 治理", "awooop": "AwoooP", "awooopHome": "AwoooP 總覽", + "awooopWarRoom": "AI SRE 戰情室", "awooopWorkbench": "AwoooP 操作台", "codeReview": "程式碼審查", "knowledgeAutomation": "知識與自動化", + "observabilityCommandCenter": "全域可觀測", + "assetInventory": "資產與產品", "governanceSecurity": "治理與安全", "workItems": "工作鏈路", "runMonitor": "Run 監控", @@ -3063,6 +3066,7 @@ }, "governance": { "title": "AI 治理中樞", + "sectionVisible": "同頁可見", "complianceBadge": { "label": "AI 治理中樞", "loading": "載入中...", @@ -3076,7 +3080,7 @@ "agentMarket": "Agent 市場", "automationInventory": "自動化盤點" }, - "comingSoon": "本 Tab 即將上線", + "comingSoon": "本區塊即將上線", "slo": { "kpi": { "autonomy_rate": "自主化率", diff --git a/apps/web/messages/zh-TW.json b/apps/web/messages/zh-TW.json index 9b4819267..d94ea9111 100644 --- a/apps/web/messages/zh-TW.json +++ b/apps/web/messages/zh-TW.json @@ -72,9 +72,12 @@ "governance": "AI 治理", "awooop": "AwoooP", "awooopHome": "AwoooP 總覽", + "awooopWarRoom": "AI SRE 戰情室", "awooopWorkbench": "AwoooP 操作台", "codeReview": "程式碼審查", "knowledgeAutomation": "知識與自動化", + "observabilityCommandCenter": "全域可觀測", + "assetInventory": "資產與產品", "governanceSecurity": "治理與安全", "workItems": "工作鏈路", "runMonitor": "Run 監控", @@ -3063,6 +3066,7 @@ }, "governance": { "title": "AI 治理中樞", + "sectionVisible": "同頁可見", "complianceBadge": { "label": "AI 治理中樞", "loading": "載入中...", @@ -3076,7 +3080,7 @@ "agentMarket": "Agent 市場", "automationInventory": "自動化盤點" }, - "comingSoon": "本 Tab 即將上線", + "comingSoon": "本區塊即將上線", "slo": { "kpi": { "autonomy_rate": "自主化率", diff --git a/apps/web/src/app/[locale]/governance/page.tsx b/apps/web/src/app/[locale]/governance/page.tsx index 6706a8b24..4a07bdcd6 100644 --- a/apps/web/src/app/[locale]/governance/page.tsx +++ b/apps/web/src/app/[locale]/governance/page.tsx @@ -3,8 +3,8 @@ /** * GovernancePage — AI 治理中樞 (/governance) * ============================================ - * PR 2: 頁面骨架 + Sidebar 入口 + 三 Tab 空殼 - * PR 3-5 將填入 SLO / 治理事件 / AI 待辦 真實內容 + * D1K: 將原本隱藏在 tab query 裡的治理區塊改為同頁 sections。 + * 舊 ?tab= deep link 只作焦點排序,不再隱藏其他治理內容。 * * 設計方向: Nothing.tech × Anthropic Warmth * - ComplianceBadge 橫幅作為頁面頂部的治理狀態信號 @@ -49,6 +49,12 @@ export default function GovernancePage({ ] const requestedTab = Array.isArray(searchParams?.tab) ? searchParams?.tab[0] : searchParams?.tab const activeSection = governanceSections.find(section => section.id === requestedTab) ?? governanceSections[0] + const orderedSections = activeSection + ? [ + activeSection, + ...governanceSections.filter(section => section.id !== activeSection.id), + ] + : governanceSections return ( @@ -71,7 +77,7 @@ export default function GovernancePage({ return ( - {activeSection.content} + + {orderedSections.map((section) => { + const Icon = section.Icon + return ( + + + + + + + + {section.label} + {section.order} + + + + {t('sectionVisible')} + + + {section.content} + + ) + })} + ) } diff --git a/apps/web/src/components/layout/sidebar.tsx b/apps/web/src/components/layout/sidebar.tsx index 231068ea6..d5b7d8208 100644 --- a/apps/web/src/components/layout/sidebar.tsx +++ b/apps/web/src/components/layout/sidebar.tsx @@ -9,10 +9,10 @@ * - 無陰影 * - 單色圖示 * - * IA v2 (2026-06-04): - * - 頂層按照 operator 工作流排序,不按照技術模組排序。 - * - AwoooP / Runs / Work Items / Approvals / Alerts 直接成為全域入口。 - * - 頁內 tabs 只保留同一頁的視角切換,避免把任務入口藏在第二層。 + * IA D0 (2026-06-27): + * - 側欄只放高頻 primary 工作台。 + * - Runs / Approvals / Contracts 等流程細節保留深連結,不再攤平成主導航。 + * - 頁面內以同頁 sections 呈現關鍵狀態,減少二層分頁藏內容。 * * Phase 19: 使用 Z_INDEX.SIDEBAR (40) * @see lib/constants/z-index.ts @@ -125,7 +125,11 @@ export function Sidebar({ {/* 導航列表 - Operator workflow sections */} - {PRODUCT_NAV_SECTIONS.map(section => ( + {PRODUCT_NAV_SECTIONS.map(section => { + const visibleItems = section.items.filter(item => item.surface !== 'secondary') + if (visibleItems.length === 0) return null + + return ( {!collapsed && ( )} - {section.items.map(item => { + {visibleItems.map(item => { const active = isActive(item) const count = item.badge && mounted ? pendingCount : 0 return ( @@ -190,7 +194,8 @@ export function Sidebar({ ) })} - ))} + ) + })} {/* Separator */} diff --git a/apps/web/src/lib/navigation/product-ia.ts b/apps/web/src/lib/navigation/product-ia.ts index accbcc52c..b6065f4f2 100644 --- a/apps/web/src/lib/navigation/product-ia.ts +++ b/apps/web/src/lib/navigation/product-ia.ts @@ -29,6 +29,7 @@ export type ProductNavItem = { relatedPaths?: string[] exact?: boolean badge?: boolean + surface?: 'primary' | 'secondary' } export type ProductNavSection = { @@ -50,14 +51,20 @@ export const PRODUCT_NAV_SECTIONS: ProductNavSection[] = [ sectionKey: 'workspaces', items: [ { id: 'command-center', href: '/', labelKey: 'commandCenter', Icon: LayoutDashboard }, - { id: 'delivery', href: '/delivery', labelKey: 'delivery', Icon: Rocket }, { id: 'awooop-overview', href: '/awooop', - labelKey: 'awooopHome', + labelKey: 'awooopWarRoom', Icon: BrainCircuit, exact: true, }, + { + id: 'observability', + href: '/observability', + labelKey: 'observabilityCommandCenter', + Icon: Monitor, + aliases: ['/monitoring', '/apm', '/errors', '/apps', '/services', '/topology', '/alerts', '/alert-operation-logs', '/notifications'], + }, ], }, { @@ -69,11 +76,31 @@ export const PRODUCT_NAV_SECTIONS: ProductNavSection[] = [ labelKey: 'workItems', Icon: ClipboardList, }, + { + id: 'knowledge-automation', + href: '/knowledge-base', + labelKey: 'knowledgeAutomation', + Icon: BookOpen, + aliases: ['/knowledge', '/automation', '/auto-repair', '/drift', '/neural-command'], + }, + { + id: 'awooop-tenants', + href: '/awooop/tenants', + labelKey: 'assetInventory', + Icon: Building2, + }, + { + id: 'code-review', + href: '/code-review', + labelKey: 'codeReview', + Icon: GitPullRequest, + }, { id: 'awooop-runs', href: '/awooop/runs', labelKey: 'runMonitor', Icon: PlayCircle, + surface: 'secondary', }, { id: 'awooop-approvals', @@ -82,18 +109,14 @@ export const PRODUCT_NAV_SECTIONS: ProductNavSection[] = [ Icon: ShieldCheck, aliases: ['/authorizations'], badge: true, + surface: 'secondary', }, { id: 'awooop-contracts', href: '/awooop/contracts', labelKey: 'contracts', Icon: FileText, - }, - { - id: 'awooop-tenants', - href: '/awooop/tenants', - labelKey: 'tenants', - Icon: Building2, + surface: 'secondary', }, ], }, @@ -101,18 +124,10 @@ export const PRODUCT_NAV_SECTIONS: ProductNavSection[] = [ sectionKey: 'monitoring', items: [ { - id: 'observability', - href: '/observability', - labelKey: 'observability', - Icon: Monitor, - aliases: ['/monitoring', '/apm', '/errors', '/apps', '/services', '/topology'], - }, - { - id: 'alerts', - href: '/alerts', - labelKey: 'alerts', - Icon: Bell, - aliases: ['/alert-operation-logs', '/notifications'], + id: 'delivery', + href: '/delivery', + labelKey: 'delivery', + Icon: Rocket, }, { id: 'iwooos-security', @@ -120,47 +135,43 @@ export const PRODUCT_NAV_SECTIONS: ProductNavSection[] = [ labelKey: 'iwooos', Icon: ShieldCheck, aliases: ['/security-compliance'], - relatedPaths: ['/security', '/compliance'], - }, - { - id: 'code-review', - href: '/code-review', - labelKey: 'codeReview', - Icon: GitPullRequest, - }, - ], - }, - { - sectionKey: 'knowledge', - items: [ - { - id: 'knowledge-automation', - href: '/knowledge-base', - labelKey: 'knowledgeAutomation', - Icon: BookOpen, - aliases: ['/knowledge', '/automation', '/auto-repair', '/drift', '/neural-command'], - }, - { - id: 'reports', - href: '/reports', - labelKey: 'reports', - Icon: BarChart3, + relatedPaths: ['/security', '/compliance', '/governance'], }, { id: 'operations', href: '/operations', labelKey: 'operationsOverview', Icon: Package, - aliases: ['/deployments', '/tickets', '/cost', '/billing', '/action-logs'], + aliases: ['/deployments', '/tickets', '/cost', '/billing', '/action-logs', '/reports'], + }, + { + id: 'settings', + href: '/settings', + labelKey: 'settings', + Icon: Settings, }, ], }, { sectionKey: 'system', items: [ - { id: 'terminal', href: '/terminal', labelKey: 'terminal', Icon: Terminal }, - { id: 'settings', href: '/settings', labelKey: 'settings', Icon: Settings }, - { id: 'classic', href: '/classic', labelKey: 'classicAICenter', Icon: Radar }, + { + id: 'alerts', + href: '/alerts', + labelKey: 'alerts', + Icon: Bell, + aliases: ['/alert-operation-logs', '/notifications'], + surface: 'secondary', + }, + { + id: 'reports', + href: '/reports', + labelKey: 'reports', + Icon: BarChart3, + surface: 'secondary', + }, + { id: 'terminal', href: '/terminal', labelKey: 'terminal', Icon: Terminal, surface: 'secondary' }, + { id: 'classic', href: '/classic', labelKey: 'classicAICenter', Icon: Radar, surface: 'secondary' }, ], }, ] diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index a6989db9d..a5de1087d 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -23,6 +23,32 @@ - controlled executor dispatch / live apply / Gateway queue write / Telegram send / Bot API / KM write / PlayBook trust write / production write / secret read / paid API / host write / kubectl / destructive operation:全部 `0`。 - 本段沒有正式下發 Ansible apply、沒有 Telegram live send、沒有主機寫入、沒有 secret value collection、沒有 destructive operation。 +## 2026-06-27|D1K 全站 IA / UIUX D0:主導航收斂與 Governance 去分頁化 + +**背景**:使用者明確指出網站整體流程、導航列、頁內分頁與大量文字不符合專業 AI 自動化產品期待;現況 sidebar 將 AwoooP overview / Work Items / Runs / Approvals / Contracts / Tenants、Observability、Alerts、IwoooS、Code Review、Knowledge、Reports、Operations、Terminal、Settings、Classic 等 19 個入口全部攤平,Governance 頁又以 `?tab=` 隱藏 5 個治理區塊,造成資訊架構混亂。 + +**本段完成內容**: +- `PRODUCT_NAV_SECTIONS` 新增 `surface=secondary`,sidebar 只顯示 primary 工作台;secondary 頁面仍保留 deep link 與 command palette,不再轟炸主導航。 +- Sidebar primary 收斂為 3 組、11 個主入口: + - 主工作區:指令中心、AI SRE 戰情室、全域可觀測。 + - 處理佇列:工作鏈路、知識與自動化、資產與產品、程式碼審查。 + - 監控與安全:交付閉環、IwoooS、營運總覽、設定。 +- Runs / Approvals / Contracts / Alerts / Reports / Terminal / Classic 改為 secondary;保留 URL、既有深連結、AwoooP 內部流程與 command palette 搜尋能力。 +- `/zh-TW/governance` 從單一 active tab 改為同頁可見 sections:SLO、治理事件、AI 待辦、Agent 市場、自動化盤點全部在同一頁呈現;舊 `?tab=` deep link 只用於排序焦點,不再隱藏其他區塊。 +- 新增繁中/i18n 導航詞:`AI SRE 戰情室`、`全域可觀測`、`資產與產品`、`同頁可見`。 + +**驗證**: +- `python3 -m json.tool apps/web/messages/zh-TW.json` / `apps/web/messages/en.json`:通過。 +- i18n key mirror:`14353 / 14353`,diff `0`。 +- `git diff --check`:通過。 +- `pnpm --filter @awoooi/web typecheck`:通過。 + +**完成度 / 邊界**: +- IA D0 主導航收斂:本地 `100%`。 +- Governance 去分頁化 D0:本地 `100%`。 +- 全站完整 UI / 圖表 / 拓樸 / 動畫 / 主流 AI 控制台化:仍在推進中,D0 只先修掉主導航過載與 Governance 分頁隱藏內容。 +- 本段不改 runtime gate、不改告警執行策略、不觸發主機動作。 + ## 2026-06-27|D1J 修復候選升級合約:受控自動化閉環可視化 **背景**:Telegram / AwoooP 告警卡已能指出 `repair_candidate_draft_ready_owner_review`,但 Work Items / Approvals 仍主要呈現「需人工」與長文字,操作員看不到 AI 已準備好的無寫入演練、Verifier 與 KM / PlayBook / Script 資產沉澱槽位,容易被誤判為 AI Agent 沒有任何自動化進展。
{section.label}
{section.order}