Fix the follow-up review findings in import, layers, startup and engines

- KML/KMZ import: a per-file canvas budget and cache for ground overlays,
  limits on rings and vertices of raised polygons, overlays across 360° and
  near the poles, degenerate holes, polar and single-latitude fills,
  absolute overlays at their altitude, overlay order by drawOrder as on
  Cesium, and pins on tiles keep their measured height.
- Points on the surface: OSM Places and Street Level cones share the
  surface sampler and sit on the terrain before they are measured, within
  a sampling budget per pass; Cockpit's contact-dot bank keeps the dot
  atlas, and a failed fleet model loads again after a pause.
- Startup: the loading screen lifts after the share-link view is restored,
  the retry screen names the failed engine and takes focus, and the
  fallback toast stays for 6 s.
- Engines: an engine switch lands a running camera flight at its
  destination (camera.completeFlight on both engines), the sighting card
  leaves focus on the engine picker after a switch, and a Cesium model
  error stays with the instance that failed.
- The MCP panel builds again: its wind-mesh alias resolves to the stub.
- QA: the wildlife switch waits for the camera to rest, GBFS --w2 says it
  needs the dev server, and test fixtures are shared instead of copied.
This commit is contained in:
German Khokhlov committed 2026-11-10 01:57:11 +04:00
1 parent 0ef29781e5
commit 60fb8fee07
82 files changed
+2363 -1574

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
// A Vite build through the panel alias resolves renderers.js's relative
// import of Navara's wind mesh to the stub (scripts/build-panel.mjs uses the
// same alias).
import test from 'node:test';
import assert from 'node:assert/strict';
import { mkdtempSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { build } from 'vite';
import { panelBuildConfig } from './panel.js';
test('a Vite build resolves the relative wind-mesh import through the panel alias', async (t) => {
const root = mkdtempSync(join(tmpdir(), 'panel-alias-'));
t.after(() => rmSync(root, { recursive: true, force: true }));
mkdirSync(join(root, 'src/app/layers'), { recursive: true });
mkdirSync(join(root, 'src/globe/navara'), { recursive: true });
writeFileSync(
join(root, 'src/app/layers/renderers.js'),
"export const load = () => import('../../globe/navara/windFlowMesh.js');\n",
);
writeFileSync(
join(root, 'src/globe/navara/windFlowMesh.js'),
'export const real = true;\n',
);
const { resolve } = panelBuildConfig({ plugins: [] });
const [output] = await build({
configFile: false,
root,
logLevel: 'silent',
resolve,
build: {
outDir: join(root, 'out'),
write: false,
lib: {
entry: join(root, 'src/app/layers/renderers.js'),
formats: ['es'],
fileName: 'x',
},
rollupOptions: { output: { inlineDynamicImports: true } },
},
});
const [chunk] = output.output;
assert.match(chunk.code, /Navara is unavailable in the panel/);
assert.doesNotMatch(chunk.code, /real = true/);
});