fix: carry weather and fire freshness into tool answers

get_weather dropped the proxy's stale status and get_active_fires dropped
FIRMS staleness and failed satellite sources, so answers and the HUD caption
read them as current. Both now report them, and the caption context marks
such sections stale or degraded.
This commit is contained in:
Sameh Khamis committed 2026-10-02 15:21:36 -07:00
1 parent dd8ba562d2
commit 56f0d2e203
4 files changed
+80 -6

No files matched your search

+5 -3
View File
@@ -90,9 +90,11 @@ const AWARENESS_SECTIONS = [
function sectionFeedState(section) {
if (section.unavailable) return 'unavailable';
const data = section.data || {};
return data.freshness === 'stale' || data.stale === true
? 'stale'
: 'nominal';
if (data.freshness === 'stale' || data.stale === true) return 'stale';
// Answered, but some of the feeds or satellites behind it did not.
if (data.missing_sources?.length || data.unavailable_feeds?.length)
return 'degraded';
return 'nominal';
}
/**