fix(recent-imagery): keep HLS drapes and empty halves steady when a probe gives no answer

- A Worldview 200 without Data-Present no longer takes an HLS day already on
  the map off it: the source reports only the halves that answered, and the
  renderer drapes a PNG on every part not confirmed empty.
- A re-probe keeps the last explicit answer for each half, so a side confirmed
  empty stays undraped when it does not answer again.
- A host change noticed while rendering after a probe sends a full
  notification, so the panel updates the divider.
- Tests: the short-arc refusal asserts the measured box, the widening test
  expects slot B on top on both sides, and the drape-policy cases are one
  table; the widening test moves into rendering.test.mjs.
- Shared box key and Data-Present parsing; transport errors pass through
  unchanged; unreachable guards and repeated comments removed; docs describe
  partial vs. unknown coverage.
This commit is contained in:
German Khokhlov committed 2026-11-20 19:20:49 +04:00
1 parent 8fd0a35f6a
commit 1f64a9ce44
19 files changed
+348 -272

No files matched your search

+11 -2
View File
@@ -10,6 +10,7 @@ import {
IMAGERY_BOX_POINTER_OWNER,
initImageryBoxTool,
} from './imageryBoxTool.js';
import { lonSpanDeg, validateBox } from '../layers/recentImagery/model.js';
import { boxToolFakes } from '../layers/recentImagery/testDoubles.mjs';
import { createImageryBoxPreview } from '../layers/recentImagery/rendering.js';
import { fakeDrawPort } from '../testSupport/fakeDrawPort.mjs';
@@ -230,11 +231,19 @@ test('a drag whose short arc is still over the size limit is refused as too larg
lon: nx < 0.5 ? 100 : -100,
lat: ny,
});
const f = fixture({ pickWorld });
const refused = [];
const f = fixture({
pickWorld,
onCancel: (reason, message, box) => refused.push({ reason, message, box }),
});
f.tool.start();
f.fire('LEFT_DOWN', { position: { x: 100, y: 200 } });
f.fire('LEFT_UP', { position: { x: 800, y: 250 } });
assert.equal(f.boxes.length, 0);
assert.equal(f.cancels.at(-1)[0], 'too-large');
const { reason, message, box } = refused.at(-1);
assert.equal(reason, 'too-large');
assert.deepEqual([box.west, box.east], [100, -100], 'the short arc');
assert.equal(lonSpanDeg(box.west, box.east), 160);
assert.equal(message, validateBox(box).message);
await f.tool.destroy();
});