The renderer seam: clicks go to the newest tool, recession and display groups through the contract, drawing at parity with Cesium

- Clicks: when two tools want the globe's clicks, the newest takes them and the older is told and turns itself off; a click is decided when it arrives, and ambient selection fires only when no tool holds the pointer. The "map is busy" paths and their strings are removed.
- Recession: the limb fade is shared (src/render/recession.js) and reaches icon and model sets through SetSpec.recede; tuning applies on the next frame.
- Display panel groups are published through src/ui/displayGroups.js; the Weather group and src/viewWeather.js are removed.
- Draw port: a set whose icons only move is moved in place, and models that did not change are not restyled each frame, so moving fleets cost what they did when drawn directly; an untinted, fully opaque model is drawn without a colour.
- Conformance: input.lease.lost checks the new lease inside onLost and reports a throwing onLost; draw.sets.recede covers model sets.
- QA scripts read the renderer host instead of internals the seam replaced.
This commit is contained in:
Sameh Khamis committed 2026-11-15 17:03:09 -08:00
1 parent a0d299523d
commit 0ab31d4fb8
130 files changed
+5438 -1674

No files matched your search

+1 -56
View File
@@ -10,7 +10,6 @@ import { localizeNotice } from './recentImagery.js';
const REFUSALS = [
'Drag to size the box', // imageryBoxTool.js, click without drag
'Press on the ground, not the sky', // imageryBoxTool.js
'draw is using the pointer — close it first', // imageryBoxTool.js, pointer busy
'Point the camera at the ground to use the view', // layers/recentImagery/index.js
'That point cannot anchor a box', // layers/recentImagery/index.js
...[
@@ -26,62 +25,12 @@ const REFUSALS = [
}),
];
// The pointer-busy refusal names the owner by its internal id; the notice
// shows the tool's name instead, in English too.
const SHOWN_EN = new Map([
[
'draw is using the pointer — close it first',
'Draw is using the pointer — close it first',
],
]);
test('en: refusals stay English', () => {
setLocale('en');
for (const text of REFUSALS)
assert.equal(localizeNotice(text), SHOWN_EN.get(text) ?? text);
for (const text of REFUSALS) assert.equal(localizeNotice(text), text);
assert.ok(REFUSALS.includes('Imagery stops at ±85.05° latitude'));
});
test('E3/E12: the pointer owner is named by its tool, never by its id', () => {
const owners = {
en: {
draw: 'Draw',
directions: 'Directions',
'recent-imagery-box': 'Recent imagery',
},
ru: {
draw: 'Рисование',
directions: 'Маршруты',
'recent-imagery-box': 'Свежие снимки',
},
es: {
draw: 'Dibujo',
directions: 'Indicaciones',
'recent-imagery-box': 'Imágenes recientes',
},
};
try {
for (const [locale, names] of Object.entries(owners)) {
setLocale(locale);
for (const [id, name] of Object.entries(names)) {
const shown = localizeNotice(
`${id} is using the pointer — close it first`,
);
assert.ok(shown.includes(name), `${locale} ${id}: ${shown}`);
assert.ok(!shown.includes(id), `${locale} ${id} leaked: ${shown}`);
}
}
setLocale('en');
assert.equal(
localizeNotice('measure is using the pointer — close it first'),
'measure is using the pointer — close it first',
'an unregistered owner falls back to its id',
);
} finally {
setLocale('en');
}
});
for (const locale of ['es', 'ru']) {
test(`${locale}: box-tool and model refusals are translated`, () => {
setLocale(locale);
@@ -92,10 +41,6 @@ for (const locale of ['es', 'ru']) {
localizeNotice('Imagery stops at ±85.05° latitude'),
/85,05/,
);
assert.doesNotMatch(
localizeNotice('draw is using the pointer — close it first'),
/\bdraw\b/,
);
} finally {
setLocale('en');
}