Repository navigation
fix(map): draw an area, not a pin, for a listing with no real place - #374
Conversation
Twelve in-person listings give only a town (bug #15 of the 6 Nov sweep), so their stored point is the town's centre and the map pinned it as a venue — Sneek's on a supermarket, with a Directions button to it. `hasApproximatePlace` decides it: an inactive listing (it meets only on request), or a street that names no place — a placeholder, the town's own name, or a "city centre" word (`hasVagueAddress`). Such a listing draws a 1.5km area instead of a pin, frames its neighbourhood, shows only the town, and offers no directions. Inactive listings already hid the street and directions on their page; the map now agrees. A lone "-" is not a placeholder: its one listing is a park whose point is the park. SahajCloud's Atlas importer rewrites the six word-shaped placeholders to the town's own name (sydevs/SahajCloud fix/atlas-town-only-venues), so after the final sync the word list is only a fallback. The area drawing ports 7fa03d1. Co-authored-by: antontcymbal <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | f7ccbc7 | Nov 10 2026, 04:58 PM |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
It matches the bug it names, and widening to all inactive listings is argued, not smuggled. NO_PLACE_STREETS is 24 multilingual entries, yet the producer branch this PR names rewrites all six observed placeholders to the town's own name — which the town-repeat rule already catches — so the list guards no production row. And the area frames at a zoom inside the clustering range, so it misfires for exactly the listings this PR widened to.
Findings
- should-fix —
VAGUE_ZOOM12 is underclusterMaxZoom14, so a framed class can stay clustered: ring, no dot (use-map-controller-real.tsx:62). - should-fix — 24 word-list entries guarding zero rows once the producer lands (
event.ts:35). - should-fix — the town-repeat test re-rolls
streetAndCity's comparison, dropping accent folding (event.ts:83). - should-fix — the address shape is hand-written twice where
EventAddressexists (event.ts:28). - should-fix —
mapbox.mdstates the producer rewrite as shipped; it is unmerged (mapbox.md:102). - consider —
CLASS_LAYER_IDSisINTERACTIVE_LAYER_IDSminus the cluster (layers.ts:50). - consider — inactive is read two ways; a dateless class still gets a pin (
use-event-display.ts:245).
What was checked
- Ladder:
hasVagueAddressvsstreetAndCity;areaAroundvsapproxBounds/@turf/circle;VAGUE_ZOOMvsEVENT_ZOOM15 andclusterMaxZoom14. - Read on the branch:
event.ts,layers.ts,Map.tsx, both hooks,geo.ts,camera.ts,types/{event,geojson}.ts.FEED_SELECTsendsstreet,city,inactive,schedule, so the map's predicate reads real values;terminalDisplayalready drops directions. - Producer: SahajCloud
mainhas no street override inseeds/atlas/dedupe.ts;fix/atlas-town-only-venuesadds six. No## Previewlink, so none opened.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The dot stands in for the 1.5km circle once that shrinks to nothing on screen, which is zoomed out — and zoomed out is exactly where the `events` source clusters (`clusterMaxZoom` 14). Filtering it on `!has point_count` there meant it only ever drew at the zooms the circle was already large at, so framing a vague class in a dense city left a ring with a cluster bubble over its centre. Move the dot to `approximate-areas`, which does not cluster, and carry each class's centre point in that source beside its polygon. `fill` and `line` ignore a point, and the dot filters on `geometry-type`, so one source serves all three. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjUxkXJ7kcbkEb5Y8dS
`hasVagueAddress` compared street against town with `toLowerCase` + `startsWith` while `streetAndCity`, twenty lines below, compares them with `localeCompare` at `sensitivity: 'base'`. So street "Silvianopolis" in "Silvianópolis" read as a real place on the map while the address line already showed the town alone. Fold the accents off both sides instead of switching to `localeCompare`: that compares whole strings, and the placeholder match needs a position to slice the town off. The word list is folded on the way in for the same reason. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjUxkXJ7kcbkEb5Y8dS
The street-and-city shape was written out by hand in three places here, while `EventAddress` — generated from the feed schema, already imported in this file — declares both fields nullish exactly as written. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjUxkXJ7kcbkEb5Y8dS
Both the rule and the `hasVagueAddress` docblock described SahajCloud's placeholder-street rewrite in the present tense, but `VENUE_FIELD_OVERRIDES` on its `main` sets no street — the change lives on an unmerged branch. Someone opening either file today would look for a mechanism that is not there, and would read the word list as already redundant when every entry still guards a live listing. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjUxkXJ7kcbkEb5Y8dS
`CLASS_LAYER_IDS` was `INTERACTIVE_LAYER_IDS` minus the cluster, and both call sites already hold the cluster: the click handler tests it in the branch above, so a bare `else` is the rest, and the hover tracker needs only "not the cluster". A second array that must be edited whenever the first is is a sync hazard, and `layers.test.ts` pins the surviving one as the contract with both handlers. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjUxkXJ7kcbkEb5Y8dS
`hasApproximatePlace` tested `inactive || !schedule`; the panel tested `display.status === 'inactive'`, which `resolveEventDisplay` also returns for a class whose occurrences have all passed. So such a class read town-only in the panel — street and directions hidden — and still got a pin on the map, the disagreement this feature set out to remove. `hasApproximatePlace` now covers a dateless class too, through a shared `eventKind`, so a course that is merely over keeps its pin and street. The panel reads that one predicate rather than its own second copy. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjUxkXJ7kcbkEb5Y8dS
|
Six of the seven findings are built on Adopted — the dot inside the clustering range (all three area layers now read the non-clustering source), accents, the address shape, docs claiming the producer had shipped, two id arrays, and two readings of inactive. Rebutted — the word list: SahajCloud Your call (body's notes): a SahajCloud field, not a word list here. Lean gate green, 1982 tests, each new assertion watched failing first. The browser pass predates the layer change. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
|
I could not apply the relay here, so this is the step left for you.
🤖 sydevs dispatcher |
… Atlas sync Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review feedback: rings showed at world zoom beside the cluster that also counted them. Both the pin and the ring now read the clustering `events` source, so a listing with no real place joins a cluster like any other, and is an ordinary pin until the zoom where its ring's radius is as wide as the pin (RING_ZOOM, about 9). From there it is a 3km ring, up from 1.5km, drawn to scale as a circle layer. The selection and hover highlights hand over at the same zoom, and a framed vague listing lands at zoom 11 so the larger ring fits. The separate unclustered area source and `areaAround` are gone. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@sydevs-bot review |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
Second pass, on request, over the two new commits. The pin-until-ring rework is the better answer: a listing now clusters like any other, which the unclustered area source could not. Two costs: the ring is unbounded above, so past about zoom 13 it stops reading as a place, and approximate now means two different things one file apart. SahajCloud's VENUE_FIELD_OVERRIDES is on main with all six street rewrites, so the word-list rebuttal rests on a changed premise: 18 of the 24 entries guard nothing, the other six only until the Atlas sync runs.
Findings
- should-fix — the ring has no upper zoom bound: past ~13 it is a featureless wash with no marker (
layers.ts:140). - should-fix —
approximateis online-or-vague in the store and vague-only on the feature (store.ts:15). - should-fix — the
## Summarydescribes four things the diff no longer has: theapproximate-areassource, a 1.5 km area whereAPPROXIMATE_RADIUS_KMis 3, a dot at every zoom, and an unlanded producer thatmapbox.mdnow says has landed.
What was checked
- Ladder: the ring vs
@turf/circle/approxBounds(geo.ts:49) — own code earned: a polygon cannot cluster, andgeolocation.ts:90notes turf circles mishandle the antimeridian.ringRadiusPx/ringZoomreuseworldMinZoom's constant;eventKindfoldsresolveEventDisplay's own literal. - Arithmetic:
RING_ZOOM9.06, handing over with no gap; belowclusterMaxZoom14 a clustered listing shows the bubble. - Read on the branch:
event.ts,layers.ts,Map.tsx,camera.ts,markers.ts,store.ts,types/{event,geojson}.ts.AgnosticFeedEventSchemacarriesaddress,inactiveandschedule, so the predicate reads real values. - Producer:
dedupe.ts:114-119on SahajCloudmainsets all six overrides. No## Previewlink, so none opened.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
# Conflicts: # CHANGELOG.md # src/hooks/use-event-display.ts
The ring's radius doubles per zoom level with nothing stopping it: 111px at zoom 11, 444px at 13, 888px at 14. Past about zoom 11.7 its outline is off every screen, so an unselected listing was a flat 14% tint with no marker in it — where `main` gave it a pin — and that tint answered every click and hover across the map, with neighbours stacking theirs. `RING_MAX_ZOOM` is where the ring is as wide as the narrowest map the full interface renders in, so the three layers hand over at one zoom each and exactly one of them draws at any zoom. The dot is a fixed size, in the ring's own colours at a fraction of its weight, and is clickable like the pin and the ring before it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVJXtttnitsB4QgSKS
`approximate` named two different things. On `MapPoint` it is online-or-vague, picking the softer selection sprite. On the map's own feature property it was `hasApproximatePlace`, which excludes online — and `eventFrameZoom`'s option of that name meant online alone, so one call read `online: isOnline(event)` beside `point.approximate` and the reader had to tell three senses apart. The feature property, the three layers and their ids now say `vague`, matching `MapPoint.vague`, which already meant exactly this. `eventFrameZoom` takes `online`, agreeing with the `onlineZoom` beside it. `MapPoint.approximate` keeps its name as the union, and its comment now says so. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVJXtttnitsB4QgSKS
|
Both open threads built. The review body's third point is answered in the PR body.
⚠ Round one's word-list rebuttal rested on a changed premise: SahajCloud 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Brings in #374 (a listing with no real place draws pin, then ring, then dot) and the #381/#382 contract re-syncs. - lib/shape/event.ts: main's hasVagueAddress, eventKind and hasApproximatePlace; drop our older hasVagueAddress and directionsTarget; keep our streetAndCity, now reusing main's module-level fold. - lib/shape/event.test.ts: main's hasVagueAddress and hasApproximatePlace specs; drop ours and the directionsTarget spec; keep our streetAndCity spec. - Mapbox/layers.ts: main's vaguePin/vagueRing/vagueDot, VAGUE_RADIUS_KM, RING_ZOOM, RING_MAX_ZOOM and one INTERACTIVE_LAYER_IDS; drop approximateDot/Fill/Outline and CLASS_LAYER_IDS; keep CLUSTER_MAX_ZOOM. - Mapbox/layers.test.ts: main's id contract and vague-layer specs; keep our stock-count contrast spec. - Mapbox/Map.tsx: main's vague feature property, cosLat, layers and hover test; drop the approximate-areas source and areaAround; keep the pin popover with class name, useMapTap, the unsplittable cluster opening its list. - Map.tsx click handler: main's bare else for a class feature, with our useMapTap open() kept inside it. - hooks/use-map-controller-real.tsx: main's eventPoint (vague, approximate as the union), VAGUE_ZOOM 11 and eventFrameZoom online; keep sheetInset and the world-once WORLD_CENTER. - hooks/use-event-display.ts: main's townOnly predicate; our postcode line now hides under townOnly too, as the room does (was status inactive). - lib/camera.test.ts: keep both our sheetInset spec and main's ring spec. - lib/geo.ts: main's version, so areaAround is gone (nothing else used it). - EventActions: plain Directions again (5cff0b9 reverted); drop event.actions.directions_to; test and story now assert no Directions for a vague listing. - docs/rules/mapbox.md: main's "Classes with no real place" section. - Contract files (payload-types.ts): main's, unchanged by us; typecheck clean. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Fixes bug 15 from the 6 Nov sweep. About a dozen in-person listings give only a town, so their stored point is the town's centre. The map pinned that point as if it were the venue: Sneek's landed on an Albert Heijn supermarket, with a Directions button to it.
hasApproximatePlace(inlib/shape/event.ts) decides which listings have no real place. It is the one reading of "inactive" — the panel reads the same predicate, so the two cannot describe the same listing differently:resolveEventDisplayalready reports these as inactive, and the panel already hid their street — the map pinned them anyway. A course that is merely over isended, not inactive, and keeps its pin and its street.hasVagueAddress: a placeholder, the town's own name, or a "city centre" word.Such a listing shows only the town's name, offers no directions, and frames its neighbourhood at
VAGUE_ZOOM.Change outline
On the map it is a pin, then a ring, then a dot — exactly one of the three at any zoom. All three read the clustering
eventssource behind!has point_count, so the listing joins a cluster like any other and never draws a ring while a bubble beside it already counts it.RING_ZOOM≈ 9RING_ZOOMtoRING_MAX_ZOOM≈ 11.7VAGUE_RADIUS_KM(3km) ring, drawn to scaleRING_MAX_ZOOMThe ring is a
circlelayer rather than a polygon: a polygon cannot cluster, and its radius interpolatesexponential2 on zoom — exactly Mercator's doubling — divided by each feature'scosLat, which an expression cannot read off a point. ⚠ The dot marks the stored point, which is the town's centre and not the venue; what stops that reading as a doorstep is the panel, which shows only the town and offers no directions.vagueis the feature property and the three layer ids, matchingMapPoint.vague.MapPoint.approximatestays the union of online-or-vague, which is what picks the softer selection sprite, andeventFrameZoomtakesonline— so no call reads two senses of one word.Data side: sydevs/SahajCloud
mainnow carries the rewrite (VENUE_FIELD_OVERRIDESinseeds/atlas/dedupe.ts), turning all six word-shaped placeholder streets ("Zentrum", "Innenstadt", "Centro", "Perth CBD", "None", "wird noch angekündigt") into the town's own name. It reaches production at the next Atlas sync, and until that runs the word list here is load-bearing: three live listings are caught by it alone. A lone "-" is deliberately not treated as a placeholder: its one listing is Parc Vaira'i, and its point really is the park.Production listings this changes
Checked against all 442 production events:
Punaauia (Parc Vaira'i) keeps its pin.
⚠ The dateless-class case above is not in that count — it was added after the production read, and no run since has had production data to re-count against. Every such class already read as inactive in the panel, so the change is confined to its map representation.
Checked
main.INTERACTIVE_LAYER_IDS.⚠ No browser pass has seen the current layers. The one in this PR's history ran at 1280×800 against production data, before the move off the unclustered area source and before the ring gained its upper bound: Sneek (1168), Broome (914) and Salzburg (804) drew an area with no pin and no Directions and named only the town, Balham Library (717) kept its pin and its street, and the console showed no layer or image errors. What a fresh pass would settle that the specs cannot: how the pin-to-ring and ring-to-dot handovers look while zooming, and whether a cluster bubble ever sits over a ring at the seam.
Notes for reviewer
Two of the second review's three findings are built here, one commit each, with the SHA in each thread. The third — a
## Summarynaming four things the diff no longer had — is this body.The word list is now the open question, and it is yours rather than this PR's. The first round's rebuttal rested on SahajCloud
maincarrying no street override; it does carry all six now, so 18 of the 24 entries guard no production row and the other six guard theirs only until the next Atlas sync. Dropping any of them before that sync drops a live listing, so nothing here is wrong today. A SahajCloud field, rather than a word list in this repo, is the durable fix — another repo's schema, larger than this change, and a decision the goal owns. Say so and it becomes its own ticket.🤖 Generated with Claude Code
https://claude.ai/code/session_01Mg9rjVJXtttnitsB4QgSKS