From aaeeaf8f9bb3e963dd5ec621d15ebc9abe81b752 Mon Sep 17 00:00:00 2001 From: Travis Swicegood Date: Sat, 16 May 2026 20:49:22 -0600 Subject: [PATCH] fix: use start/end bounds in hourly filter instead of undefined cutoff The hourly aggregation filter referenced a `cutoff` variable that doesn't exist in scope, throwing "ReferenceError: cutoff is not defined" on dashboard load. Switch to the same `start`/`end` bounds the daily filter uses (from getRangeBounds(selectedRange)) so hourly data is range-filtered consistently. Co-Authored-By: Claude Opus 4.7 (1M context) --- dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard.py b/dashboard.py index ebf8d5f..a6621a4 100644 --- a/dashboard.py +++ b/dashboard.py @@ -742,7 +742,7 @@ def get_dashboard_data(db_path=DB_PATH): // Hourly aggregation (filtered by model + range, then bucketed by UTC hour) const hourlySrc = (rawData.hourly_by_model || []).filter(r => - selectedModels.has(r.model) && (!cutoff || r.day >= cutoff) + selectedModels.has(r.model) && (!start || r.day >= start) && (!end || r.day <= end) ); const hourlyAgg = aggregateHourly(hourlySrc, hourlyTZ);