Fix Data Library share restore, dense tile layers and EPC partition reads

- Share links: the compact /share/<code> format carries the switched-on
  library entries (field 29), so Copy Link keeps them; a share opened in the
  same tab restores them; any share decides what is on, so one with every
  library entry off no longer switches on the recipient's stored entries.
- A tile entry too dense at its minimum zoom (Norway cadastre z14, depth z11)
  is hidden below that scale via minimumTerrainLevel instead of allocating
  millions of tiles when zoomed out.
- EPC partitions keep the full extent for exclusion and the 98 % extent for
  ranking only; the old trimmed-only extents are retired.
- Partition index footers that fail transiently are retried; an incomplete
  index is never cached as complete, a complete prior index is kept, and it
  is rebuilt after five minutes.
- Views that leave touching partitions unread are partial; listing and
  footer bodies are capped and ranges validated.
- The Browse dialog relabels after a language switch.
This commit is contained in:
Said Turksever committed 2026-11-12 22:37:34 +00:00
1 parent 871b7f0fcc
commit 24ccdd4dc3
20 files changed
+1220 -162

No files matched your search

+44
View File
@@ -448,3 +448,47 @@ test('a link made away from live carries its world time to the page that opens i
assert.equal(liveOpener.parseInitialHash().worldTime, null);
liveOpener.destroy();
});
test('a copied link carries the Data Library selection to a clean recipient', (t) => {
installTab(t, SHARE_A);
const sharer = new ShareLinkManager(fakeViewer());
sharer.setLibraryParamsEncoder((params) => params.set('lib', '03.0a'));
const code = new URL(sharer.buildLink()).pathname.split('/').at(-1);
sharer.destroy();
const opener = new ShareLinkManager(fakeViewer(), { initialShareCode: code });
assert.deepEqual(opener.parseInitialHash().library, ['03', '0a']);
assert.deepEqual(opener.initialLibraryTokens, ['03', '0a']);
opener.destroy();
// A link with every library entry off is a share that switches none on.
const none = new ShareLinkManager(fakeViewer());
const noneCode = new URL(none.buildLink()).pathname.split('/').at(-1);
none.destroy();
const noneOpener = new ShareLinkManager(fakeViewer(), {
initialShareCode: noneCode,
});
noneOpener.parseInitialHash();
assert.deepEqual(noneOpener.initialLibraryTokens, []);
noneOpener.destroy();
// A page opened without a share leaves the library its stored selection.
installTab(t, '');
const plain = new ShareLinkManager(fakeViewer());
plain.parseInitialHash();
assert.equal(plain.initialLibraryTokens, null);
plain.destroy();
});
test('a share navigated to in this tab hands its library tokens over', (t) => {
const tab = installTab(t, SHARE_A);
const manager = new ShareLinkManager(fakeViewer());
manager.parseInitialHash();
const received = [];
manager.setLibraryShareListener((tokens) => received.push(tokens));
manager.watchNavigation(() => {});
tab.navigate(`${SHARE_B}&lib=01`);
tab.navigate(SHARE_A);
tab.back();
assert.deepEqual(received, [['01'], [], ['01']]);
manager.destroy();
});