diff --git a/app/api/dashboard.py b/app/api/dashboard.py index 463ba8d..8e33b7b 100644 --- a/app/api/dashboard.py +++ b/app/api/dashboard.py @@ -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 diff --git a/frontend/src/routes/inbox/+page.svelte b/frontend/src/routes/inbox/+page.svelte index 74883b5..33fbb7d 100644 --- a/frontend/src/routes/inbox/+page.svelte +++ b/frontend/src/routes/inbox/+page.svelte @@ -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 {