mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 11:42:21 +00:00
fix(recent-imagery): keep a half's explicit answer when the other half's probe fails
- The loader reads each half's Data-Present answer whatever the response status, and merges it before the thumbnail status rule, so a side Worldview confirmed empty stays undraped when the other side answers 503 or without the header, on a first probe and on a re-probe. - DETAILS shows partial coverage for a day with a confirmed-empty side even when its probe failed. - The dateline layer tests live in index.test.mjs on its shared fixture; the rendering test uses the model's boxKey.
This commit is contained in:
1 parent
1f64a9ce44
commit
8604968746
6 files changed
+212
-203
No files matched your search
@@ -139,13 +139,15 @@ function coverageText(coverage) {
|
||||
/** A confirmed-empty side means partial coverage. An unanswered side leaves coverage unknown. */
|
||||
function shownCoverage(candidate, box) {
|
||||
const { status, availableBoxes, emptyBoxes } = candidate.thumbnail ?? {};
|
||||
const halves = nonCrossingBoxes(box).length;
|
||||
if (emptyBoxes?.length && emptyBoxes.length < halves) return 'partial';
|
||||
if (
|
||||
status !== 'present' ||
|
||||
!Array.isArray(availableBoxes) ||
|
||||
availableBoxes.length >= nonCrossingBoxes(box).length
|
||||
availableBoxes.length >= halves
|
||||
)
|
||||
return candidate.coverage;
|
||||
return emptyBoxes?.length ? 'partial' : 'unknown';
|
||||
return 'unknown';
|
||||
}
|
||||
|
||||
function cloudText(candidate) {
|
||||
|
||||
Reference in new issue
Block a user