Skip to content

fix(service-map): tiles stay put while you place them - #2545

Merged
Makisuo merged 1 commit into
mainfrom
fix/service-map-tiles-placement
Nov 12, 2026
Merged

Makisuo merged 1 commit into
mainfrom
fix/service-map-tiles-placement

fix(service-map): tiles stay put while you place them

f5b378a
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review completed Nov 12, 2026 in 2m 13s

Confidence 6/10 · 1 issue to address

🟡 Confidence 6/10 · needs attention. Held at 6 because a correctness warning is open.
1 warning −1 · tests partial −1 · risk medium

Holds the service-map tiles camera, lakes and country still while a tile is lifted, glides the framing when the board grows, and aims at the tile, plate, lake or country drawn under the pointer. Sound apart from a stale ring in the country cache.

  • framing/fit glide the camera (FIT_GLIDE_MS) instead of jumping, cancelled by a grab or a zoom command
  • extentOf frames the tiles only, so lifting a tile no longer refits
  • derive computes lakes and wilds without the held id, so the country stays put on pickup
  • cellUnder raycasts tiles, plates, lakes and wilds; ring-2 country hides while a tile is held

Findings

🟠 Warning · F1 · wildTiles keeps a stale ring when a cell's ring changes

correctness · apps/web/src/page/service-map/tiles/scene.ts:623

The key omits ring, so a cell going from ring 1 to ring 2 with the same feature keeps its cached entry and is never rebuilt. showOffers (scene.ts:636) reads the stale ring and leaves that island of country visible while a tile is held — the symptom this change removes. Reachable once a tile moves away from a neighbour.

				key: `${cellKey(cell)}:${ring}:${biome.id}:${feature}:${palette.night}`,
What was checked
  • Interrupting a glide by grabbing or zooming lands inside the widened orbit.minDistance/maxDistance, so orbit.update does not clamp the camera (scene.ts:923-933)
  • The in-flight bow-out and arrow keys still terminate: keyedTarget with [0,0] returns the tile's own cell through stepTarget's Infinity cost
  • typography and @5xl/page used by the footer resolve: the kit helper takes truncate/className, and the page area is an @container/page

f5b378a · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

Annotations

Check warning on line 623 in apps/web/src/page/service-map/tiles/scene.ts

See this annotation in the file changed.

@maple-review-bot maple-review-bot / Maple / review

correctness: `wildTiles` keeps a stale `ring` when a cell's ring changes

The key omits `ring`, so a cell going from ring 1 to ring 2 with the same feature keeps its cached entry and is never rebuilt. `showOffers` (`scene.ts:636`) reads the stale ring and leaves that island of country visible while a tile is held — the symptom this change removes. Reachable once a tile moves away from a neighbour.