From 47f98cf7b6cc0082f82735f06f26281184e977b7 Mon Sep 17 00:00:00 2001 From: Kevin Parrett Date: Sun, 26 Apr 2026 09:28:39 -0400 Subject: [PATCH] fix: replace undefined 'cutoff' with 'start'/'end' in applyFilter In applyFilter(), the hourly data filter referenced 'cutoff', which is never defined in scope. This caused a ReferenceError silently caught by the try-catch in loadData(), leaving the dashboard completely blank. Fixed by using 'start' and 'end', which are already in scope from getRangeBounds(selectedRange), consistent with how daily/session data are filtered. --- 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);