thermograph/static
Emi Griffith 086a301387 Render every percentile through one rule (#186)
The homepage strip floored percentiles into 1-99 while the Day page rendered
"100th pct" for the same reading. Rather than teach the Day page a second copy
of the rule, put it in grading.pct_ordinal() and have every surface defer to it:
the Day page, the calendar tooltip, the chart labels, the city pages and the
strip.

Two bugs fell out of unifying them:

- The city pages rendered `{{ c.percentile }}th pct` against a float, so all
  ~1000 of them showed "97.1th pct", "66.4th pct", "16.5th pct" — and would say
  "1th"/"2th"/"3th" for the low tail. Live in prod.
- Python's round() is half-to-even and JavaScript's Math.round is half-up, so
  16.5 gave "16th" server-side and "17th" client-side. The Python helper uses
  floor(x + 0.5) to match the frontend exactly; a cross-language check over every
  .5 boundary now agrees on all of them.

The frontend mirrors the rule as pctOrd() in shared.js, replacing the bare ord()
at all five percentile call sites (day.js, calendar.js, chart.js x2, app.js).
ord() stays as the general ordinal helper it always was.
2026-07-18 09:08:28 +00:00
..
account.js Give climate/city/record pages full header parity + working °F/°C (#124) 2026-07-16 17:48:30 +00:00
app.js Render every percentile through one rule (#186) 2026-07-18 09:08:28 +00:00
apple-touch-icon.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
cache.js Warm neighbor cells server-side (/cell?neighbors=1) (#51) 2026-07-11 20:47:31 +00:00
calendar.html Make the brand lockup a home link on every page (#182) 2026-07-18 08:06:14 +00:00
calendar.js Render every percentile through one rule (#186) 2026-07-18 09:08:28 +00:00
chart.js Render every percentile through one rule (#186) 2026-07-18 09:08:28 +00:00
climate.js Give climate/city/record pages full header parity + working °F/°C (#124) 2026-07-16 17:48:30 +00:00
compare.html Make the brand lockup a home link on every page (#182) 2026-07-18 08:06:14 +00:00
compare.js Account system with weather-notification subscriptions (#89) 2026-07-15 18:46:46 +00:00
day.html Make the brand lockup a home link on every page (#182) 2026-07-18 08:06:14 +00:00
day.js Render every percentile through one rule (#186) 2026-07-18 09:08:28 +00:00
digest.js Rebuild the homepage as a distribution landing; add an SMTP seam (#178) 2026-07-18 07:39:47 +00:00
favicon-16.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
favicon-32.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
favicon-48.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
favicon.svg New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
filtersheet.js Compare basis inline; synced inline + sheet metric selector (both pages) (#82) 2026-07-12 07:45:12 +00:00
google03ab95daa090e8d9.html Add Google Search Console site-verification file (#128) 2026-07-16 18:56:42 +00:00
legend.html Make the brand lockup a home link on every page (#182) 2026-07-18 08:06:14 +00:00
logo-192.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
logo-maskable-192.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
logo-maskable-512.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
logo.png New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +00:00
manifest.webmanifest New brand mark: C1 step-curve logo wired through favicons, PWA icons, and header (#169) 2026-07-18 04:26:42 +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 Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
package.json Convert the frontend to ES modules; split nav.js by concern (#48) 2026-07-11 20:28:33 +00:00
push-client.js Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
shared.js Render every percentile through one rule (#186) 2026-07-18 09:08:28 +00:00
style.css Give the records strip real context, and colour the explore cards (#183) 2026-07-18 08:19:27 +00:00
subscriptions.html Make the brand lockup a home link on every page (#182) 2026-07-18 08:06:14 +00:00
subscriptions.js Push: surface delivery failures (no longer a silent success) (#157) 2026-07-17 00:12:14 +00:00
sw.js Add PWA + Web Push delivery for weather alerts (#95) 2026-07-15 23:21:06 +00:00
units.js Give climate/city/record pages full header parity + working °F/°C (#124) 2026-07-16 17:48:30 +00:00