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

+18 -28
View File
@@ -645,44 +645,34 @@ try {
`owner=${afterClear.pointerOwner}`,
);
// ── 8. A tool holding the pointer blocks placement, and says so. ─────────
// ── 8. Arming takes the pointer from a tool holding it, which is told. ──
await page.evaluate(() => {
window.__gevQaDrawLost = 0;
// A claim answers with a lease; the release takes that lease back.
window.__gevQaDrawLease = window.__gevQa.claimPointer('draw');
window.__gevQaDrawLease = window.__gevQa.claimPointer('draw', {
onLost: () => (window.__gevQaDrawLost += 1),
});
});
await clickChip('set-a');
const blocked = await layerState();
const taken = await layerState();
const lost = await page.evaluate(() => window.__gevQaDrawLost);
check(
"another tool's pointer claim is never stolen",
blocked.pointerOwner === 'draw',
`owner=${blocked.pointerOwner}`,
'the newest claim takes over: Directions holds the pointer',
taken.pointerOwner === 'directions',
`owner=${taken.pointerOwner}`,
);
check('the tool it replaced is told once', lost === 1, `told=${lost}`);
check(
'nothing is armed, and the row says why the click would do nothing',
blocked.chips.find((chip) => chip.id === 'set-a')?.active === false &&
/Another map tool/.test(blocked.stats.error || ''),
blocked.stats.error,
'SET A is armed, and the row has nothing to complain of',
taken.chips.find((chip) => chip.id === 'set-a')?.active === true &&
!taken.stats.error,
taken.stats.error,
);
// The row is not where the operator is looking after pressing a chip, so the
// refusal also has to reach the app's toast (owner field test).
const toast = await page.evaluate(() => {
const node = document.getElementById('toast');
return {
text: node?.textContent || '',
visible: !!node?.classList.contains('visible'),
};
});
check(
'the refusal reaches the app toast, naming the tool and how to leave it',
/Draw is active/.test(toast.text) && /then set A/.test(toast.text),
JSON.stringify(toast.text),
);
check('and that toast is actually on screen', toast.visible);
await shot(`05-${LABEL}-pointer-blocked-toast.jpg`);
const released = await page.evaluate(() =>
const staleReleased = await page.evaluate(() =>
window.__gevQa.releasePointer(window.__gevQaDrawLease),
);
check('and it gets the pointer back when it lets go', released);
check("the replaced tool's late release frees nothing", !staleReleased);
await clickChip('set-a');
// ── 9. Denver: maneuver dots sit on the ground, not at sea level. ────────
if (!SKIP.has('denver')) {