thermograph/static
Emi Griffith 591f5ec495 Extract the chart library and the chunked streaming fetch (#49)
app.js carried the whole SVG chart implementation (~380 lines: palette,
percentile fans, the shared line-series renderer, per-metric wrappers,
pointer hover) alongside its page logic. That moves to chart.js: the
drawing dimensions live there as live-bound module state behind
setChartWidth(); attachChartHover takes the day list as a parameter
instead of reaching into page globals. app.js keeps buildChart and the
PNG export — page orchestration — and drops to ~500 lines. Any page can
now plot a metric series (e.g. a history sparkline on the day page).

calendar.js's hand-rolled streaming loader — bounded-parallel pool,
token cancellation, stale-while-revalidate re-merge — becomes
cache.js chunkedFetch(urls, {ttl, concurrency, isCurrent, onResult});
fetchCalendar keeps only its intent (chunk URLs, day merge, contiguous-
prefix rendering). Same pool semantics, verbatim.

Verified: node --check; 108 backend tests; headless-Chromium smoke on
all five pages against live data (chart renders + metric toggle,
calendar grid streams + metric switch, ladders, compare, legend).
2026-07-11 20:33:06 +00:00
..
app.js Extract the chart library and the chunked streaming fetch (#49) 2026-07-11 20:33:06 +00:00
cache.js Extract the chart library and the chunked streaming fetch (#49) 2026-07-11 20:33:06 +00:00
calendar.html Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
calendar.js Extract the chart library and the chunked streaming fetch (#49) 2026-07-11 20:33:06 +00:00
chart.js Extract the chart library and the chunked streaming fetch (#49) 2026-07-11 20:33:06 +00:00
compare.html Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
compare.js Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
day.html Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
day.js Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
index.html Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
legend.html Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
logo.png Link previews: Open Graph tags + logo for shared URLs (#35) 2026-07-11 15:59:14 +00:00
logo.svg Link previews: Open Graph tags + logo for shared URLs (#35) 2026-07-11 15:59:14 +00:00
mappicker.js Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
nav.js Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
package.json Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
shared.js Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
style.css Center the metric selectors and category-totals strip on desktop (#38) 2026-07-11 19:04:30 +00:00
units.js Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00