fix(web): 驗收報告 6 個問題修復
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user