Skip to content

Fix ReferenceError: cutoff is not defined in applyFilter#124

Open
fheinent wants to merge 1 commit into
phuryn:mainfrom
fheinent:fix/hourly-cutoff-undefined
Open

Fix ReferenceError: cutoff is not defined in applyFilter#124
fheinent wants to merge 1 commit into
phuryn:mainfrom
fheinent:fix/hourly-cutoff-undefined

Conversation

@fheinent
Copy link
Copy Markdown

What

applyFilter was refactored to destructure { start, end } from getRangeBounds,
but the hourly chart's filter still references the removed cutoff variable
(dashboard.py:745). This throws ReferenceError: cutoff is not defined on every render, breaking the entire dashboard — no stats, no charts,
no tables.

Repro

  1. python3 cli.py dashboard
  2. Open http://localhost:8080
  3. Console: ReferenceError: cutoff is not defined at applyFilter

Fix

Replace cutoff with the same start/end bounds used by the daily filter
at line 660, so the hourly chart respects the selected range too.

Test plan

  • Repro confirmed on main (grep cutoff dashboard.py → 1 hit on line 745)
  • After fix: dashboard loads, all 4 charts render, sessions table populates
  • Range buttons (7d/30d/90d/all) still filter hourly chart correctly

`applyFilter` was refactored to destructure `{ start, end }` from
`getRangeBounds`, but the hourly chart's filter still referenced the
removed `cutoff` variable. This threw at runtime on every render,
breaking the entire dashboard (no stats, no charts, no tables).

Replace `cutoff` with the same `start`/`end` bounds used by the daily
filter at line 660, so hourly data respects the selected range too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant