Effect Geohash Proximity Index
Nearby search without the full-table haversine scan: points are geohashed (interleaved lat/lng bisection, base32) into a Ref-held cell index, and a radius query reads the query point's cell plus its 8 neighbors, then applies the exact haversine circle test to just those candidates. The neighbor scan is the correctness half: two points meters apart on opposite sides of a cell boundary share no useful prefix, and a naive single-cell lookup silently drops one of them, so the grid is only ever a candidate generator and the final circle test decides. Neighbors are derived by decoding the center cell's bounds and re-encoding one cell-width away, immune to base32 edge tables, with antimeridian wrap handled. Pinned to effect 4.0.0-beta.98.
npx shadcn@latest add https://ui.aryank.space/r/effect-geohash-proximity.jsonInstalls from ui.aryank.space. To add it by hand, copy the files in Files below, or register the @compronents namespace via the docs.
The user's cell is dr5rsr and the ramen shop 122 meters north sits in dr5ru2: near in space, disjoint in prefix. A lookup that only reads the user's cell returns everything EXCEPT the closest restaurant, and no error hints that the grid's edge just ate a result.