fix(web): 驗收報告 6 個問題修復
Some checks failed
E2E Health Check / e2e-health (push) Successful in 17s
CD Pipeline / build-and-deploy (push) Has been cancelled

1. [Medium] Metrics Strip [object Object] — 移除 pendingApprovals 陣列直接渲染
   + label 硬編碼改 i18n (activeIncidents/serviceHealth/todayIncidents 等)
2. [Low] KB GET /{id} 不過濾 archived — get_by_id 加 status != ARCHIVED
3. [Low] favicon.ico 404 — 新增 NemoClaw SVG favicon + layout metadata
4. [Medium] auto-repair console errors — fetchEval 加 try-catch 靜默處理

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
OG T
2026-04-02 10:30:43 +08:00
parent db2a2852b8
commit 05cd9cbab4
7 changed files with 51 additions and 11 deletions

View File

@@ -55,9 +55,12 @@ class KnowledgeDBRepository:
return self._to_model(record)
async def get_by_id(self, entry_id: str) -> KnowledgeEntry | None:
"""根據 ID 取得知識條目"""
"""根據 ID 取得知識條目(排除 archived"""
result = await self.db.execute(
select(KnowledgeEntryRecord).where(KnowledgeEntryRecord.id == entry_id)
select(KnowledgeEntryRecord).where(
KnowledgeEntryRecord.id == entry_id,
KnowledgeEntryRecord.status != EntryStatus.ARCHIVED,
)
)
record = result.scalar_one_or_none()
return self._to_model(record) if record else None