mirror of
https://github.com/Felitendo/Tanken.git
synced 2026-11-01 17:03:25 +01:00
Replace the monotonically-growing P20/P80 session anchor with a P10/P50/P90 band computed from the last 24 hours of station_prices, per country and fuel. Frontend renders a three-stop HSL gradient (green -> pale yellow at the median -> red), so 1.82 EUR and 1.84 EUR near the median read as near-identical instead of greenish vs brownish. When the band is missing (API down, empty DB, <50 samples), markers stay neutral grey — no fallback to the old session-anchor logic. - station_prices.fuel_type column + idempotent backfill from scan_locations (DE) and station_cache (AT) - persistPriceSnapshot now writes one snapshot per fuel so fuel_type is correct on every row - new getCountryPriceBand with a 10-minute in-memory cache - new GET /api/price-band?fuel=...