Repository navigation
fix(search): embed, search and navigation fixes from the 6 Nov bug sweep - #371
Conversation
Prague search, open the Brno class, close it, open another straight away, close that: the list said Prague but the map settled on Brno. The saved camera came from the store, which only updates when the map stops, so a click during the fly-back recorded the old place. Save the destination of a move in flight instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
United Kingdom, then Tuesday, then a search for Prague kept region=gb, so the list looked for Prague inside the United Kingdom and said "No events within 150 km". The place-search builder carried every filter across, the region included. The region is a Where, so it now goes with the old place in preserveSearchState, for the search box, Near me and the IP suggestion alike. The other filters still travel. Ported from 2160576 on ux/fix-filters. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…place is picked
On the results page the field wrote every keystroke into ?q, and the cards read
their "from" place from there. Clearing a London search and typing "Prag" made
every card say "5.1 km from Prag" over London's classes. The field now keeps
what is typed to itself, and the URL changes only when a place is picked (or
Near me names one). Every other field already opted out with
syncToUrl={false}, so the option goes with the behaviour, and the comments that
claimed per-keystroke ?q churn are corrected.
Ported from the MapSearch part of 3300572 on ux/first-screen.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A link carrying filters (/gb/south-east/london?format=online, /gb?days=2) showed the filter badge and filtered pins over an unfiltered list and counts: London listed all 19 in-person classes with no pins on the map, and the UK page counted every class per region. The country, region and online lists now run the map's own matchesFilters check, show the removable filter pills, offer the no-results state with Clear filters, and keep the filters on the links one level down. Framing still covers every class, and the unfiltered query keys stay as they were, so live preview's writer still lands. Ported from 032f476 on ux/states. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A place resolves by its last slug alone, so /united-kingdom/south-east/london opens London even though the UK's slug is gb. The panels behind it were built from the typed words, so the first X opened /united-kingdom/south-east, the second "We couldn't find that place", and the peek strip read "Back to united-kingdom". placedPathname swaps the deepest place's address for the one the region tree gives it, and the strips and the climb read that, so they name and lead to United Kingdom at /gb. The top view and the address bar keep the typed address, so nothing remounts when the tree arrives. After 19637c6 on ux/navigation, rebuilt on main's stack (that commit's own targets, the Back label and breadcrumbs, are proposal files). Co-Authored-By: Claude Opus 5.5 <[email protected]>
The sign-up form's Name and Email fields carried no autocomplete token, so
phones didn't offer the visitor's own name and email. They now say
autocomplete="name" and "email".
The other half of the report's finding, making "privacy policy" a link inside
the consent sentence, needs a %{link} slot in SahajCloud's copy first, so it
is left for a SahajCloud change.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Suggestions were ranked from the middle of the map with no country limit, so "Hampstead" from the UK page offered four streets near Manchester, then Hampstead, Quebec, and never the London district; from the home page Quebec came first. The field now asks for places, not bare streets, and stays in one country: the one on screen, else the searched place's (?cc), else the last country page shown (DrawerStack records it, since /search names none), else the client's home country. A search that finds nothing there repeats itself everywhere, so Prague is still one search away from the UK page. With no country to stay in, results rank from the visitor's own area instead of the middle of a world map. After f0b3a1a on ux/first-screen; its "search all countries" button needed new copy, so the release happens by itself instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Typing a place that doesn't exist ("zzqqxx") left the country list as it was,
with no answer at all. The field now says "We couldn't find that place." under
itself once the search, widened to every country, comes back empty. The line
reuses the existing not-found copy.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
/search?days=2®ion=gb, opened from the filters with no town searched, printed "5,652 km away" on every UK class: with no searched place the list is measured from wherever the middle of the map was, and "away" reads as "from you". The list already knows nothing was searched (hasSearchCenter), so it now tells its cards not to print a distance. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…moves the list The location notice appears once the visitor's rough location comes back. On a slow lookup it landed after the list had painted and pushed the rows 48px down under the visitor's finger. Each list now mounts it twice: above the list only if the answer was known at the first paint, below the list only if it came later, where it moves nothing. The layout half of 21f1592 on ux/first-screen; its "show it only where it helps" change is a proposal and stays out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
/gb/no-such-place said "We couldn't find that place" under a header with no title but working Calendar, Search and Filters buttons, all scoped to a place that doesn't exist. The error chrome now leaves those three out when the page failed because the place isn't there. A region that failed to load (offline, server) keeps them, since there they still lead where the visitor wanted. Co-Authored-By: Claude Opus 5.5 <[email protected]>
When the hidden Turnstile check didn't answer within 10 seconds, the whole Atlas became "This Atlas can't run on this page", which a slow load did by itself about once in 30 loads on an iPhone. The error screen stays (#182's decision), but the handshake now waits 20 seconds, and the page-wide check gives a silent frame one fresh retry before deciding. A frame that answers "error" (SahajCloud refusing this page's domain) is still believed at once, so a partner site on no client's allowed list hears it as fast as before. docs/embedding.md now says how long a refusing CSP takes to show. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Since #366 the captcha frame is 0px tall until Cloudflare asks for a click, which is what most visitors see. The slot was still a flex item, so it took its column's gap on both sides: the registration form showed 24px of blank where 12px belonged, while the report form cancelled the same gap by hand with -mt-4. useTurnstile, which already owns the slot and the frame's height, now takes the slot out of flow while the frame is collapsed (and when the check is disabled), and puts it back when Cloudflare wants a click. Neither form reads `interactive` for spacing any more. Measured on the register route with a challenge that never answers: fields, then the buttons 20px below (the 12px gap plus the bar's own 8px), where the collapsed slot used to add another 12px. The captcha-slot half of #367; its AddToCalendar follow-ups are untouched. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A host page that keeps the Atlas in a closed tab or accordion broke when the visitor arrived from a shared link (?atlas=/gb). A page route makes the loader mount at once, and the widget decides its layout once, from its element's size at its first render. Inside display:none that was 0x0, which reads as an unsized embed, so when the tab opened the panel floated over the host page in the top-left corner, the map was a 400x300 patch, and the host's box stayed blank. The same page without ?atlas= worked, because a lazy mount waits for the element to intersect the viewport. The loader now mounts a deep link at once only into an element that has a box (getClientRects), and otherwise waits for it to be shown, as a lazy one does. Checked on a local host page: the live embed reproduces the fault, this build fills the 1232x644 box with the UK page and its map. docs/embedding.md says so under Sizing and beside the deep-link rule. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ck wait Both are visible to a host: an embed in a closed tab now loads when shown, and a refusing CSP shows the blocked screen after about 40 seconds instead of 10. Co-Authored-By: Claude Opus 5.5 <[email protected]>
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
Fourteen bugs, one commit each, all named in the body: the diff tracks the list, no scope finding. Nothing it adds hunts for a layer: getClientRects, cameraForBounds, autocomplete and position: absolute are the platform answering, and both new stores hold map and browse state, where this repo puts zustand. The host contract is done both sides: docs/embedding.md sizing, the CSP table's 40 s, the hidden-iframe note, CHANGELOG.md.
Both should-fixes sit in new fallback paths, where the fix stops applying after the first miss. Also: say why useBrowsedCountry is a store, when this repo's rule puts search state in the URL and ?cc already carries a country. And scope at MapSearch.tsx:108 shadows the country scope above it.
Findings
- should-fix
MapSearch.tsx:95— one miss releases the country scope for good, so #13 is back. - should-fix
CountriesView.tsx:74— the online count ignores a?region=cut the cards honour. - consider
RegionView.tsx:182— onward links carry?region=into regions it cannot match. - consider
shared.tsx:503—GeolocationSuggestionmounted twice so one copy can render. - consider
RegionView.tsx:155— three spellings of "filters are active" in one diff.
What was checked
Read whole on the branch: MapSearch, use-turnstile, use-mapbox, store, fetch, shape/path, shape/filters, loader/index, DrawerStack, the browse views, shared, fallbacks, both forms.
Clean: child badges read partitionUnder(visible, …), so cards and counts agree; bounds stays on the full set deliberately, pinned by a spec; ['countries'] and ['region', slug, locale] keep their plain keys with no filters, so the stories' setQueryData still lands; every GeolocationSuggestion call site passes position; no syncToUrl caller survives.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The release was a bare country code and nothing cleared it, so the first search that came back empty inside the country — the typo that proves #34 — handed every later search in that field the worldwide ranking. Mapbox puts Hampstead, Quebec above Hampstead, London once no country is given, so one miss undid the country scope for the rest of the session. `searchCountryScope` keys the release to the query that earned it, so the next query starts inside the country again. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW53aCCKJirBwMxQS8
The home list's online badge filtered the cached feed in the view, with `matchesFilters` and no region matcher. That reads a selected region as no restriction, so on `/?region=gb` the badge counted online classes worldwide while every card below it honoured the cut — the disagreement #7 exists to close. `getOnlineCount` derives it through `visibleFeatures`, the same predicate the country counts and the map's pins use. `['countries']` keeps its plain key, so the stories' own seeding still lands. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW53aCCKJirBwMxQS8
Three spellings of one predicate had appeared across the browse views — `filterSearch`, `Boolean(filterSearch)` and `hasActiveFilters(filters)`. The first two read a filter set through the query string it serializes to, which is a different question. `hasActiveFilters` is what the data layer gates on, so every view asks it now. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW53aCCKJirBwMxQS8
The hoist effect called its element `scope`, the name the country restriction above it already has. Two unrelated meanings under one name in one component. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW53aCCKJirBwMxQS8
The state rule still counted six stores and listed neither of the two this branch adds, and nothing said why the browsed country sits outside the URL when the rule puts search state in it — `?cc` already carries a country, so the answer is not obvious. Both reasons are written down now: what a link must reproduce, and which question `?cc` answers instead. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW53aCCKJirBwMxQS8
"privacy policy" in the sign-up consent line was plain text. A translation can now mark the words that link as <link>…</link>, and the form renders them as a link to https://wemeditate.com/privacy, wherever the language puts them. The code owns the href, and nothing in the string is rendered as markup. The existing key, registration.form.privacy_policy, keeps working unmarked: it reads as plain text, as it does today, until an admin adds the span to it in SahajCloud. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | 7b2195e | Nov 07 2026, 01:53 AM |
The fetcher list is what tells the next author where a derived count comes from, and `getOnlineCount` was missing from it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW53aCCKJirBwMxQS8
The place search changed what it asks Mapbox for: a country to stay inside, and at world zoom a request to rank by the visitor's own IP rather than a map centre that says nothing there. The privacy section still described the old pair, and it is the only page a host reads before writing their own notice. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW53aCCKJirBwMxQS8
The author pushed while this session worked, so the review fixes are merged on top of their commit rather than rebased under it. No conflict: their `i18n-and-state.md` hunk is in the i18next section, ours in the stores list. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW53aCCKJirBwMxQS8
|
Addressed the adversarial review. Your privacy-policy commit arrived mid-run, so it is merged in rather than rebased under. Pushed to Adopted, one commit each — the scope release Rebutted, resolved — onward Joined docs: the fetcher list Lean gate green on the merge: 1925 tests. Embed 327.4 / 330 KiB. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Both sides kept in the five overlapping files: the two new stores (useSheetCover, useBrowsedCountry) and their entries in the state rule, both CHANGELOG entries, and in the drawer's error fallback both the dead-link framing and #371's not-found chrome. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s to production (#1095) * feat(translations): ship the Atlas clock-label copy and two rewordings to production Two new sy-atlas-translations keys for the widget's clock labels (sydevs/SahajAtlasWeb bug #25 of the 6 Nov sweep): - `event.display.zone_time` — "%{city} time", after a time, naming the clock it is in ("8:00 pm Prague time"). - `calendar.times_note` — "Times are local to each class. Online classes show your time (%{zone})." under the calendar while online classes show. And two rewordings the widget is ready for: - `common.errors.captcha_blocked` stops blaming "this page". - `registration.form.privacy_policy` marks its link as `<link>privacy policy</link>`, which sydevs/SahajAtlasWeb#371 renders as a link (deployed); unmarked copy stays plain text. A data migration writes the English values, so production has them on deploy rather than by hand in the admin. It never overwrites an editor's copy: a key lands only where English lacks it, and a rewording only where the stored value is still the seeded original. Main and latest version rows are both written, so the next save keeps them. `down` removes the two keys, since the old schema refuses a save that stores them. The int spec was watched failing against both defects it guards: with the version row left out, the copy is lost on the next save; without the guards, an editor's wording is overwritten. `withSchema` moves to tests/utils for its second caller. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(migrations): down removes the clock keys from every locale, whatever they hold Review: `down` kept an editor's `zone_time`, so a rolled-back deploy left a key the previous schema cannot store, and the global refused every save — the failure `down` exists to prevent. It now removes both new keys from every locale and every version row unconditionally, guarded only by `?` against a scalar column. The two rewordings stay guarded both ways. The spec seeds a French `zone_time` and an edited English one; it failed against an English-only, value-guarded `down` before this change. The globals guide now says how this migration relates to src/migrations/AGENTS.md's caution about augmenting generated migrations. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(migrations): adopt the loop's relay for the down sweep The address-review session fixed the same finding in parallel on claude/relay-1095-78494bd, which could not merge over bfa2e5d. Its version is the stricter one, so it replaces mine: `dropKey` also checks `jsonb_typeof` (a scalar string equal to the key answers true to `?`, and `-` on it would abort the rollback), the down cases are split by what each proves, and src/migrations/AGENTS.md points at the carve-out from its side. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
The entry tells a host that most visitors now see no security check at all, and stopped at the box closing. The form kept a row's worth of space where the box would have been, which a visitor sees as a gap above the submit button, so the entry overstated itself until that was fixed. Credited to #371, which added `collapseSlot` and takes the slot out of its column while the frame is collapsed. #373 carries the gap in its title but not in its diff: it touched no form, and removed only the dead `interactive` flag the hook had stopped needing once #371 wrote the slot itself. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYDVNUh4RFz7MsjyV8
Brings main's 14 commits (#363-#380) into the combined review build. Non-obvious resolutions: - Clock rule (#380): an in-person time names the venue's clock only when the viewer's differs, an online time always. Replaces the proposals' "every time names its clock". The calendar's TimesNote now says main's one sentence (calendar.times_note), only when an online class is listed, kept above the grid and the week list; its times_city/times_local/times_online keys are gone. Add-a-class Check still spells out the inferred clock once, now added there itself. - Camera padding (#369): the proposals' useClassSheet stays and now reports the peek while the sheet is collapsed; main's useSheetCover, fitSheet marker and fit-snap rewrite are dropped for the proposals' own fit-snap. - World view (#370): world copies back on with main's minZoom, per its Pacific-wrap fix, under the proposals' map controls. - Place search (#371): the proposals' "search all countries" button stays; main's ?cc / browsed-country fallback, per-query release and "couldn't find that place" line are ported into it. - Ancestry (#371): placedPathname/placePathsOf live once, in navigation.ts; DrawerStack's stack follows the region tree. - Deep links to placeless events frame their region (#363), via useFrameEventOnTop, which skips contact-only listings. - Kept proposal designs over main's: registration confirmation, Add to calendar list, consent link, GeolocationSuggestion placement, filter tags in ListToolbar, map control column. Main's failure copy (#365), autofill, by-request type label (#370) and dead-place header (#371) are ported in. - streetAndCity: the proposals' version, now accent-blind as main's is. - Width pin for the per-edit hook ratcheted 20 -> 21 (both sides added one spec). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Twenty-one files conflicted against 56 commits on main. Most kept both sides; the choices the diff does not explain: - MapSearch: main's control (country scope, onSuggest, `permanent`, PLACE_TYPES, searchBias) with this branch's owner-held text. `types` and `proximity` override main's defaults rather than replacing them. - SearchField: main stopped writing `?q` per keystroke (#371) and dropped `syncToUrl`, so this branch's `query: 'url' | 'read-only'` goes with it. The field keeps local text and follows `?q`; search-field.query.test.tsx now pins that typing leaves `?q` alone. - RegistrationForm refusal lookup: main's `refusalKey` / `unansweredKey` / `refusedField` kept as written; the `refusalCopyKey` call here was the same own-property fix, so its import goes. ReportIssueForm and ReviewBar still use it. - RegistrationForm footer: the mailing-list opt-in, then main's ConsentNote. - DrawerStack snap: `opensTall` first, then main's event FIT_SNAP. - Countries/Region views: main's filtered list and lower GeolocationSuggestion, then the add-a-class footnote last. - Turnstile: main moved the challenge into a SahajCloud frame (#343), so the two jsdom specs here that stubbed `window.turnstile` solve through `challengeFrameStub`. The CHANGELOG entry names the captcha frame, not a Turnstile origin. - `registration.form.subscribe` leaves PENDING_KEYS: this branch wires it. - Selection width ratchets 22 → 23 on add-class-entry.test.ts, re-measured (1.9s widest, 2.4s i18n.ts, 11 cores). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…503) * test(api): pin filtered country counts and the plain place-list keys Place lists already follow the filters (#371). These cases cover what fetch.test.ts left open: getCountries with and without filters (a country nothing matches drops out), and regionQuery/countriesQuery keeping the plain key their writers use when no filter is active. Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor: simplify per inline read of the tiny diff Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(api): say only what the country-count case pins Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(api): pin that a region cut alone keys a place list apart Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
This is the second of three PRs for the bugs in
atlas-current-bugs-2026-11-06.md, the 6 November check of the live site. It covers loading into host pages, search, filtered links and navigation. The numbers below are the report's; one commit per bug.docs/embedding.mdandCHANGELOG.mdupdatedpreserveSearchStatedropsregionwith the old place2160576?q, and thesyncToUrloption is goneMapSearchpart of3300572matchesFilters, show the pills, offer Clear filters, and carry the filters one level down. Framing still covers everything032f47691af3d2(cherry-picked)placedPathnamebuilds the panels behind a place from the region tree, so the strips and the X lead to/gb/south-eastand then/gb19637c6?cc, else the last country page shown, else the client's home country. A search that finds nothing there repeats itself worldwidef0b3a1a(it releases by itself, since the proposal's button needed new copy)<link>…</link>(splitInlineLink), and the form renders them as a link to wemeditate.com/privacy; unmarked copy reads as plain text, as today.autocomplete="name"/"email"21f1592useTurnstiletakes the slot out of flow while collapsed; neither form spaces it by handCopy (no strings are changed here): sydevs/SahajCloud#1094 asks an admin to reword
common.errors.captcha_blocked(#1) and to add the<link>…</link>span toregistration.form.privacy_policy(#28). The span must wait until this PR is deployed, or visitors would see the markers.Review follow-ups sit on top, one commit each:
cefd172— the country scope is released for one query, not for the field's whole life.d8d5160— the home list's online badge counts under the?region=cut, like its cards.35d9045—hasActiveFiltersis the one "filters are active" predicate in the browse views.bcdf730— the live-region local no longer shadowsMapSearch's country scope.Joined docs changes, each with its own commit:
990b1a2— the state rule lists both new stores, and says why the browsed country is not in the URL.bd94685— the data-layer rule lists the online-count fetcher.06e1a48—docs/embedding.md's privacy section says what the place search now sends to Mapbox.Checked
pnpm buildandpnpm sizepass too: embed 327.4 / 330 KiB, standalone 325.5 / 330 KiB.getRegioncountsplacedPathnameantwerpen, 0 underbrussels)/search?days=2®ion=gb, then Prague. The route keepsdays=2, dropsregion, and lists Prague's classes.?q=London, and the cards still say "5.1 km from London"./gb/south-east/london?format=onlinelists only the online class./gb?days=2counts South East 6, Midlands 1 and South West 1 (26/9/4 unfiltered), with a TUE pill./united-kingdom/south-east/london. The strips read "Back to United Kingdom" and "Back to South East", the first X opens/gb/south-east, and the second opens/gb./gb, Search, then "Hampstead". Hampstead, London comes first, and every suggestion is in the UK. "Prague" from the same field finds Prague, CZ: the request withcountry=GBcame back empty, and a request with no country followed./search?days=2®ion=gbshows no "km" line./gb/no-such-placeoffers only Close./gb/south-eaststill has Calendar, Search and Filters.<sahaj-atlas style="display:block;height:640px">with?atlas=/gb, then pressing the tab button:Not checked
VITE_MAPBOX_ACCESSTOKEN, so the geocoder cannot mount there and the scope release could not be driven by hand.country.test.tsandfetch.test.tswere each watched failing against the defect instead.🤖 Generated with Claude Code