Tighten coverage prompt comments and docs

This commit is contained in:
German Khokhlov committed 2026-11-06 20:20:11 +04:00
1 parent 3a78f40024
commit 5c4918affb
12 files changed
+31 -54

No files matched your search

+2 -4
View File
@@ -1,7 +1,5 @@
// The Transit coverage prompt names the altitude the closed gate
// actually opens at. Descending over Boston to 2,900 km (below 3,000 km, above
// the 2,850 km enter threshold) loads nothing, so a prompt "Fly below 3,000 km"
// asks for something the camera has already done.
// The Transit prompt names the altitude the gate opens at: at 2,900 km over
// Boston (under 3,000 km, above the 2,850 km enter threshold) nothing loads.
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { createState } from './state.js';
+2 -3
View File
@@ -245,9 +245,8 @@ 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).
// English: the analyst's empty note and the row's prompt, both shown
// through translateStatusMessage (ui/statusText.js).
const note = state._altitudeGateOpen
? `No feed here yet · ${TRANSIT_REGION_COUNT} regions available`
: `Fly below ${Math.round(ACTIVATION_ENTER_ALTITUDE_M / 1000).toLocaleString('en-US')} km to a covered region`;
+2 -4
View File
@@ -111,8 +111,7 @@ export function createViewport({ state, services, parts }) {
changed = true;
}
}
// Leaving coverage leaves nothing on the map to date: a row that read
// "26s ago" over an empty view would claim a feed that is no longer here.
// Nothing is left on the map to date.
if (desired.size === 0) state._lastUpdate = null;
for (const [feedId, feed] of desired) {
if (!state._activeFeeds.has(feedId)) {
@@ -124,8 +123,7 @@ export function createViewport({ state, services, parts }) {
parts.ingestion.sweepAgedVehicles(Date.now());
parts.rendering.syncRenderHold();
governorRequestRender('transit-proximity');
// The row's text follows the camera (coverage prompt, feed list), so it
// repaints now instead of at the next 15 s manager tick.
// Repaint now: the row follows the camera, the manager tick is 15 s.
if (changed) state._dataManager?.refreshLayerStats?.('transit');
}