feat: harmonize MCP tool + userinfo page to documents/chunks model

Extend the documents-vs-chunks split to the remaining status surfaces so all
three report consistently (Deck #195):

- nc_get_vector_sync_status MCP tool + VectorSyncStatusResponse: add
  indexed_documents (distinct) and indexed_chunks; keep indexed_count as a
  deprecated alias of indexed_chunks. Reuses count_indexed.
- userinfo HTML page (/app/vector-sync/status): show Indexed Documents AND
  Indexed Chunks rows; switch its count to count_indexed (which also excludes
  placeholder points — the old raw count included them).
- /api/v1/vector-sync/status: restore indexed_count as a deprecated alias of
  indexed_chunks so existing consumers (integration tests, pre-#115 UI) keep
  working; the change is now purely additive for indexed_count.

Tests: VectorSyncStatusResponse documents/chunks/alias + zeroed defaults.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2026-06-04 20:28:44 +02:00
co-authored by Claude Opus 4.8
parent 8c9f97d6c4
commit e4d81d47d9
6 changed files with 91 additions and 33 deletions
+3 -1
View File
@@ -327,9 +327,11 @@ async def get_vector_sync_status(request: Request) -> JSONResponse:
"status": status,
# indexed_documents is now the distinct-document count (was the chunk
# count before — the two differ by the per-document chunk fan-out).
# indexed_chunks exposes the raw point count separately.
# indexed_chunks exposes the raw point count separately; indexed_count
# is kept as a deprecated alias of indexed_chunks for back-compat.
"indexed_documents": indexed_documents,
"indexed_chunks": indexed_chunks,
"indexed_count": indexed_chunks,
"pending_documents": pending.pending,
"ingest_queue": settings.ingest_queue,
}