diff --git a/internal/channels/quota.go b/internal/channels/quota.go index e07ca209..02720307 100644 --- a/internal/channels/quota.go +++ b/internal/channels/quota.go @@ -265,6 +265,9 @@ func (qc *QuotaChecker) Usage(ctx context.Context) QuotaUsageResult { // QueryTodaySummary fills today's aggregate stats into the result. // Exported so QuotaMethods can call it directly when QuotaChecker is nil. func QueryTodaySummary(ctx context.Context, db *sql.DB, result *QuotaUsageResult) { + if db == nil { + return + } now := time.Now().UTC() startOfDay := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.UTC) diff --git a/internal/gateway/client.go b/internal/gateway/client.go index 45bfcc6d..420a0d87 100644 --- a/internal/gateway/client.go +++ b/internal/gateway/client.go @@ -26,7 +26,7 @@ type Client struct { mu sync.Mutex connectedAt time.Time // when the client connected - remoteAddr string // peer IP:port from websocket + remoteAddr string // peer IP (extracted from proxy headers or RemoteAddr) // Browser pairing state pairingCode string // 8-char code if pending approval diff --git a/ui/web/src/pages/overview/overview-page.tsx b/ui/web/src/pages/overview/overview-page.tsx index c8fa41a6..862cd153 100644 --- a/ui/web/src/pages/overview/overview-page.tsx +++ b/ui/web/src/pages/overview/overview-page.tsx @@ -621,7 +621,7 @@ export function OverviewPage() { className={`border-b last:border-0 ${isYou ? "bg-muted/50" : ""}`} >