forked from code/member-dashboard
The dashboard carried the identical inline-handler line inside PAGE_HTML — the served JS was a syntax error from there on, so the page loaded and then did nothing — and a second casualty of the same sloppy one-shot replace: `location.reload()` had become `location.rebuildMetricButtons()\nload()` inside loadGuests(). Both are fixed, and the same gate fix applies (the gate now reads PAGE_HTML via ast.literal_eval, i.e. the string the app serves, not the source text between the quotes). Buttons are delegated data-metric clicks now, the harness proves the click reaches setTrendMetric, and the stub gained stateful attributes plus addEventListener/__fire to make that possible.