Repository navigation
fix(service-map): tiles stay put while you place them - #2545
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/fitglide the camera (FIT_GLIDE_MS) instead of jumping, cancelled by a grab or a zoom commandextentOfframes the tiles only, so lifting a tile no longer refitsderivecomputes lakes and wilds without the held id, so the country stays put on pickupcellUnderraycasts 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, soorbit.updatedoes not clamp the camera (scene.ts:923-933) - The in-flight bow-out and arrow keys still terminate:
keyedTargetwith[0,0]returns the tile's own cell throughstepTarget'sInfinitycost typographyand@5xl/pageused by the footer resolve: the kit helper takestruncate/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
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.