fix(street-level): re-check an unknown key, Esc leaves full screen, say why a view is empty

- A failed or missing key status is asked again on the next switch-on, and
  the check gives up after 10 s instead of holding LOADING forever.
- Waiting for the key status reads as LOADING while the layer is on.
- Esc shrinks the photo in full screen too, before the panel's own Esc.
- Destroying the panel with the iPhone popover open leaves no popover behind.
- An empty view says whether the filter emptied it.
- A freed upstream tile slot passes straight to the oldest waiter.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
German KhokhlovandClaude Opus 5.5 committed 2026-10-08 18:25:16 +04:00
1 parent d313b6e62c
commit 8e5e3cdd3b
10 files changed
+201 -30

No files matched your search

+12 -1
View File
@@ -405,7 +405,7 @@ test('identical concurrent tile requests share one upstream fetch', async () =>
test('at most a few upstream fetches run at once; the rest wait their turn', async () => {
let release;
const gate = new Promise((resolve) => (release = resolve));
let gate = new Promise((resolve) => (release = resolve));
await withUpstream(
async () => (await gate, ok()),
async ({ calls, call }) => {
@@ -419,6 +419,17 @@ test('at most a few upstream fetches run at once; the rest wait their turn', asy
const done = await Promise.all(pending);
assert.ok(done.every((res) => res.statusCode === 200));
assert.equal(calls.length, tiles, 'the waiting ones ran too');
// Every slot came back: a second burst runs as many at once again.
let reopen;
gate = new Promise((resolve) => (reopen = resolve));
const again = Array.from({ length: tiles }, (_, i) =>
call('/api/mapillary/tiles', `/coverage/14/${i}/4`),
);
await new Promise((resolve) => setTimeout(resolve, 10));
assert.equal(calls.length, tiles + TILE_UPSTREAM_CONCURRENCY);
reopen();
await Promise.all(again);
assert.equal(calls.length, 2 * tiles);
},
);
});