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

+7 -4
View File
@@ -581,6 +581,8 @@ export function createRecentImageryLayer({
for (const slotId of SLOT_IDS) {
const candidate = candidateFor(shown[slotId]);
if (candidate && _hostInfo.collection) {
const { availableBoxes, emptyBoxes } =
thumbnails.get(candidate.key) ?? {};
renderer.showSlot(slotId, candidate, _box, {
alpha: _alpha,
splitDirection: !live
@@ -588,8 +590,8 @@ export function createRecentImageryLayer({
: (slotId === 'a') !== _swapped
? 'left'
: 'right',
// The halves the probe lets this product drape, unknown before it answers.
availableBoxes: thumbnails.get(candidate.key)?.availableBoxes,
availableBoxes,
emptyBoxes,
});
} else {
renderer.hideSlot(slotId);
@@ -904,16 +906,17 @@ export function createRecentImageryLayer({
_followKey === _focusKey &&
drapable(candidateFor(_followKey)) &&
applyPreview(_followKey);
// A pinned or previewed day that was still being probed drapes now.
const shown = plan();
const owned = renderer.getOwned?.() || {};
const drapesChanged = SLOT_IDS.some(
(slotId) => (owned[slotId]?.key || null) !== shown[slotId],
);
// One render per probe: the key can stay the same while its halves change.
// A host found moved changes the divider, so the panel renders in full.
const moved = !followed && syncHost();
if (!followed) syncRender();
notify('thumbnail');
if (pruned || followed || drapesChanged) notify();
if (pruned || followed || drapesChanged || moved) notify();
});
syncHost();
if (_box && !_candidates.length) void runSearch();