Skip to content

fix: show the venue's room, and say why Find my location failed (#316, #321) - #342

Merged
Ardnived merged 8 commits into
mainfrom
claude/fix-316-room-and-location
Oct 30, 2026
Merged

Ardnived merged 8 commits into
mainfrom
claude/fix-316-room-and-location

Conversation

@Ardnived

Copy link
Copy Markdown
Contributor

Summary

Two launch fixes in one PR, as agreed while sydevs-bot is out of usage.

#316 part 4 ships with #321 part 3: both are the snapshot regeneration.

Closes #316
Closes #321

Tests

  • New EventFacts.test.tsx: the room above the street, alignment, absent on compact/card, absent for a null or blank room, online, and inactive.
  • attribution.test.ts: the error handler is wired, the dialog renders as a sibling after the map, and focus returns to the locate control on close.
  • translations.test.ts: the pending-key test.
  • Each new assertion was watched failing first. The lean gate passes.
  • Checked in a browser: the dialog appears on deny and on timeout, the control is disabled when permission was already denied, focus returns to .mapboxgl-ctrl-geolocate, and the story renders.

Local review

An adversarial review ran locally, standing in for the bot's. Its adopted fixes are in ade4293e: focus return, a trimmed comment in Map.tsx, docs/rules/mapbox.md, the wording of the embedding guide's geolocation row, and the CHANGELOG entries.

🤖 Generated with Claude Code

claude and others added 8 commits October 29, 2026 14:53
`pnpm sync:translations` has been unable to reach production at all: the fetch
sent no `select`, and SahajCloud refuses an API-client read without one with a
400. So the only sanctioned way a new key reaches
`src/config/translations.en.json` was closed, for every key.

The query is built from `WIDGET_TABS`, the list the script already owns and
`src/config/translations.test.ts` already pins against
`WIDGET_TRANSLATION_TABS` — a second spelling of the tabs would escape that
pin. The 200 body carries only what `DROP` and the explicit
`delete bundle.event.title` already strip, so the stripping stage is unchanged.

The failure also read as a credential problem, because the thrown message
guessed at one. It now carries the response body, which names the real refusal.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXXjhTscsVXhYS85p4
`pnpm sync:translations --write`, run against production once the script could
reach it. It takes three keys production now serves:
`common.map.location_failed`, which the locate-failure dialog in this branch
renders, plus `event.display.room` and `registration.form.subscribe`, which
have no call site in this repo yet (#316 and #147 own them).

⚠ `common.map.location_failed` arrives with two trailing newlines, from the
manager's paste. The snapshot is a faithful copy of what production serves, so
they are copied too; stripping them here would make the file something no CMS
edit can correct. Fixing the stored value is a SahajCloud edit.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXXjhTscsVXhYS85p4
The locate control emitted `error` and nothing listened, so a refused or timed
out location request left no message and no next step — it read as broken.
`onError` now opens a dialog over the map, naming what happened and pointing at
the place search.

It is a `Modal`, a sibling of `<ReactMapGL>` rather than one of its children:
nothing about it belongs to the map's own subtree, and react-map-gl reconciles
children as controls and sources. The atom portals through
`overlayContainer()`, so it inherits the theme root and the brand variables,
and Radix owns Esc, the focus trap and the focus return to the control.

One dialog serves every error code. A refusal, an unavailable position and the
6-second timeout all leave a viewer the same thing to do instead.

⚠ It cannot reach the headline case, and that is recorded beside the state
rather than worked around: mapbox-gl renders the button `disabled` when
`navigator.permissions` already answers `denied`, so a permission blocked
before the map loaded emits no event at all. Speaking for a disabled control
means replacing Mapbox's own, which #321 declined.

The spec pins the wiring, because the node lane cannot watch the dialog open —
SSR throws on an open portal and renders nothing for a closed one. That new
spec reads a repo file, so the per-edit selection ceiling ratchets 18 → 19;
the hook measured 6.3s against its 12s budget at nineteen, on 4 cores.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXXjhTscsVXhYS85p4
`docs/rules/mapbox.md` and `use-geolocate.ts`'s docblock both said Mapbox binds
a control's handlers once at construction, and told a later author to treat
anything handed to a control as bound for good. The conclusion was safe; the
mechanism is wrong, and a wrong mechanism is what the next author reasons from.

react-map-gl re-assigns `thisRef.current.props = props` on every render, and
every listener it registers reads its handler off that ref, so a handler prop
is live. What made `use-geolocate.ts` stale was its own `useCallback(…, [])`.
Both places now name that, which is also why the hook's empty deps and its live
ref stay exactly as they are — and why the new `onError` beside them needs
neither.

The `locale` prop genuinely is construction-only. That half stands.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXXjhTscsVXhYS85p4
The room a manager sets on a class's address was fetched and parsed but
rendered nowhere. The event panel now shows it on its own line above the
street, through `event.display.room`. A class with no room, an online class
and an inactive listing get no extra line, and the list card and the
share/registration summaries stay as they were.

The regenerated snapshot holds `registration.form.subscribe` ahead of #147's
call site, so the spec names pending keys with their ticket and fails an entry
once it is wired or unpublished.

Closes #316

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…or hosts

From review: Radix returns focus to a `Dialog.Trigger`, and the location
dialog has none, so closing it dropped focus. The wiring checks move into
`attribution.test.ts`, which already reads `Map.tsx`, so no new spec slot
is taken. `CHANGELOG.md` and `docs/embedding.md` say what a host now sees,
and the pending-key pin shares the dead-key check's `referenced` set.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying sahajatlas with  Cloudflare Pages  Cloudflare Pages

Latest commit: ddde8ef
Status: ✅  Deploy successful!
Preview URL: https://332dc356.sahajatlas.pages.dev
Branch Preview URL: https://claude-fix-316-room-and-loca.sahajatlas.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
sahajatlas-design ddde8ef Oct 29 2026, 11:45 PM

@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 29, 2026
@sydevs-bot

sydevs-bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running

recent dispatches
  • 02:44Z review-pr · attempt 2 · session · done
  • 02:44Z review-pr · attempt 2 · session
  • 23:47Z review-pr · attempt 1 · session · timed out
  • 23:47Z review-pr · attempt 1 · session

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Oct 29, 2026
@Ardnived
Ardnived merged commit 086d9d2 into main Oct 30, 2026
14 checks passed
@Ardnived
Ardnived deleted the claude/fix-316-room-and-location branch October 30, 2026 00:14
@sydevs-bot sydevs-bot moved this from Working to Done in SYDevelopers Technical Roadmap Oct 30, 2026
@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 30, 2026
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 30, 2026
@sydevs-bot sydevs-bot mentioned this pull request Nov 17, 2026
4 of 15 tasks
@Ardnived Ardnived removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

fix(map): say why Find my location did nothing when it is blocked fix(event): show the venue's room in the class view

3 participants