docs(imagery): tighten cancellation notes and match them to the code

This commit is contained in:
German Khokhlov committed 2026-11-18 16:39:56 +04:00
1 parent 3348e3517e
commit a0db300d54
4 files changed
+12 -12

No files matched your search

+1 -2
View File
@@ -833,8 +833,7 @@ export function createRecentImageryLayer({
pruned &&
(_followKey !== previousFollow || _previewKey !== previousPreview)
) {
// A new automatic day can have had its probe cancelled while offscreen.
// Re-request it even when the visible window has not moved.
// The new automatic day's probe may have been cancelled off-screen.
requestThumbnails();
}
if (pruned) syncRender();
+5 -8
View File
@@ -169,9 +169,8 @@ export function createThumbnailLoader({
if (existing) {
touch(existing);
if (existing.loading && existing.controller?.signal.aborted) {
// A known-present re-fetch keeps its metadata when cancelled. If
// that day is wanted again before cancellation settles, give the
// new request its own entry so the old run cannot discard it.
// Wanted again before the abort settles: a fresh entry, so the old
// run cannot discard it.
const renewed = {
...existing,
priority,
@@ -237,11 +236,9 @@ export function createThumbnailLoader({
},
/**
* Keep only refinement work still wanted by the current UI intent.
*
* Known decoded/probed entries may remain warm under the LRU residency
* policy, but queued or in-flight acquisition for no-longer-wanted keys is
* cancelled. A cancelled known-present re-fetch keeps its proven metadata.
* Cancel queued and in-flight work for every key not in `keys`. Settled
* entries stay under the LRU; a cancelled re-fetch of a present day keeps
* its status.
* @param {Iterable<string>} keys
*/
retain(keys) {