From 909a02c0028aa49a5526c3c38b59c5f7b93dbed1 Mon Sep 17 00:00:00 2001 From: abarman152 Date: Wed, 29 Apr 2026 14:59:23 +0530 Subject: [PATCH] fix: resolve ReferenceError in hourly filter due to undefined cutoff - Replaced undefined 'cutoff' variable with 'start' from getRangeBounds() - Added missing end boundary check for consistency with daily filtering - Restores correct filtering of hourly data based on selected date range - Fixes issue where charts and tables failed to render due to JS runtime error --- .claude/launch.json | 2 +- dashboard.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.claude/launch.json b/.claude/launch.json index a4ca2b2..059d40f 100644 --- a/.claude/launch.json +++ b/.claude/launch.json @@ -8,4 +8,4 @@ "port": 8080 } ] -} +} \ No newline at end of file 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);