Skip to content

Stop the map's tiles showing a grid of dark lines - #111

Merged
ryanbarlow97 merged 1 commit into
mainfrom
map-tile-seams
Oct 7, 2026
Merged

ryanbarlow97 merged 1 commit into
mainfrom
map-tile-seams

Conversation

@ryanbarlow97

Copy link
Copy Markdown
Contributor

What

Moving (and, more faintly, resting on) the map showed a grid of thin dark lines along the tile edges, on screens with a fractional device pixel ratio (Windows at 125 %/150 %, many laptops). At 100 % there were none.

Why

The tile images are clean. Chrome painted each <img> placed by left/top about 0.2 device px past its layout edge, so every tile's first column and row was ~20 % see-through and the page behind showed. Mid-drag the viewport translate was also fractional, so every tile edge straddled a pixel.

Fix

  • TileLayer: tiles are placed with transform: translate(), which Chrome keeps exact.
  • useMapViewport: a live pan (no scale on top of the resting zoom) sits on whole device pixels, as the resting position already did.

Overlapping tiles was rejected: prosperity tiles are ~40 % partial alpha, so overlap strips would darken.

Checked

Chromium against live map data (solid-black tiles on a white background, worst see-through at a tile edge):

before after
dpr 1.25, at rest 18 % 0 %
dpr 1.5, at rest 24 % 0 %
dpr 1.25, zoomed in, mid-drag 24 % ≤ 3 %
dpr 1 0 % 0 %

tsc clean; 1,427 map/viewport/admin/chronicle tests pass. Mid-pinch (scale ≠ 1) seams can still flash until the zoom settles.

🤖 Generated with Claude Code

At a fractional device pixel ratio (Windows at 125 %, say) Chrome painted
each tile placed by left/top about a fifth of a pixel past its edge, so
every tile's first column and row let the page through. Place tiles with
a translate instead, and keep a drag's position on whole device pixels as
the resting position already is.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c75ae0eb-f034-45b5-bd35-816b03a73b79
📥 Commits

Reviewing files that changed from the base of the PR and between fa996c1 and 51bde6e.

📒 Files selected for processing (2)
  • frontend/app/components/map/TileLayer.tsx
  • frontend/app/hooks/useMapViewport.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ryanbarlow97
ryanbarlow97 merged commit 5672587 into main Oct 7, 2026
2 checks passed
@ryanbarlow97
ryanbarlow97 deleted the map-tile-seams branch October 7, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant