Merge origin/main: shipwrecks, news, transit fronts, signal-lost trails and uncredited photos on the renderer's ports

Upstream's layers and changes are carried onto the ports, with no Cesium
outside src/render and no reach into the viewer:

- Shipwrecks draw as one icon set, clicked through the input dispatcher.
- News draws through draw sets, the camera port and the input dispatcher;
  its beacons pulse each frame through the frame port.
- The scene occlusion probe moves into src/render/cesium and reaches
  detection through a new application hook, createOcclusionProbe; its
  private Cesium reads go through internals.js.
- Flight and military trails, the stale and SIGNAL LOST cue, coasting and
  following the world clock run on the draw and frame ports. GPU icons
  follow the scene clock while the world clock is followed, and fade when
  stale. A report that holds is not planned again every tick.
- Vessels are keyed by their record id.

The stub boot now enables military, shipwrecks and news as well.
This commit is contained in:
Sameh Khamis committed 2026-11-10 20:03:28 -08:00
commit a755f63638
331 files changed
+40654 -1666

No files matched your search

+74
View File
@@ -37,6 +37,7 @@ import {
} from './gevRealtime.js';
import { createVoiceCostTracker } from './voiceCost.js';
import { createTestVoiceUi } from '../testSupport/voiceUi.mjs';
import { setLocale, t } from '../i18n/index.js';
/** A viewer over `scene` whose renderer's frame port is the scene's own loop. */
@@ -3720,3 +3721,76 @@ test('voice runs app actions itself and other tools through the catalog', async
assert.deepEqual(disposals, [['removed']]);
assert.equal(withToolCatalog(runner, undefined), runner);
});
test('the controller forwards viewport escalation diagnostics to its debug log', async () => {
const records = [];
const controller = new GevRealtimeController({
ui: createTestVoiceUi(),
runner: async () => ({ ok: true }),
radioLayer: { subscribePlaybackControls: () => () => {}, setVoiceDucked() {} },
});
controller.debugLog = (event, detail) => records.push({ event, detail });
controller.dc = { readyState: 'open', send() {}, close() {} };
assert.equal(
await controller.sendVisualContextIfUseful({
action: 'get_entity_context',
scene: { basemap: { viewScale: 'regional' } },
}),
false,
);
assert.deepEqual(
records.filter((record) => record.event.startsWith('viewport_context.')),
[{
event: 'viewport_context.decision',
detail: { contextId: 1, send: false, reason: 'view-scale-not-local', viewScale: 'regional' },
}],
);
});
test('a missing server key says where to add it, without the microphone hint, in every language', () => {
const ui = createTestVoiceUi();
const controller = new GevRealtimeController({
ui,
runner: async () => ({ ok: true }),
radioLayer: { subscribePlaybackControls: () => () => {}, setVoiceDucked() {} },
});
try {
controller.reportError(
'Realtime connection',
Object.assign(new Error('OPENAI_API_KEY is not set'), { code: 'API_KEY_MISSING' }),
);
assert.equal(ui.state.error.text, 'Needs OPENAI_API_KEY — add it in Provider Settings');
assert.equal(ui.state.error.hint, false);
setLocale('es');
assert.notEqual(ui.state.error.text, 'Needs OPENAI_API_KEY — add it in Provider Settings');
assert.match(ui.state.error.text, /OPENAI_API_KEY/);
assert.equal(ui.state.error.hint, false);
setLocale('en');
controller.reportError('Realtime connection', new Error('ICE failed'));
assert.match(ui.state.error.text, /ICE failed/);
assert.equal(ui.state.error.hint, true);
} finally {
setLocale('en');
}
});
test('a status from a shared helper is worded again after a language change', () => {
const ui = createTestVoiceUi();
const controller = new GevRealtimeController({
ui,
runner: async () => ({ ok: true }),
radioLayer: { subscribePlaybackControls: () => () => {}, setVoiceDucked() {} },
});
try {
controller.setStatus('listening', 'Radio did not start');
assert.equal(ui.state.detail.text, 'Radio did not start');
setLocale('es');
assert.equal(ui.state.detail.text, t('Radio did not start'));
assert.notEqual(ui.state.detail.text, 'Radio did not start');
} finally {
setLocale('en');
}
});