Skip to content

feat(translations): add the geolocate-failure message to sy-atlas-translations - #1033

Merged
sydevs-bot merged 7 commits into
mainfrom
claude/feat-1031-translations-location-failed
Oct 26, 2026
Merged

sydevs-bot merged 7 commits into
mainfrom
claude/feat-1031-translations-location-failed

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Change outline

The key is what a consumer observes, so the contract leads. src/payload-types.ts is the generated consequence of this one edit and is not drawn again.

Contract — the common.map group

 sy-atlas-translations · common.map    src/globals/SahajAtlasTranslations/translationsSchema.json
-  group description: "Labels on the map's own controls."
+  group description: "The map's own controls — their labels, and the message shown
+                      when one of them fails."
   find_my_location        string   "Label of the geolocate control."
+  location_failed         string   "Introductory line under the heading of the dialog
+                                    that opens when the geolocate control fails to
+                                    supply a location. A full sentence, not a control
+                                    label."
-  location_not_available  string   "Label of the geolocate control once the browser
-                                    has refused or failed to supply a location."
+  location_not_available  string   "Label of the geolocate control once the browser
+                                    has refused or failed to supply a location, and
+                                    the heading of the dialog that reports that
+                                    failure."

Two keys, not one. #321 heads its dialog with location_not_available — the key that also labels the control — and fills the body from location_failed. So the pair is described as heading and introductory line, in the idiom submit.report.title / description already uses, and location_not_available now states both of its roles. A manager rewording a control label is rewording a dialog heading, and nothing but that description says so.

No maxLength: the string renders as the dialog's description line and wraps. No migration — common.map is an existing leaf group, so the key lives inside a jsonb column that already exists and only the column's generated JSON Schema changes.

Files — which locales carry the string

 seeds/sy-atlas-translations/
-├── data.en.json                              # common.map: 2 keys
+├── data.en.json                              # common.map: 3 keys — the seed default
 └── data.{cs,de,es,fr,hu,nl,pt-BR,ru,uk}.json # untouched: omitted, never blank

Each locale's _meta.omitted_keys says an untranslated key is omitted rather than blanked, and clientEnglishFallback serves English for it on a client read. A manager read is deliberately left partial, so the admin keeps showing which keys are empty.

Preview

Data: not seeded. A preview carries no translations content, and this repo sets no previewUrl.seed — see Manual verification for the one command that fills it. The admin link above shows the field and its description regardless; only its value is empty.

Contract impact

src/payload-types.ts gained location_failed on SyAtlasTranslationsCommonMapStrings, and both map keys' JSDoc now carries its new description. Both type consumers re-sync from it after this merges — sydevs/SahajAtlasWeb (src/types/payload/payload-types.ts) and sydevs/WeMeditateWeb (server/payload-types.ts) — through the dispatcher's own contract-sync PR, so neither needs an issue.

The widget-side work is sydevs/SahajAtlasWeb#321, which this unblocks. Per the ticket, pnpm sync:translations --write is deliberately not run there from this PR: that script reads production, and src/config/translations.test.ts asserts the snapshot in both directions, so the key reaches that snapshot beside the t() call that uses it.

Test results

  • Lean gate: ✓ lint, format:check, typecheck, typecheck:tests, test:unit (226 files / 2902 tests, 134 s)
  • Targeted spec: 36 passed — tests/int/translations-globals.int.spec.ts
  • Build: N/A — Railway builds the app on the preview deploy

Every acceptance criterion was also checked against a running dev server with pnpm seed translations applied:

Read Result
GET …?locale=en returns location_failed under common.map
GET …?locale=de, clients API key returns the English string — not blank, not a raw key
GET …?locale=de, manager omits it, as the admin requires
/admin/globals/sy-atlas-translations the field renders with its description

Manual verification

A preview carries no translations content (Railway forks configuration, not volume data), and previewUrl.seed is unset for this repo — a remote seed needs a sign-in link redeemed by a human (scripts/redeem-signin-link.ts), which this run cannot obtain. So on the preview:

  1. Open the admin link above and confirm the Map group lists Location Failed with its description, and that Location Not Available now names the dialog heading too. The values are empty there; the English default is in seeds/sy-atlas-translations/data.en.json.
  2. To see the value, run pnpm tsx scripts/redeem-signin-link.ts '<link>' --seed translations against the preview, then re-read the API link above.

Notes for reviewer

  • The key count is 258 → 259, and both numbers were read off a run. Adding the key failed the count assertion at 258 first, alongside the seed-coverage assertion; both then passed. main added a key of its own underneath this branch, so the assertion moved twice — 257 → 258 on the first commit, then 258 → 259 once main was merged in. The it title carries the same number, which is why two lines of that spec changed rather than one.
  • The no-migration claim was verified, not assumed. timeout 300 pnpm db:migrations:create atlas_location_failed --skip-empty generated nothing and left the tree clean.
  • AGENTS.md carries the joined change. docs/rules/api-clients.md declares paths: src/plugins/usage/**/*.ts, so a warning placed there loads only for someone editing the usage plugin — never the next session verifying a client read. The Admin Access section of AGENTS.md loads unconditionally and already explains admin.autoLogin, so the warning sits beside its own cause with a pointer back to the rule that owns the select gate. api-clients.md is no longer in the diff.
  • Dismissed: the new English string uses a curly apostrophe (couldn't) while some siblings use a straight one. data.en.json is already mixed, and the closest parallel string (submit.report.send_failed, "We couldn't send your submission") is curly, so this introduces no new inconsistency.
  • Dismissed: renaming location_failed to the body half of a _title / _body pair, as common.feedback.denied_title / denied_body does. feat(metadata): rename MeditationTags → UserChoices and add SubtleSystemNodes #321 reads common.map.location_failed under exactly that spelling and heads the dialog with the existing location_not_available rather than a new _title key, so the rename would break the one consumer the key exists for and strand a third key nothing reads. The pairing is carried in the descriptions instead.
Detail

Why the client-key check looked broken at first. The read at locale=de came back without location_failed, and so did every other key German omits — which reads exactly like a broken English merge. It was not. A dev server's admin.autoLogin is resolved by the JWT strategy, which runs ahead of clients-api-key because Managers is listed before Clients, and extractJWT does not recognise the clients API-Key scheme — so the request authenticated as the auto-login manager and the merge correctly stood down. The tell is that the same read passed with no select, which a real client read is refused 400 for. DisableAutologin: true beside the key makes it a client read, and the merge then fills the key at de and fr. That is the line added to AGENTS.md; api-clients.md's two existing mentions of the header cover /me only.

Nine locales stay untouched on purpose. Copying the English string into them would defeat the merge rather than help it, and the schema spec flags an English value outside its allowlist.

Nodemailer logs a CONNECT_TIMEOUT on every Payload CLI run in this environment. No SMTP host is reachable from the routine container. It is noise around the commands above, not a failure of any of them.

Closes #1031

🤖 Generated with Claude Code

https://claude.ai/code/session_011Gfqpfkg9vDb4pwcr4GVTc

…nslations

`common.map.location_failed` carries the sentence the widget's geolocate
dialog shows when "Find my location" fails (sydevs/SahajAtlasWeb#321). The
group's description widens to cover a message as well as its two control
labels, and English is the only locale seeded — the client read merges
English for a key a locale omits.

The 258 in the key-count assertion was read off the failing run, not guessed:
adding the key failed it at 257 first.

Closes #1031

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011Gfqpfkg9vDb4pwcr4GVTc
… read

A dev server authenticates every request as its auto-login manager, so a
client-contract check against localhost passes as a manager and the select
gate never fires. Tripped over while verifying #1031's client read: the
English merge looked broken because the read was never a client read.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011Gfqpfkg9vDb4pwcr4GVTc
`next dev` demotes the heading inside `BEGIN:nextjs-agent-rules` on every
boot. Reverting it only re-creates the uncommitted change.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011Gfqpfkg9vDb4pwcr4GVTc
@railway-app

railway-app Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the SahajCloud-pr-1033 environment in sahajcloud

Service Status Web Updated
SahajCloud ✅ Success (View Logs) Web Oct 25, 2026 at 9:15 pm UTC
1 service not affected by this PR
  • mailpit

@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1033 October 25, 2026 20:29 Destroyed
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 25, 2026
@sydevs-bot

sydevs-bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running
CI fix 1

recent dispatches
  • 21:02Z address-review · attempt 1 · session · done
  • 21:02Z address-review · attempt 1 · session
  • 20:54Z review-pr · attempt 1 · session · done
  • 20:54Z review-pr · attempt 1 · session
  • 20:32Z fix-ci · attempt 1 · session · done

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

#1020 added `event.display.room` and bumped the key-count assertion 257 → 258
on main. This branch bumped the same line to the same number for its own key,
so git merged the two edits without a conflict and the merged tree declares
259 keys while asserting 258.

The count is read off the failing run, as before: the merge of main reports
259, and the leaf-group count stays 43 because both keys joined existing
groups.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SQuxzF4yEksfQoUCXiSxJC
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1033 October 25, 2026 20:38 Destroyed
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 25, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 Adversarial review

This is the size of its problem: 14 lines, every one named by #1031. The one unlisted file, docs/rules/api-clients.md, is joined by this ticket's own verification step, so it is not scope. The consumer side matches — sydevs/SahajAtlasWeb#321 asks for common.map.location_failed under that exact name. One contract gap remains: #321 builds a dialog from two keys, and the schema still describes only one of them as belonging to a dialog.

Findings

  • should-fix — location_not_available becomes #321's dialog heading, but its description still calls it a control label. translationsSchema.json:237.
  • should-fix — the body's Notes for reviewer is pre-merge. It says the count went 257 → 258 and that AGENTS.md is in the diff. The diff is 258 → 259 and holds no AGENTS.md. The reviewer reads that section first.
  • consider — the new api-clients.md warning loads only for the usage plugin, not for whoever repeats the mistake. api-clients.md:21.

What was checked

  • Counted the schema: main declares 258 widget-facing keys, this branch 259. The bump is right; the body's number is not.
  • Consumer side, SahajAtlasWeb: #321 binds the dialog title to location_not_available, and Map.tsx:238 binds that same key to GeolocateControl.LocationNotAvailable today.
  • Criterion 3 needs no code — clientEnglishFallback is built from the schema (schemaLookups) and wired on this global, so a new key is covered.
  • _meta.omitted_keys in data.de.json is prose, not a list, so the nine untouched locales owe nothing.
  • DisableAutologin is real and exact-string (payload/dist/auth/strategies/jwt.js:73), so the docs line is accurate.
  • tests/unit/atlas-translations-schema.spec.ts: 58 passed.
  • Preview /admin/login answers 200. The API link needs a credential this run does not hold.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread docs/rules/api-clients.md Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 25, 2026
After sydevs/SahajAtlasWeb#321 the failure dialog takes its heading from
`common.map.location_not_available`, the same key that labels the geolocate
control. Its description named only the label, so a manager rewording a
control label would silently reword a dialog heading with nothing to warn
them. Both roles are now stated, in the idiom `submit.report.title` already
uses for a key serving three places.

`location_failed` is described as that heading's introductory line, mirroring
`submit.report.description`. The key keeps its name: #321 reads
`common.map.location_failed` under exactly that spelling, and renaming it to
a `_body` half would break the consumer the key exists for.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01No89uA3CHa1Km3NC1a3EBo
`docs/rules/api-clients.md` declares `paths: src/plugins/usage/**/*.ts`, so
the warning reached only someone editing the usage plugin — never the next
session verifying a client read, which is who walks into it. The Admin Access
section of `AGENTS.md` loads unconditionally and already explains
`admin.autoLogin`, so the warning now sits beside its own cause, with a
pointer back to the rule that owns the `select` gate.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01No89uA3CHa1Km3NC1a3EBo
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1033 October 25, 2026 21:09 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Three review findings addressed. Head 6f0fcbb.

Branch was level with main, so no base merge. Lean gate green; translations-globals.int.spec.ts 36 passed.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 25, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review October 25, 2026 21:25
@sydevs-bot
sydevs-bot requested a review from Ardnived October 25, 2026 21:25
@sydevs-bot
sydevs-bot enabled auto-merge October 25, 2026 21:25
@sydevs-bot sydevs-bot moved this from Revising to Approved in SYDevelopers Technical Roadmap Oct 26, 2026
@sydevs-bot
sydevs-bot added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 77ed0f1 Oct 26, 2026
50 of 52 checks passed
@sydevs-bot
sydevs-bot deleted the claude/feat-1031-translations-location-failed branch October 26, 2026 20:06
@sydevs-bot sydevs-bot moved this from Approved to Done in SYDevelopers Technical Roadmap Oct 26, 2026
sydevs-bot added a commit to sydevs/WeMeditateWeb that referenced this pull request Oct 26, 2026
sydevs-bot pushed a commit that referenced this pull request Oct 26, 2026
#1033 landed location_failed in the same common.map object this branch adds
mapbox_homepage and toggle_attribution to, and reworded both the group's own
description and location_not_available's.

Both sides kept, everywhere: main's reworded descriptions, this branch's two
keys, all three seed strings. The declared-key count assertion goes to 261 —
258 before either PR, one from #1033, two here — read off the spec run, not
computed. src/payload-types.ts auto-merged, and generate:types reproduces it
with no drift.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HCtN4KyjT7zuHFmFGB1Ep7

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-1033 — 6f0fcbb4 Deployed Oct 25, 2026 by railway-app[bot]
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.

feat(translations): add the geolocate-failure message to sy-atlas-translations

3 participants