fix(street-level): Panoramax functional QA — nearest lookup, line cap order, hostile data

From an adversarial functional QA round against the live API:
- The nearest lookup missed pictures looking away from the click
  (place_position leaves them out at any tolerance): it now runs a
  bounding-box search beside it and ranks both by distance. A line
  clicked from high up searches its sequence within height / 100
  (50–400 m).
- The per-tile line cap kept the newest sequences, not the longest
  (lineCoverage re-sorted them): providers can now keep their decoded
  order (`keepOrder`).
- A long producer name froze the tab (quadratic email regex): linear
  check. A malformed link escape no longer fails the lookup; null or
  string coordinates no longer land at 0,0.
- A line with no camera type or day stays drawn under the filters.
- A sky click on a line changes nothing (as KartaView), instead of
  selecting a sequence with no cones.
- An unreadable tile reads as such; a failed neighbour z15 tile only
  thins the cones; unknown or refused ids say the picture is gone.
- Shared viewer: the sharp-panorama guard is per open (a late download
  of the previous photo no longer lets a second one start); an HD-only
  360° picture is shrunk or skipped like any original; panorama.js read
  the bitmap size after closing it, so 2:1 power-of-two panoramas
  clamped instead of wrapping.
- Tests for each, and for the gaps mutation testing found (preferred
  point, cone order, no reload within drawn tiles, newest-first gate,
  stale bitmap release, flat upgrade retry).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Said TurkseverandClaude Opus 5.5 committed 2026-10-14 13:34:25 +01:00
1 parent 00d2b73b6a
commit bce3044e0c
18 files changed
+699 -98

No files matched your search

+30
View File
@@ -167,3 +167,33 @@ test('an image uploads as RGBA and its bitmap is released; closing hands the tex
);
assert.equal(renderer.hasImage(), false);
});
test('a power-of-two bitmap wraps in longitude even though it is closed once uploaded', (t) => {
const { gl, renderer } = stubPanorama(t);
const wraps = [];
gl.texParameteri = (target, name, value) => wraps.push([name, value]);
gl.TEXTURE_WRAP_S = 'WRAP_S';
gl.REPEAT = 'REPEAT';
gl.CLAMP_TO_EDGE = 'CLAMP';
const bitmap = {
width: 2048,
height: 1024,
// A closed ImageBitmap measures 0×0.
close() {
this.width = 0;
this.height = 0;
},
};
renderer.setImage(bitmap);
assert.deepEqual(
wraps.find(([name]) => name === 'WRAP_S'),
['WRAP_S', 'REPEAT'],
);
wraps.length = 0;
renderer.setImage({ width: 2000, height: 1000 });
assert.deepEqual(
wraps.find(([name]) => name === 'WRAP_S'),
['WRAP_S', 'CLAMP'],
'other sizes clamp (WebGL 1 repeats powers of two only)',
);
});