mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
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:
1 parent
dd8ba562d2
commit
56f0d2e203
4 files changed
+80
-6
No files matched your search
@@ -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';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user