mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Say why Transit and Bike Share rows are empty outside coverage
Over a city with no feed or system (London, Tokyo) both rows read "ON · — · never", the same as a feed that never answered. Transit already computed a coverage note but put it only in `coverage`, which the row does not show; Bike Share reported nothing at all. Both layers now report a `zoom-in` guidance status with a `statusMessage`: "Fly below 3,000 km to a covered region" / "No feed here yet · N regions available" for Transit, and "Fly below 48 km to a covered city" / "No bike share here yet · N systems available" for Bike Share. A loading or failed Bike Share city keeps its own text. Leaving coverage clears the layer's last-update time, so the row no longer dates data it no longer draws. The coverage-note translations move from the voice card into `translateStatusMessage` (ui/statusText.js), which the Layers row and the voice card now share.
This commit is contained in:
1 parent
7d8b80db0a
commit
b6ad32009f
23 files changed
+459
-37
No files matched your search
@@ -240,17 +240,20 @@ export function createQueries({ state, parts }) {
|
||||
const health = aggregateTransitFeedHealth(statuses, now);
|
||||
const count = state._vehicles.size;
|
||||
if (state._enabled && active.length === 0) {
|
||||
// English data (the analyst's empty note to the model, and the Layers
|
||||
// row's prompt); both show it through translateStatusMessage
|
||||
// (ui/statusText.js).
|
||||
const note = state._altitudeGateOpen
|
||||
? `No feed here yet · ${TRANSIT_ENABLED_FEEDS.length} regions available`
|
||||
: `Fly below ${Math.round(ACTIVATION_ALTITUDE_M / 1000).toLocaleString('en-US')} km to a covered region`;
|
||||
return {
|
||||
count: 0,
|
||||
lastUpdate: state._lastUpdate,
|
||||
error: null,
|
||||
source: 'GTFS-RT',
|
||||
status: 'zoom-in',
|
||||
// English data (the analyst's empty note to the model); the voice
|
||||
// card shows it through NOTE_PATTERNS (voice/resultDisplay.js).
|
||||
coverage: state._altitudeGateOpen
|
||||
? `No feed here yet · ${TRANSIT_ENABLED_FEEDS.length} regions available`
|
||||
: `Fly below ${Math.round(ACTIVATION_ALTITUDE_M / 1000).toLocaleString('en-US')} km to a covered region`,
|
||||
statusMessage: note,
|
||||
coverage: note,
|
||||
};
|
||||
}
|
||||
// Age is shown by the same rule the row state uses, so the text and the
|
||||
|
||||
Reference in new issue
Block a user