api.weather.gov returns HTTP 200 for offshore marine stations (forecastOffice
NH2) but with gridId, gridX and gridY all explicitly null -- those locations
have no land grid. getAndFormatPoint copied those fields through unchecked, so
it returned a truthy object with null fields. The caller's `if (!point)` guard
cannot catch that, and the request is built as
https://api.weather.gov/gridpoints/null/null,null/forecasthttps://api.weather.gov/gridpoints/null/null,null/stations?limit=10
both of which 404.
Validate the grid fields rather than just the wrapper object and return null
when any are missing, so the affected city is skipped and drops off the
regional map -- the same outcome the module already produces for a point that
fails to load.
Reproduces against the live API with stations KGHB ("GB172") and KVAF
("East Breaks 643"), and is visible in tests/index.mjs on Houston and San
Antonio, whose regional maps include Gulf platforms.
Some locations such as Denver return no pressure reading, which appears as "NaN" in the Current Conditions display. Hide the pressure row by default and only reveal it when the value is a valid number.
The scroll cache in hazards, hourly and travel forecast is invalidated by
comparing element identity, but the lines element is persistent - a rebuild
only replaces its children - and displayHeight is a fixed value from css. Both
conditions stay false after the first measurement, so maxOffset keeps the
height of whatever content was measured first. When later content is taller,
the scroll clamps at the old offset and sits frozen there for the rest of the
screen's timing.
Invalidate the cache explicitly when the list is rebuilt, and reset
navBaseCount so new content scrolls from the top.
Invalidating alone would regress hazards: it refreshes every 60 seconds but a
long multi-alert scroll can run for several minutes, so rebuilding on every
refresh would restart it from the top and it would never reach the end. Each
display now also compares a signature of the content it is about to render and
skips the rebuild entirely when nothing changed, leaving an in-progress scroll
undisturbed. Hourly's signature includes the starting hour because its row
labels are derived from the current time.