fix(webapp): large maps load from a tile pyramid; rc2 review fixes (#1282, #1283) #1284

Merged
claude-bot merged 4 commits from fix/4.6.2-rc3 into main 2026-10-30 05:45:27 +00:00
Collaborator

Closes #1282. Closes #1283.

For 4.6.2-rc3, on the owner's say (2026-10-30: "get issues opened up for what I found, fix them, and get rc3 cut").

#1282: large maps load from a pyramid

  • map_tiles.lowest_zoom / cut_lower_levels / write_lower_levels: after zoom 0, the worker cuts the picture at half size, a quarter and so on (LANCZOS, each level made from the one above) until it fits in one tile. An 8192 × 6144 map goes down to z = -5. levels.json ({"min_zoom": -n}) is written last, atomically, to say the levels are complete.
  • files_service.map_lowest_zoom reads it, returning 0 when it's missing or unreadable and clamping to -16..0. The map response carries tiles_min_zoom. The tile route refuses z outside -16..0 or a negative x/y before touching the disk.
  • MapCanvas sets minNativeZoom to tiles_min_zoom, so a fitted view reads that level's few tiles, and draws the 1024 px thumbnail underneath, removed on error. In the canvas test, a 3200 × 2400 map fitted to 800 × 600 reads fewer than 20 tiles at z = -2 instead of the 130 native ones.
  • backfill_map_thumbs also cuts the levels of any ready map without levels.json (it returns a levels count). It's already on the daily schedule, and the deploy runs it once.

#1283: from the owner's rc2 review

  • A trail group's summary shows Show or Hide (CSS on [open]), and choosing a stop's place on the map opens every group holding its stops.
  • The "Add a stop" marker searches list nothing until something is typed, except a portal's linked exits. The spot option reads "Or choose a spot on the map…".

Checked

  • Backend on docker-test: map tiles, maps API and edit API, pictures and files, the EXIF/bomb guard, export files and maps, and one-job-per-import map tasks: 855 passed, after one tile-count expectation was updated. ruff format and check pass.
  • Frontend: vitest over src/pages/wiki, src/wiki and src/pages/prep: 654 passed, with new tests for the pyramid level read and the thumbnail, nothing listed before typing, Show/Hide, and a place opening its session. eslint reports 0 errors.
  • changelog.py check passes.

Not checked

  • Exadia's real load time is measured on dev after rc3 is deployed and the backfill has run.

🤖 Generated with Claude Code

Closes #1282. Closes #1283. For 4.6.2-rc3, on the owner's say (2026-10-30: "get issues opened up for what I found, fix them, and get rc3 cut"). ### #1282: large maps load from a pyramid - `map_tiles.lowest_zoom` / `cut_lower_levels` / `write_lower_levels`: after zoom 0, the worker cuts the picture at half size, a quarter and so on (LANCZOS, each level made from the one above) until it fits in one tile. An 8192 × 6144 map goes down to z = -5. `levels.json` (`{"min_zoom": -n}`) is written last, atomically, to say the levels are complete. - `files_service.map_lowest_zoom` reads it, returning 0 when it's missing or unreadable and clamping to -16..0. The map response carries `tiles_min_zoom`. The tile route refuses z outside -16..0 or a negative x/y before touching the disk. - `MapCanvas` sets `minNativeZoom` to `tiles_min_zoom`, so a fitted view reads that level's few tiles, and draws the 1024 px thumbnail underneath, removed on error. In the canvas test, a 3200 × 2400 map fitted to 800 × 600 reads fewer than 20 tiles at z = -2 instead of the 130 native ones. - `backfill_map_thumbs` also cuts the levels of any ready map without `levels.json` (it returns a `levels` count). It's already on the daily schedule, and the deploy runs it once. ### #1283: from the owner's rc2 review - A trail group's summary shows Show or Hide (CSS on `[open]`), and choosing a stop's place on the map opens every group holding its stops. - The "Add a stop" marker searches list nothing until something is typed, except a portal's linked exits. The spot option reads "Or choose a spot on the map…". ### Checked - Backend on `docker-test`: map tiles, maps API and edit API, pictures and files, the EXIF/bomb guard, export files and maps, and one-job-per-import map tasks: **855 passed**, after one tile-count expectation was updated. ruff format and check pass. - Frontend: vitest over `src/pages/wiki`, `src/wiki` and `src/pages/prep`: **654 passed**, with new tests for the pyramid level read and the thumbnail, nothing listed before typing, Show/Hide, and a place opening its session. eslint reports 0 errors. - `changelog.py check` passes. ### Not checked - Exadia's real load time is measured on dev after rc3 is deployed and the backfill has run. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
#1282: the worker cuts each map at half size, a quarter and so on until it
fits one tile, and writes levels.json last to say the levels are complete.
The map response carries tiles_min_zoom (0 without levels.json), and
MapCanvas reads that level when zoomed out, over the thumbnail drawn at
once. backfill_map_thumbs also cuts the levels of maps cut before. The tile
route refuses a z outside -16..0 or a negative x/y before the disk.

#1283: a folded trail group says Show/Hide and opens when its stop's place
is chosen on the map; the Add a stop searches list nothing until typed,
apart from a portal's linked exits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test(webapp): an imported 300 px map is cut at two levels (#1282)
Some checks failed
CI / Does this change touch the recording path? (pull_request) Successful in 31s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m0s
CI / Which journeys does this change need? (pull_request) Successful in 30s
CI / Bot/backend version sync (pull_request) Successful in 1m14s
CI / Backend lint (ruff) (pull_request) Successful in 1m24s
CI / Feedback site tests (pull_request) Successful in 2m8s
CI / Bot tests and audit (pull_request) Successful in 4m29s
CI / Frontend (shard 2/2) (pull_request) Successful in 8m18s
CI / Docker image build (pull_request) Successful in 8m52s
CI / Backend migration, tests, and audit (pull_request) Failing after 9m53s
CI / Frontend (shard 1/2) (pull_request) Successful in 9m57s
CI / End-to-end journeys (desktop) (pull_request) Successful in 15m21s
422f786d43
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-bot scheduled this pull request to auto merge when all checks succeed 2026-10-30 04:12:57 +00:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test(webapp): a map stored upright is cut at its lower levels too (#1282)
All checks were successful
CI / Does this change touch the recording path? (pull_request) Successful in 26s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot/backend version sync (pull_request) Successful in 46s
CI / Which journeys does this change need? (pull_request) Successful in 23s
CI / Backend lint (ruff) (pull_request) Successful in 55s
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m0s
CI / Feedback site tests (pull_request) Successful in 1m28s
CI / Bot tests and audit (pull_request) Successful in 3m7s
CI / Docker image build (pull_request) Successful in 6m4s
CI / Frontend (shard 2/2) (pull_request) Successful in 8m50s
CI / Frontend (shard 1/2) (pull_request) Successful in 10m26s
CI / End-to-end journeys (desktop) (pull_request) Successful in 11m39s
CI / Backend migration, tests, and audit (pull_request) Successful in 34m56s
ddc2e50090
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-bot deleted branch fix/4.6.2-rc3 2026-10-30 05:45:28 +00:00
Sign in to join this conversation.
No description provided.