Repository navigation
feat(translations): add unverified-listing copy to sy-atlas-translations - #830
Conversation
SahajAtlasWeb#220 badges published-but-unverified events on the Atlas event page. Its `t()` calls need keys this global does not hold, and that repo's snapshot spec fails any key the CMS cannot answer, so the widget work is blocked until these ship. Two keys under `event.display`, feeding the badge's Alert title and description slots. No maxLength: the Alert wraps rather than truncating, so neither string sits in a slot that breaks. English only. Each locale file omits a key it has no translation for, and `mergeEnglish` fills an inner key absent from a group whose field is present — `event.display` is present in all ten locale files, so a non-English read serves the English string rather than a blank. The 193 key-count assertion was watched failing at 195 before the bump, so the number is pinned rather than guessed. No migration: a leaf group is one jsonb column, and `db:migrations:create --skip-empty` wrote nothing against a snapshot that already declares `event_display` as bare jsonb. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01ASoXYBe9njrnbNq4CdobEJ
|
🚅 Deployed to the SahajCloud-pr-830 environment in sahajcloud
1 service not affected by this PR
|
|
🤖 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
Twenty lines across the four files #829 named, and nothing else — no abstraction, no knob, no refactor. The keys match the consumer: sydevs/SahajAtlasWeb#220 asks for event.display.unverified_title and unverified_note. English-only is checkable rather than claimed: mergeEnglish fills a missing inner key whenever its field is present, and event_display is present in all ten seeds.
Findings
should-fix— the note says "class … confirmed" where the product says "listing … verified", disagreeing with its own title. Thread onseeds/sy-atlas-translations/data.en.json:170.
What was checked
- Re-derived the spec's numbers off the branch schema: 195 widget-facing keys, 34 leaf groups, no blank description.
sy_atlas_translations_locales.event_displayis barejsonbin the newest snapshot, so no-migration holds.- Grepped every file enumerating these keys: schema, ten seeds,
payload-types.ts. Nothing leaked into the other nine. - Read
clientEnglishFallback.ts, #829, #220, the reviewer profile.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The badge title reads "Unverified listing" while its note read "This
class has not been confirmed by a local coordinator yet" — one Alert
saying two different things about one state.
The product already settled both words elsewhere. `emailStrings.ts:62`
and `FeedbackForm.tsx:174` both ship "This listing hasn't been verified
by a local coordinator yet", and the field behind the state is
`verificationStage`. So "listing" and "verified" are the established
pair, and the note is what moves.
The schema description moves with it. It narrated the old wording
("confirmed the class yet"), which is what a CMS editor and every
translator read before they write, so leaving it would reinstate the
same disagreement one hop away.
Addresses the review thread on seeds/sy-atlas-translations/data.en.json.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01M8PRYeE2pTvPEaoBajHKx3
|
One thread, adopted. Pushed 1541f7d.
Nothing rebutted. Nothing to ask. Lean gate green. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
event.display.unverified_titleandevent.display.unverified_note, the copy feat(widget): badge unverified listings on the event page SahajAtlasWeb#220 needs to badge published-but-unverified events.Changes
src/globals/SahajAtlasTranslations/translationsSchema.json— the two keys, each described as Event view only. NomaxLength: the badge is anAlertwhose slots wrap rather than truncate.seeds/sy-atlas-translations/data.en.json— the English strings.tests/unit/atlas-translations-schema.spec.ts— key count 193 → 195, and the matchingit()title. Nothing else in the file changed.src/payload-types.ts— regenerated.Preview
event.displayContract impact
src/payload-types.tsgains both keys onSyAtlasTranslationsEventDisplayStrings.Consumer: sydevs/SahajAtlasWeb#220, which is blocked on this. Do not run
pnpm sync:translations --writethere from this PR — that repo's snapshot spec asserts every snapshot key is referenced in source, so the sync belongs in #220's own PR beside thet()calls.Test results
pnpm lint,pnpm typecheck,pnpm typecheck:tests,pnpm test:unit— 2144 unit tests passtranslations-globals+translations-field(62),globals-client-reads(15)translations-globals+translations-fieldgreen (62)db:migrations:create --skip-emptywrote no files, exit 0Manual verification
Two acceptance criteria could not be verified in the sandbox —
managers/first-registerrolls its transaction back on the welcome-email send, and this container has no outbound SMTP, so no admin exists to authenticatepnpm seed translations. On the preview:pnpm seed translations, thenGET /api/globals/sy-atlas-translations?locale=en— both keys present underevent.display.locale=de, authenticated with aclientsAPI key — both keys return the English strings, not blanks and not raw keys./admin/globals/sy-atlas-translations→ Event tab → Display — both fields editable, descriptions shown.Notes for reviewer
emailStrings.ts:62andFeedbackForm.tsx:174already ship. Can't set irregular time reminder countdown #220 lists final wording as an open question.Alertwraps rather than truncating, so neither key sits in a slot that breaks. Adding one later means adding the entry there too./pr-review-toolkit:review-pris not available in this session, so step 2 of the finalize pipeline ran as a manual adversarial re-read pluscomment-lint.mjs(clean, 2 files, no banned comment).Detail
The key count was pinned, not guessed. The two keys went in first,
pnpm test:unitwas run, and the assertion failed withexpected 195 to be 193before the constant was touched. The same run named the missing English seed values, which is the second half of this diff.Why the note was rewritten. The badge titles itself "Unverified listing" and the state behind it is
verificationStage, so "confirmed the class" disagreed with the Alert it sits in and with the two shipped strings above. The schema description moved with the string — it narrated the old verb, and that line is what a CMS editor and every translator read before they write.Why no migration. A leaf group is one
jsonbcolumn. The newest snapshot (20260918_172634_atlas_config_report_issue_form.json) declarespublic.sy_atlas_translations_locales.event_displayas barejsonbwith no inner schema, so keys added inside the blob need no DDL.db:migrations:create --skip-emptyexiting 0 with no files is therefore the "no schema changes" row ofsrc/migrations/AGENTS.md, not the silent-CLI-death row — the column is present in the snapshot, which is what distinguishes them.Why English-only is safe.
mergeEnglishfills an inner key absent from a group whose field is present.event.displayis present in all ten locale files (checked), so the merge reaches both new keys everywhere. Each locale's_meta.omitted_keysstates that an untranslated key is omitted rather than blank, and the spec at:355flags an English value appearing outside its allowlist — so copying the English string into the other nine would be the wrong move twice over.Prettier.
prettier --checkwarns ontests/unit/atlas-translations-schema.spec.ts, but the same warning reproduces on the file atorigin/mainand none of the disagreements are on the two lines this branch changed.pnpm lint— the CI gate — passes. Left alone rather than reformatting an unrelated file.Dropped from the commit. Starting the dev server let
next devappend itsnextjs-agent-rulesblock toAGENTS.md. Unrelated to this ticket, so it was kept out of the diff.Closes #829
🤖 Written by the sydevs autonomous loop — see what this is
🤖 Generated with Claude Code
https://claude.ai/code/session_01ASoXYBe9njrnbNq4CdobEJ