Repository navigation
feat(translations): add the geolocate-failure message to sy-atlas-translations - #1033
Conversation
…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
|
🚅 Deployed to the SahajCloud-pr-1033 environment in sahajcloud
1 service not affected by this PR
|
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
…slations-location-failed
#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
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 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_availablebecomes #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 went257 → 258and thatAGENTS.mdis in the diff. The diff is258 → 259and holds noAGENTS.md. The reviewer reads that section first.consider— the newapi-clients.mdwarning loads only for the usage plugin, not for whoever repeats the mistake. api-clients.md:21.
What was checked
- Counted the schema:
maindeclares 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, andMap.tsx:238binds that same key toGeolocateControl.LocationNotAvailabletoday. - Criterion 3 needs no code —
clientEnglishFallbackis built from the schema (schemaLookups) and wired on this global, so a new key is covered. _meta.omitted_keysindata.de.jsonis prose, not a list, so the nine untouched locales owe nothing.DisableAutologinis 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/loginanswers 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
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
|
Three review findings addressed. Head
Branch was level with 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
#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
Summary
common.map.location_failedcarries the sentence the widget's geolocate dialog needs, unblocking fix(map): say why Find my location did nothing when it is blocked SahajAtlasWeb#321.AGENTS.md's Admin Access section now names the local auto-login shadow that made this ticket's own client-key check read as a manager.Change outline
The key is what a consumer observes, so the contract leads.
src/payload-types.tsis the generated consequence of this one edit and is not drawn again.Contract — the
common.mapgroupTwo keys, not one. #321 heads its dialog with
location_not_available— the key that also labels the control — and fills the body fromlocation_failed. So the pair is described as heading and introductory line, in the idiomsubmit.report.title/descriptionalready uses, andlocation_not_availablenow 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.mapis an existing leaf group, so the key lives inside ajsonbcolumn that already exists and only the column's generated JSON Schema changes.Files — which locales carry the string
Each locale's
_meta.omitted_keyssays an untranslated key is omitted rather than blanked, andclientEnglishFallbackserves English for it on a client read. A manager read is deliberately left partial, so the admin keeps showing which keys are empty.Preview
common.mapas the API returns it — the three keys, signed in as the preview adminData: 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.tsgainedlocation_failedonSyAtlasTranslationsCommonMapStrings, 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 --writeis deliberately not run there from this PR: that script reads production, andsrc/config/translations.test.tsasserts the snapshot in both directions, so the key reaches that snapshot beside thet()call that uses it.Test results
lint,format:check,typecheck,typecheck:tests,test:unit(226 files / 2902 tests, 134 s)tests/int/translations-globals.int.spec.tsEvery acceptance criterion was also checked against a running dev server with
pnpm seed translationsapplied:GET …?locale=enlocation_failedundercommon.mapGET …?locale=de,clientsAPI keyGET …?locale=de, manager/admin/globals/sy-atlas-translationsManual verification
A preview carries no translations content (Railway forks configuration, not volume data), and
previewUrl.seedis 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:seeds/sy-atlas-translations/data.en.json.pnpm tsx scripts/redeem-signin-link.ts '<link>' --seed translationsagainst the preview, then re-read the API link above.Notes for reviewer
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.mainadded a key of its own underneath this branch, so the assertion moved twice —257 → 258on the first commit, then258 → 259oncemainwas merged in. Theittitle carries the same number, which is why two lines of that spec changed rather than one.timeout 300 pnpm db:migrations:create atlas_location_failed --skip-emptygenerated nothing and left the tree clean.AGENTS.mdcarries the joined change.docs/rules/api-clients.mddeclarespaths: 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 ofAGENTS.mdloads unconditionally and already explainsadmin.autoLogin, so the warning sits beside its own cause with a pointer back to the rule that owns theselectgate.api-clients.mdis no longer in the diff.couldn't) while some siblings use a straight one.data.en.jsonis 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.location_failedto the body half of a_title/_bodypair, ascommon.feedback.denied_title/denied_bodydoes. feat(metadata): rename MeditationTags → UserChoices and add SubtleSystemNodes #321 readscommon.map.location_failedunder exactly that spelling and heads the dialog with the existinglocation_not_availablerather than a new_titlekey, 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=decame back withoutlocation_failed, and so did every other key German omits — which reads exactly like a broken English merge. It was not. A dev server'sadmin.autoLoginis resolved by the JWT strategy, which runs ahead ofclients-api-keybecauseManagersis listed beforeClients, andextractJWTdoes not recognise theclients API-Keyscheme — so the request authenticated as the auto-login manager and the merge correctly stood down. The tell is that the same read passed with noselect, which a real client read is refused 400 for.DisableAutologin: truebeside the key makes it a client read, and the merge then fills the key atdeandfr. That is the line added toAGENTS.md;api-clients.md's two existing mentions of the header cover/meonly.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_TIMEOUTon 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