mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 14:16:12 +00:00
fix(documents): scope the content-index gauge to live documents
The usage endpoint counted every DocumentContentIndex row for the user, including those whose parent document has been soft-deleted (the index row survives until the hard purge). Against totalCount, which filters live documents, the gauge could read past 100 %. Scope the indexed count to live documents so coverage never exceeds the corpus. Also drop a redundant identical-branch ternary in the per-document content-index status row.
This commit is contained in:
1 parent
2319988a96
commit
1c0c194820
2 files changed
+7
-7
No files matched your search
@@ -298,12 +298,7 @@ export function ContentIndexStatus({
|
||||
data-slot="content-index-status"
|
||||
className="flex items-center justify-between gap-2"
|
||||
>
|
||||
<p
|
||||
className={cn(
|
||||
"inline-flex items-center gap-1.5 text-xs",
|
||||
hasContentIndex ? "text-muted-foreground" : "text-muted-foreground",
|
||||
)}
|
||||
>
|
||||
<p className="text-muted-foreground inline-flex items-center gap-1.5 text-xs">
|
||||
<ScanSearch className="size-3.5 shrink-0" aria-hidden />
|
||||
{hasContentIndex
|
||||
? t("documents.contentIndex.searchable")
|
||||
|
||||
Reference in new issue
Block a user