koala73 / koala73/worldmonitor

Mobile overlay density caps are bypassed in globe mode on mobile

Open
#4,545 0 comments 0 reactions 0 assignees View on GitHub
bug P2 performance
Dominant language
TypeScript
Stars
86.6k
Forks
13.1k
Avg merge
8h 4m
Merged PRs (30d)
825

Description

Follow-up from the adversarial review of #4541 (closes #4463).

## Summary
The mobile density caps (`MOBILE_MIN_EARTHQUAKE_MAGNITUDE`, `MOBILE_MAX_IRAN_EVENTS`) live **only** inside the SVG `MapComponent` (`src/components/Map.ts:118-119`, applied at lines 1682 and 1788). The default mobile path uses the SVG renderer (`shouldUseDeckGL()` returns false on mobile, `src/components/MapContainer.ts:267`), so it is capped — but a mobile device with a **persisted globe preference** reaches `useGlobe = true` (`MapContainer.ts:216`, independent of `isMobile`).

## Failure scenario
On the globe-on-mobile path, `MapContainer.setIranEvents` (line ~1011) and `setEarthquakes` (line ~797) early-return after dispatching the **full, uncapped** lists to `globeMap`. The PR's stated goal (reduce mobile first-paint overlay density) is silently not enforced for that mobile sub-path.

## Suggested fix
- If globe-on-mobile is supported, apply the same caps in the globe renderer, or cap centrally in `MapContainer.setIranEvents`/`setEarthquakes` when `this.isMobile`, before dispatching to whichever renderer.
- If globe-on-mobile is considered out of scope, document it explicitly so it isn't mistaken for covered.

## Verification status
CONFIRMED against the real renderer-selection and dispatch paths.

_Severity: low_

Contributor guide

Open the contributing guide

Research direction

Start with MapContainer.ts around setEarthquakes, setIranEvents, useGlobe, and shouldUseDeckGL(), then compare the mobile caps in Map.ts at lines 118-119, 1682, and 1788. Trace the globe-on-mobile dispatch path and verify that the stated mobile density behavior is enforced there, or that the unsupported path is explicitly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.