fix(control-plane): observations count always showing 0 due to wrong field name (#464)
The BankStats interface used total_mental_models but the API returns total_observations, causing the Observations card to always display 0.
This commit is contained in:
parent
f6f1a7d889
commit
eaeaa1f24d
2 changed files with 5 additions and 5 deletions
|
|
@ -100,7 +100,7 @@ interface BankStats {
|
|||
// Consolidation stats
|
||||
last_consolidated_at: string | null;
|
||||
pending_consolidation: number;
|
||||
total_mental_models: number;
|
||||
total_observations: number;
|
||||
}
|
||||
|
||||
interface Operation {
|
||||
|
|
@ -607,8 +607,8 @@ export function BankProfileView({ hideReflectFields = false }: { hideReflectFiel
|
|||
This will delete all consolidated knowledge. Observations will be regenerated the
|
||||
next time consolidation runs.
|
||||
</p>
|
||||
{stats && stats.total_mental_models > 0 && (
|
||||
<p>This will delete {stats.total_mental_models} observations.</p>
|
||||
{stats && stats.total_observations > 0 && (
|
||||
<p>This will delete {stats.total_observations} observations.</p>
|
||||
)}
|
||||
</div>
|
||||
</AlertDialogDescription>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ interface BankStats {
|
|||
failed_operations: number;
|
||||
last_consolidated_at: string | null;
|
||||
pending_consolidation: number;
|
||||
total_mental_models: number;
|
||||
total_observations: number;
|
||||
}
|
||||
|
||||
export function BankStatsView() {
|
||||
|
|
@ -183,7 +183,7 @@ export function BankStatsView() {
|
|||
observationsEnabled ? "text-amber-600 dark:text-amber-400" : "text-muted-foreground"
|
||||
}`}
|
||||
>
|
||||
{observationsEnabled ? stats.total_mental_models || 0 : "—"}
|
||||
{observationsEnabled ? stats.total_observations || 0 : "—"}
|
||||
</p>
|
||||
</div>
|
||||
<div className="bg-cyan-500/10 border border-cyan-500/20 rounded-xl p-4 text-center">
|
||||
|
|
|
|||
Loading…
Reference in a new issue