Skip to content

feat(translations): add unverified-listing copy to sy-atlas-translations - #830

Merged
sydevs-bot merged 2 commits into
mainfrom
claude/feat-829-atlas-unverified-copy
Sep 21, 2026
Merged

sydevs-bot merged 2 commits into
mainfrom
claude/feat-829-atlas-unverified-copy

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds event.display.unverified_title and event.display.unverified_note, the copy feat(widget): badge unverified listings on the event page SahajAtlasWeb#220 needs to badge published-but-unverified events.
  • English seed only. Nine other locales omit the keys and are served English by the existing client-read merge.
  • No migration, no logic. Schema, seed, generated types, and the key-count constant.

Changes

  • src/globals/SahajAtlasTranslations/translationsSchema.json — the two keys, each described as Event view only. No maxLength: the badge is an Alert whose 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 matching it() title. Nothing else in the file changed.
  • src/payload-types.ts — regenerated.

Preview

Contract impact

src/payload-types.ts gains both keys on SyAtlasTranslationsEventDisplayStrings.

Consumer: sydevs/SahajAtlasWeb#220, which is blocked on this. Do not run pnpm sync:translations --write there 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 the t() calls.

Test results

  • Lean gate: ✓ pnpm lint, pnpm typecheck, pnpm typecheck:tests, pnpm test:unit — 2144 unit tests pass
  • Targeted specs: 77 passed — translations-globals + translations-field (62), globals-client-reads (15)
  • Re-run after 1541f7d: lean gate green, translations-globals + translations-field green (62)
  • Contract step: db:migrations:create --skip-empty wrote no files, exit 0
  • Build: N/A (CI)

Manual verification

Two acceptance criteria could not be verified in the sandbox — managers/first-register rolls its transaction back on the welcome-email send, and this container has no outbound SMTP, so no admin exists to authenticate pnpm seed translations. On the preview:

  1. pnpm seed translations, then GET /api/globals/sy-atlas-translations?locale=en — both keys present under event.display.
  2. The same read at locale=de, authenticated with a clients API key — both keys return the English strings, not blanks and not raw keys.
  3. /admin/globals/sy-atlas-translations → Event tab → Display — both fields editable, descriptions shown.

Notes for reviewer

  • The wording is yours to set. The title is Can't set irregular time reminder countdown #220's verbatim. The note is not: 1541f7d rewrote it to "This listing has not been verified by a local coordinator yet", the sentence emailStrings.ts:62 and FeedbackForm.tsx:174 already ship. Can't set irregular time reminder countdown #220 lists final wording as an open question.
  • I did not add a copy budget. The spec pins the budget map as a closed list of seven, and an Alert wraps 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-pr is not available in this session, so step 2 of the finalize pipeline ran as a manual adversarial re-read plus comment-lint.mjs (clean, 2 files, no banned comment).
Detail

The key count was pinned, not guessed. The two keys went in first, pnpm test:unit was run, and the assertion failed with expected 195 to be 193 before 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 jsonb column. The newest snapshot (20260918_172634_atlas_config_report_issue_form.json) declares public.sy_atlas_translations_locales.event_display as bare jsonb with no inner schema, so keys added inside the blob need no DDL. db:migrations:create --skip-empty exiting 0 with no files is therefore the "no schema changes" row of src/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. mergeEnglish fills an inner key absent from a group whose field is present. event.display is present in all ten locale files (checked), so the merge reaches both new keys everywhere. Each locale's _meta.omitted_keys states that an untranslated key is omitted rather than blank, and the spec at :355 flags 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 --check warns on tests/unit/atlas-translations-schema.spec.ts, but the same warning reproduces on the file at origin/main and 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 dev append its nextjs-agent-rules block to AGENTS.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

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
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-830 September 21, 2026 20:00 Destroyed
@railway-app

railway-app Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

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

Service Status Web Updated
SahajCloud ✅ Success (View Logs) Web Sep 21, 2026 at 8:28 pm UTC
1 service not affected by this PR
  • mailpit

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

sydevs-bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 20:17Z address-review · attempt 1 · session · done
  • 20:17Z address-review · attempt 1 · session
  • 20:11Z adversarial-review · attempt 1 · session · done
  • 20:11Z adversarial-review · attempt 1 · session

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

@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

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 on seeds/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_display is bare jsonb in 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

@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 Sep 21, 2026
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
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-830 September 21, 2026 20:21 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

One thread, adopted. Pushed 1541f7d.

  • Adopted — the note disagreeing with its own title. The note now reads "This listing has not been verified by a local coordinator yet", the sentence emailStrings.ts:62 and FeedbackForm.tsx:174 already ship. The schema description moved with it, since editors and translators read that line before they write. Thread resolved.

Nothing rebutted. Nothing to ask.

Lean gate green. translations-globals + translations-field green, 62 tests. Body refreshed: the reviewer note no longer claims both strings are sydevs/SahajAtlasWeb#220's verbatim — the title is, the note is not.

🤖 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 Sep 21, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review September 21, 2026 20:32
@sydevs-bot
sydevs-bot requested a review from Ardnived September 21, 2026 20:32
@sydevs-bot
sydevs-bot added this pull request to the merge queue Sep 21, 2026
Merged via the queue into main with commit db029a4 Sep 21, 2026
22 of 23 checks passed
@sydevs-bot
sydevs-bot deleted the claude/feat-829-atlas-unverified-copy branch September 21, 2026 22:36
@sydevs-bot sydevs-bot moved this from Revising to Done in SYDevelopers Technical Roadmap Sep 21, 2026

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-830 — 1541f7d1 Deployed Sep 21, 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 unverified-listing copy to sy-atlas-translations

3 participants