fix: 미분류 판단 기준 변경 — file_path 기반 → ai_domain 없음 기준

파일을 물리적으로 이동하지 않으므로 file_path로 미분류 판단 불가.
ai_domain이 NULL 또는 빈 문자열인 문서를 미분류로 취급.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-04-03 14:05:41 +09:00
parent d63a6b85e1
commit b54cc25650
2 changed files with 5 additions and 3 deletions

View File

@@ -62,10 +62,12 @@ async def get_dashboard(
today_rows = today_result.all()
today_added = sum(row[1] for row in today_rows)
# Inbox 미분류 수
# Inbox 미분류 수 (ai_domain이 없는 문서 = 미분류)
inbox_result = await session.execute(
select(func.count(Document.id))
.where(Document.file_path.like("PKM/Inbox/%"))
.where(
(Document.ai_domain == None) | (Document.ai_domain == "")
)
)
inbox_count = inbox_result.scalar() or 0

View File

@@ -14,7 +14,7 @@
try {
// Inbox 파일만 필터
const data = await api('/documents/?page_size=100');
documents = data.items.filter(d => d.file_path?.startsWith('PKM/Inbox/'));
documents = data.items.filter(d => !d.ai_domain);
} catch (err) {
addToast('error', 'Inbox 로딩 실패');
} finally {