Skip to content

Commit eaeaa1f

Browse files
authored
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.
1 parent f6f1a7d commit eaeaa1f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

hindsight-control-plane/src/components/bank-profile-view.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ interface BankStats {
100100
// Consolidation stats
101101
last_consolidated_at: string | null;
102102
pending_consolidation: number;
103-
total_mental_models: number;
103+
total_observations: number;
104104
}
105105

106106
interface Operation {
@@ -607,8 +607,8 @@ export function BankProfileView({ hideReflectFields = false }: { hideReflectFiel
607607
This will delete all consolidated knowledge. Observations will be regenerated the
608608
next time consolidation runs.
609609
</p>
610-
{stats && stats.total_mental_models > 0 && (
611-
<p>This will delete {stats.total_mental_models} observations.</p>
610+
{stats && stats.total_observations > 0 && (
611+
<p>This will delete {stats.total_observations} observations.</p>
612612
)}
613613
</div>
614614
</AlertDialogDescription>

hindsight-control-plane/src/components/bank-stats-view.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface BankStats {
2626
failed_operations: number;
2727
last_consolidated_at: string | null;
2828
pending_consolidation: number;
29-
total_mental_models: number;
29+
total_observations: number;
3030
}
3131

3232
export function BankStatsView() {
@@ -183,7 +183,7 @@ export function BankStatsView() {
183183
observationsEnabled ? "text-amber-600 dark:text-amber-400" : "text-muted-foreground"
184184
}`}
185185
>
186-
{observationsEnabled ? stats.total_mental_models || 0 : "—"}
186+
{observationsEnabled ? stats.total_observations || 0 : "—"}
187187
</p>
188188
</div>
189189
<div className="bg-cyan-500/10 border border-cyan-500/20 rounded-xl p-4 text-center">

0 commit comments

Comments
 (0)