mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
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:
commit
a755f63638
331 files changed
+40654
-1666
No files matched your search
@@ -6711,6 +6711,84 @@ test('analyst-only lookup distinguishes duplicate names and uses canonical aircr
|
||||
);
|
||||
});
|
||||
|
||||
test('analyst item display strings are single-line and bounded for voice', async () => {
|
||||
globalThis.window = globalThis.window || { clearTimeout, setTimeout, requestIdleCallback: null };
|
||||
const rows = [{ id: 'stable-id', name: 'Şehir\n' + 'x'.repeat(3000), label: 'Town\tStation', operator: 'City\nPD', lat: 30, lon: -97 }];
|
||||
const { runner } = manifestRunner({ bikeshare: { getStats: () => ({ count: 1, lastUpdate: Date.now() }), getAnalystRecords: () => rows } });
|
||||
const result = await runner('analyst_query', { layers: ['bikeshare'], scope: { kind: 'anywhere' }, limit: 1 });
|
||||
assert.equal(result.ok, true);
|
||||
assert.equal(result.items[0].name.length, 180);
|
||||
assert.equal(result.items[0].label, 'Town Station');
|
||||
assert.equal(result.items[0].id, 'stable-id');
|
||||
for (const value of Object.values(result.items[0])) if (typeof value === 'string') assert.doesNotMatch(value, /[\r\n\t]/);
|
||||
});
|
||||
|
||||
test('analyst_query keeps canonical IDs raw so numbered references still fly to the station', async () => {
|
||||
globalThis.window = globalThis.window || { clearTimeout, setTimeout, requestIdleCallback: null };
|
||||
const { viewer, styleManager } = createVoiceNavigationHarness();
|
||||
const referents = createReferentRegistry();
|
||||
const longName = 'Station ' + 'é'.repeat(200);
|
||||
const spaced = 'Congress Ave & 2nd';
|
||||
const stations = [
|
||||
{ id: spaced, name: spaced, lat: 30.2672, lon: -97.7431 },
|
||||
{ id: longName, name: longName, lat: 30.2711, lon: -97.7437 },
|
||||
];
|
||||
const bikeshare = { getStats: () => ({ count: stations.length, lastUpdate: Date.now() }), getAnalystRecords: () => stations };
|
||||
const runner = createActionRunner({
|
||||
viewer, styleManager,
|
||||
dataManager: {
|
||||
layers: new Map([['bikeshare', { module: bikeshare }]]),
|
||||
isEnabled: () => true,
|
||||
getAll: () => [{ id: 'bikeshare', name: 'bikeshare', enabled: true, stats: bikeshare.getStats() }],
|
||||
},
|
||||
deixis: { referents },
|
||||
});
|
||||
const listed = await runner('analyst_query', { layers: ['bikeshare'], scope: { kind: 'anywhere' }, limit: 2 });
|
||||
assert.equal(listed.ok, true);
|
||||
const bySpaced = listed.items.find((item) => item.id === spaced);
|
||||
const byLong = listed.items.find((item) => item.id === longName);
|
||||
assert.ok(bySpaced && byLong, 'compact items keep the raw station-name IDs');
|
||||
assert.equal(bySpaced.name, 'Congress Ave & 2nd', 'display name is still normalized');
|
||||
assert.equal(byLong.name.length, 180, 'display name is still bounded');
|
||||
assert.equal(byLong.id.length, longName.length);
|
||||
const registered = referents.list();
|
||||
assert.equal(registered.length, 2, 'the analyst result became the numbered list');
|
||||
for (const ref of registered) {
|
||||
const station = stations.find((row) => row.id === ref.id);
|
||||
assert.ok(station, `referent ${ref.n} keeps the canonical ID`);
|
||||
const flown = await runner('fly_to_location', { referent: ref.n });
|
||||
assert.equal(flown.ok, true, `referent ${ref.n} resolves instead of "no longer loaded"`);
|
||||
assert.equal(flown.latitude, station.lat);
|
||||
assert.equal(flown.longitude, station.lon);
|
||||
}
|
||||
});
|
||||
|
||||
test('analyst_query keeps transit route IDs raw so a follow-up filter still matches', async () => {
|
||||
globalThis.window = globalThis.window || { clearTimeout, setTimeout, requestIdleCallback: null };
|
||||
for (const routeId of ['Route 17', 'R'.repeat(181)]) {
|
||||
const { viewer, styleManager } = createVoiceNavigationHarness();
|
||||
const vehicles = [{ id: 'bus-1', routeId, lat: 30, lon: -97 }];
|
||||
const transit = { getStats: () => ({ count: 1, lastUpdate: Date.now() }), getAnalystRecords: () => vehicles };
|
||||
const runner = createActionRunner({
|
||||
viewer, styleManager,
|
||||
dataManager: {
|
||||
layers: new Map([['transit', { module: transit }]]),
|
||||
isEnabled: () => true,
|
||||
getAll: () => [{ id: 'transit', name: 'transit', enabled: true, stats: transit.getStats() }],
|
||||
},
|
||||
});
|
||||
const listed = await runner('analyst_query', { layers: ['transit'], scope: { kind: 'anywhere' }, limit: 1 });
|
||||
assert.equal(listed.ok, true);
|
||||
assert.equal(listed.items[0].routeId, routeId);
|
||||
const followUp = await runner('analyst_query', {
|
||||
followUp: true,
|
||||
filters: [{ field: 'routeId', op: 'eq', value: listed.items[0].routeId }],
|
||||
});
|
||||
assert.equal(followUp.ok, true);
|
||||
assert.equal(followUp.count, 1, 'the returned route ID matches the same vehicle');
|
||||
}
|
||||
});
|
||||
|
||||
test('set_panel_open accepts the Authoring name for the scene panel', async () => {
|
||||
const calls = [];
|
||||
const runner = createGevActionRunner({
|
||||
|
||||
Reference in new issue
Block a user