Tighten the provider-label comments and docs

This commit is contained in:
German Khokhlov committed 2026-11-04 18:15:16 +04:00
1 parent 9b7d9ad537
commit 55e6c0017c
5 files changed
+7 -9

No files matched your search

+1 -2
View File
@@ -53,8 +53,7 @@ export function createSubject({ state: layerState, services, parts, source }) {
const vesselsState = sourceStates['ais-live-vessels'];
const installationsState = sourceStates['military-installations'];
const evaluatedAt = Date.now();
// Whether the provider answered as a fallback or from a stale snapshot.
// A poll in flight does not change that, and the source revision ignores it.
// A poll in flight keeps FALLBACK or STALE: the revision key ignores loading.
// Before the first answer there is no snapshot, so loading stays.
const sourceStatus = (sourceState) => {
const feedState = layerFeedState(
+1 -1
View File
@@ -548,7 +548,7 @@ export function createQueries({
// backing off, say how long until the next attempt instead of leaving
// the user to guess whether anything is still happening.
retryInSec: aisRetryInSec(),
// The provider the last snapshot named, as flights and military report it.
// Same field as flights and military, so Contacts names the provider.
source: layer.source,
};
},
-1
View File
@@ -111,7 +111,6 @@ export function updateContext(info, heading) {
if (shown) {
shown.count = cohort.count === null ? '?' : String(cohort.count);
shown.unknown = cohort.relationship === 'UNKNOWN';
// The provider that answered, named as the Layers panel names it.
shown.source = sourceStatusLabel(cohort.source, cohort.sourceStatus);
}
if (cohort.count === null) unknownCount += 1;