diff --git a/internal/store/postgres/stats.go b/internal/store/postgres/stats.go index 5e11d06..107ce23 100644 --- a/internal/store/postgres/stats.go +++ b/internal/store/postgres/stats.go @@ -12,11 +12,11 @@ type FrameworkStats struct { } type Summary struct { - ActiveSessions int `json:"active_sessions"` - RunsToday int `json:"runs_today"` - ToolCallsToday int `json:"tool_calls_today"` - ErrorsToday int `json:"errors_today"` - ByFramework map[string]FrameworkStats `json:"by_framework"` + ActiveSessions int `json:"active_sessions"` + RunsToday int `json:"runs_today"` + ToolCallsToday int `json:"tool_calls_today"` + ErrorsToday int `json:"errors_today"` + ByFramework map[string]FrameworkStats `json:"by_framework"` } type TimeseriesBucket struct { @@ -59,7 +59,7 @@ func (d *DB) GetSummary(ctx context.Context) (*Summary, error) { // Per-framework aggregates for today fwQ := ` SELECT - COALESCE(source_framework, ''), + COALESCE(source_framework, 'unknown'), COUNT(*) FILTER (WHERE type = 'run.start') AS runs, COUNT(*) FILTER (WHERE type = 'span.end' AND payload->'attributes'->>'span_kind' = 'tool') AS tools,