From e89f0edc33c25582cfb14ae373c6c0ccd5d9cade Mon Sep 17 00:00:00 2001 From: lukemaj Date: Tue, 28 Apr 2026 17:27:56 +0200 Subject: [PATCH] fix: use start/end bounds in hourly filter (was undefined cutoff) applyFilter() referenced an undefined `cutoff` variable when filtering hourly_by_model, which threw ReferenceError before any chart was drawn, leaving the entire dashboard blank on every range. Match the daily filter just above by using the `start`/`end` bounds from getRangeBounds(), which also fixes ranges that have an end (week, month, prev-month). --- 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);