fix(recent-imagery): keep drapes and proven halves steady across re-probes

- The renderer compares the rectangles it actually drapes, so a probe that
  confirms the same halves no longer rebuilds a shown layer.
- A re-probe of a present day keeps a side it proved earlier through a
  transient failure and drops it only on fresh empty evidence.
- DETAILS shows partial coverage when a side is confirmed empty; the
  presentBoxes contract of the source is documented.
- probeHalf, the presentBoxes filter, requestBoxes and mount are simplified;
  the frozen-response Proxy is gone.
- Duplicate source tests move into their own suites and share the existing
  fixtures; tests pin the exact ±180 seam and the dateline refusals.
- Comments, CURRENT-STATE and the changelog fragment are shortened and match
  the JPEG / PNG drape rules.
This commit is contained in:
German Khokhlov committed 2026-11-19 18:50:06 +04:00
1 parent ccffaeca4d
commit fc137bef85
21 files changed
+715 -1093

No files matched your search

+15 -3
View File
@@ -22,7 +22,7 @@ import RecentImageryReadout from './recentImagery/RecentImageryReadout.vue';
import {
PRODUCTS,
hhmm,
lonSpanDeg,
nonCrossingBoxes,
wvsSnapshotUrl,
} from '../layers/recentImagery/model.js';
import { displayDay, displayMetres } from '../layers/recentImagery/display.js';
@@ -142,6 +142,16 @@ function coverageText(coverage) {
return t('unknown');
}
/** A present day covers the box only in part when its probe omits a side. */
function shownCoverage(candidate, box) {
const drapes = candidate.thumbnail?.availableBoxes;
return candidate.thumbnail?.status === 'present' &&
Array.isArray(drapes) &&
drapes.length < nonCrossingBoxes(box).length
? 'partial'
: candidate.coverage;
}
function cloudText(candidate) {
if (candidate.thumbnail?.status === 'empty') return t('no imagery');
if (!candidate.cloud) return t('cloud unknown');
@@ -579,7 +589,9 @@ export function createRecentImageryPanel({
}),
);
times.push(
t('Coverage {coverage}', { coverage: coverageText(focus.coverage) }),
t('Coverage {coverage}', {
coverage: coverageText(shownCoverage(focus, snapshot.box)),
}),
);
lines.push({ id: 'acquired', text: times.join(' · ') });
(focus.granules || []).forEach((granule, index) => {
@@ -785,7 +797,7 @@ export function createRecentImageryPanel({
// The snapshot is plate carrée: keep the box's degree aspect, with the
// longer side at the size limit.
const size = longerSideKm(snapshot.boxSizeKm) > 25 ? 2048 : 1024;
const spanLon = lonSpanDeg(snapshot.box.west, snapshot.box.east) || 1;
const spanLon = Math.abs(snapshot.box.east - snapshot.box.west) || 1;
const spanLat = Math.abs(snapshot.box.north - snapshot.box.south) || 1;
const width = Math.max(
1,