From b54cc25650277c657189fbf12832f7e3b80e7b10 Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Fri, 3 Apr 2026 14:05:41 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=AF=B8=EB=B6=84=EB=A5=98=20=ED=8C=90?= =?UTF-8?q?=EB=8B=A8=20=EA=B8=B0=EC=A4=80=20=EB=B3=80=EA=B2=BD=20=E2=80=94?= =?UTF-8?q?=20file=5Fpath=20=EA=B8=B0=EB=B0=98=20=E2=86=92=20ai=5Fdomain?= =?UTF-8?q?=20=EC=97=86=EC=9D=8C=20=EA=B8=B0=EC=A4=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 파일을 물리적으로 이동하지 않으므로 file_path로 미분류 판단 불가. ai_domain이 NULL 또는 빈 문자열인 문서를 미분류로 취급. Co-Authored-By: Claude Opus 4.6 (1M context) --- app/api/dashboard.py | 6 ++++-- frontend/src/routes/inbox/+page.svelte | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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 {