Skip to content

feat(translations): rewrite the Sahaj Atlas schema by widget view, seed all ten locales, and gate availableLocales on them - #750

Merged
Ardnived merged 11 commits into
mainfrom
claude/feat-706-atlas-translations-by-view
Sep 12, 2026
Merged

Ardnived merged 11 commits into
mainfrom
claude/feat-706-atlas-translations-by-view

Conversation

@sydevs-bot

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

Copy link
Copy Markdown
Contributor

Summary

  • The Atlas translations schema now mirrors the widget: 11 tabs, one per view, 33 leaf groups, 193 widget-facing keys. 23 keys dead in the widget are gone; ~100 live keys that had no CMS home now have one.
  • pnpm seed translations writes the widget's own shipped copy for all ten locales and publishes each locale individually, which is what lets an operator select the ten in sy-atlas-config.availableLocales.
  • emails and event.title are untouched: byte-identical in the schema, unwritten by every seed file, and left alone by the migration in both directions.

Changes

  • src/globals/SahajAtlasTranslations/translationsSchema.json — rewritten. Six budgets from the widget's own i18n-budgets.test.ts become maxLength + strict: true; event.display.sessions_count becomes plural: true.
  • seeds/sy-atlas-translations/data.{cs,de,en,es,fr,hu,nl,pt-BR,ru,uk}.json — new, generated from the widget's public/locales/<lng>/{common,events}.json through Appendix A.
  • seeds/translations/import.ts — the atlas path seeds ten locales, publishes per locale, and preserves the two live-data groups.
  • src/migrations/20260909_161353_atlas_translations_by_view.{ts,json} — new.

Preview

  • Preview pending — a routine session has no Railway credential, so scripts/get-railway-preview-url.ts could not discover the alias. The preview builds from this push.

Contract impact

Migration

  • New migration: src/migrations/20260909_161353_atlas_translations_by_view.ts
  • Impact: on sy_atlas_translations_locales and _sy_atlas_translations_v_locales, drops 5 columns whose groups no longer exist and adds 26. emails / event_title are untouched.
  • One hand-edit, documented in the file header: event_recurrence, registration_form and share keep their column but get a new key set, and since feat(translations): typed JSON groups, per-locale publish status, and an availableLocales field gated on published translations #705 each JSON column validates against its own schema on every save — so an old-shape blob would make that locale unsaveable from the admin.
  • The hand-edit drops the keys, not the column (a39f906, after review). Each UPDATE keeps every key the direction it moves toward still declares, so a value a manager translated survives wherever its key survives: 10 of registration_form's 14 and 8 of event_recurrence's 11. The first draft nulled the three columns wholesale, which destroyed those 18 too.
  • What is still destroyed, and only this: copy under a key feat(translations): rewrite the Sahaj Atlas schema by widget view, seed all ten locales, and gate availableLocales on them #706 deletes from the catalogue outright — share.action, registration.form.{cancel, mailing_list_consent, register_now, thank_you}, event.recurrence.{weekly, monthly, no_recurrence}. Eight key names, with no home in the new schema by design.
  • No production query backs that up. A routine session has no production database credential, so the migration was changed to make the answer unnecessary rather than asserted.
  • jsonb_object_agg over no surviving key yields NULL, which is the emptied state the old statement wrote. The jsonb_typeof guard is load-bearing: without it jsonb_each raises cannot call jsonb_each on a non-object on a column holding a scalar or an array, aborting the migration. Verified by running the unguarded form against such a row.
  • Reversible: yes, and now more than before. down mirrors the DDL and filters to the OLD key set, so a value that passed through up under a shared key comes back. Rolled the whole chain down and back up on a database built by the earlier migrations.
  • Both directions were also replayed statement-for-statement on a Postgres 16 cluster over rows holding old-shape copy, new-shape copy, NULL, {}, [] and a scalar.

Test results

  • Lean gate: ✓ pnpm lint && pnpm typecheck && pnpm typecheck:tests && pnpm test:unit (1718 unit tests, 129 files)
  • Targeted specs: ✓ translations-globals (19), translations-field, available-locales (15), atlas-seo, seeds/tests/atlas-translations-import.test.ts (9)
  • Re-run after the review round: ✓ lean gate (1718 unit tests, 129 files) and ✓ seeds/tests/atlas-translations-import.test.ts (9), against a real Payload and Postgres
  • New: tests/unit/atlas-translations-schema.spec.ts (49)
  • Build: N/A — Railway builds the preview.

Manual verification

  1. ADMIN_EMAIL=… ADMIN_PASSWORD=… pnpm seed:prod translations (idempotent), then /admin → sy-atlas-translations: each of the ten locales shows Published.
  2. /admin → sy-atlas-config → availableLocales: select the ten (en required). The validator refuses an unpublished locale.
  3. GET /api/globals/sy-atlas-translations?locale=fr&depth=0 with a client key returns French, with English in registration.form.title and share.title. GET /api/atlas/seo hreflang lists ten again.
  4. Open each tab for fr in the admin and save — no "unknown key" validation error.

Interim: from this deploy until step 2, hreflang is en only, and the widget keeps its shipped ten. That is the safe direction.

Notes for reviewer

  • The schema and all ten seed files came from one generated mapping table, not by hand, so they cannot disagree about a key name. The converter is throwaway and not committed, per the ticket; tests/unit/atlas-translations-schema.spec.ts is what holds the two together from here.
  • Every review finding so far was fixed rather than dismissed. Two earlier ones drew the same distinction — a read that failed is not a read that came back empty. The adversarial round then produced four more: three are fixed in a39f906, e668a24 and 2bdaa0a, and the fourth (nothing pins this catalogue to the widget's) is open, waiting on approval to file a ticket — this repo's AGENTS.md asks before an issue is created, and a routine has no one to ask.
  • Three deviations from the ticket, each deliberate:
    1. The seed spec is seeds/tests/atlas-translations-import.test.ts, not .int.spec.ts. The int project includes seeds/**/*.test.ts; the ticket's filename would never have run.
    2. The ticket's acceptance criteria say "the six budgeted keys" while its own budget list names seven. The list is what the widget enforces, so seven is what is pinned.
    3. publishSpecificLocale alone did not publish anything — it selects Payload's single-locale branch but the incoming _status decides the status. The write carries _status: 'published'. The seed spec caught this; it is not in the ticket.
Detail

Key arithmetic. 219 catalogue keys − 23 dead = 196 live. Minus the plural merge (sessions_count_one/_other → one declared key) and Appendix B's two consolidations (chip_started + started_on; registration.cancel + report.cancel) = 193. The unit spec asserts that number and the 33 leaf groups outright, so no other assertion in it can pass by walking an empty tree.

The consolidations, resolved against the data rather than by rule. started_on wins over chip_started because only nl distinguishes them ("Gestart op %{date}"). The report form's cancel wins because only de and hu distinguish them ("Abbrechen", "Mégse").

Why no seed carries a blank. A key a locale has no translation for is omitted. registration.form.title and share.title are absent from all nine non-English bundles, so the client-read English merge (#705) serves English for them. A stored blank would defeat that merge, which is why the spec asserts non-blank for every key present.

Placeholder safety. A %{x} a translation invents renders literally in front of a visitor, since substitution works from a fixed set per key. The unit spec compares each locale's placeholder set against English's, falling back to the _other form for a plural category English does not use.

The plural family per locale. cs, ru and uk carry _few/_many; the rest carry _one/_other. English is asserted not to carry _few — a value there would have been invented.

Migration generation. pnpm db:migrations:create hits drizzle's rename-vs-create prompt (5 drops beside 26 adds) and exits at EOF on non-TTY stdin, as src/migrations/AGENTS.md predicts. Generated through the payload-cli skill's PTY driver instead, answering create for all 62 prompts, then validated with migration-validator (4 pass, 1 warn — the expected DROP COLUMN notice).

One tool defect hit on the way, filed separately. .claude/skills/payload-cli/interactive.py's prompt regex is Is (\w+) column in (\w+) table…, but chalk colours those two names on a PTY, so the escape codes break the match and the driver stalls on the first prompt with no diagnostic. A patched copy (stripping ANSI before matching) was run from the scratchpad — the file itself was left alone, because a write under .claude/ trips the Protected Paths guard and stalls an unattended run.

Not reproduced locally: applying the migration to a dev database still carrying the old schema via push: true. What was done instead is stronger for the SQL and weaker for the drift case: the whole migration chain was applied on a fresh database, then rolled all the way down and re-applied.

Closes #706

🤖 Generated with Claude Code

https://claude.ai/code/session_01B6BLLCtacuxznLkwvu13vf


Generated by Claude Code

Replace the 2-year-stale 2-namespace schema with one derived from the
widget's live catalogue, grouped by the view that owns each key.

- 11 tabs (Common, Countries, Search, Filters, Online, Event, Calendar,
  Registration, Share, Compact, Emails), 33 leaf groups, 193 widget-facing
  keys. 23 keys dead in the widget are dropped (Appendix C of #706).
- `event.display.sessions_count` becomes `plural: true`; the six copy
  budgets from the widget's own i18n-budgets.test.ts become `maxLength` +
  `strict: true`, so an over-length string cannot be saved.
- `emails` and `event.title` are copied verbatim — both hold live
  production data and keep their columns, keys, values and limits.

Seeds carry the widget's shipped translations for all ten locales, so a
translator starts from what is on screen today rather than from English
placeholders derived from key names. A key a locale has no translation for
is omitted, never blank: the client-read English merge (#705) serves
English for it.

Refs #706

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

`pnpm seed translations` wrote English placeholders derived from key names
into one locale and never published. It now loads one file per widget
locale and publishes each locale on its own, which is what makes the ten
selectable in `sy-atlas-config.availableLocales` (#705's validator rejects
a locale whose translations are not published).

`publishAllLocales` cannot be used here: it scopes itself through
`filterAvailableLocales`, which answers `['en']` for a request with no
user — every seed request. `publishSpecificLocale` takes Payload's
single-locale branch instead.

`emails` and `event.title` hold live production data. No seed file carries
them, and English alone fills a key that is blank today — the whole merged
group is written back, because a JSON column is replaced wholesale and
sending only the blanks would delete the translations beside them.

Refs #706

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01B6BLLCtacuxznLkwvu13vf
Drops the five columns whose groups no longer exist (`common`,
`region_locations`, `region_venues`, `event_details`, `event_timing`) and
adds the twenty-six new ones, on both the live and the versions table.
`emails` and `event_title` hold live production data and are untouched in
both directions.

One hand-edit, documented in the file: `up` also nulls `event_recurrence`,
`registration_form` and `share`. All three keep their column but get a new
key set, and since #705 each JSON column validates against its own schema
on every save of the global — so a locale still holding an old-shape blob
would be unsaveable from the admin, on a save that never touched
translations. The three hold seed placeholders only.

Generated with the answer `create` for every rename-vs-create prompt, then
validated with `migration-validator` and applied on a database that ran the
old schema.

Refs #706

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

Three suites, each covering something the others cannot:

- `tests/unit/atlas-translations-schema.spec.ts` pins the three groups that
  mirror code rather than copy (`registration.questions` ≡
  EVENT_REGISTRATION_QUESTIONS in order, `event.title` ≡ EVENT_TITLE_SLOTS,
  `emails` ≡ EMAIL_STRING_DEFAULTS), every seed against the declared keys,
  and the rule that a translation may not invent a `%{x}` English lacks.
  It also states the schema's size, so no other assertion in it can pass by
  walking an empty tree.
- `tests/int/translations-globals.int.spec.ts` moves to the new tab set and
  the full ordered 33-name JSON field list — `chrome` appears three times,
  so an unordered subset would let a dropped sub-group through. It also now
  asserts a strict key over its `maxLength` is refused on write.
- `seeds/tests/atlas-translations-import.test.ts` runs the importer against
  a real database: ten locales published, a pre-seeded `fr` emails value and
  a tuned `en` auto-title both surviving, blank English email chrome filled
  from the defaults, `cs` carrying its `few` form, `fr` carrying no
  `registration.form.title`, and all of it stable across a re-run.

That last suite caught a real defect first: `publishSpecificLocale` selects
the single-locale branch but does not decide the status, so every locale
was written and left `draft` — the one state `availableLocales` refuses.
The write now carries `_status: 'published'`.

Refs #706

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

- `src/globals/AGENTS.md`: the eleven view tabs, why there is no Region tab,
  and a box on the two Atlas groups that hold live production data.
- `seeds/AGENTS.md`: the `translations` script was missing from the table
  entirely. Adds it, plus the three properties the Atlas path must keep —
  `_status: 'published'` in the data, why `publishAllLocales` cannot be used,
  and the two groups a seed never writes.
- `tests/COVERAGE.md`: the new schema, seed and importer rows.

`available-locales.int.spec.ts` moves off `common.loading`, a key the
rewrite removed, onto `countries.title`.

Refs #706

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

Two findings from the review pass, both about the same distinction: a read
that failed is not a read that came back empty.

- `readAtlasGlobal` returned `null` for both, so a database error made
  `fillBlanks` treat every key as blank and write English defaults over
  `emails` and `event.title` wholesale — the one thing this seed exists to
  avoid. It now returns `{ ok }`, and a failed read omits both groups
  exactly as every other locale does. A new case in the seed spec drives a
  throwing `findGlobal` and was watched failing against the old code.
- The migration's `down` restored the old columns but left
  `event_recurrence`, `registration_form` and `share` holding the NEW key
  sets, which the old schema rejects just as flatly — so a rollback left
  every seeded locale unsaveable. It now nulls them, mirroring `up`.
  Verified by rolling the chain down and back up.

Refs #706

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

railway-app Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

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

Service Status Web Updated
SahajCloud ✅ Success (View Logs) Web Sep 12, 2026 at 5:43 am UTC
1 service not affected by this PR
  • mailpit

@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-750 September 9, 2026 16:41 Destroyed
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Sep 9, 2026
@sydevs-bot

sydevs-bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 05:35Z resolve-conflicts · attempt 1 · session · done
  • 05:35Z resolve-conflicts · attempt 1 · session
  • 17:00Z address-review · attempt 1 · session · done
  • 17:00Z address-review · attempt 1 · session
  • 16:51Z adversarial-review · attempt 1 · session · done

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

The diff tracks #706 closely and its riskiest claims hold: emails and event.title are deep-equal to the old schema, and the columns the migration nulls are exactly the kept ones whose key sets changed. The claim I cannot check here is the migration's own — it destroys three columns of real copy, asserting they hold placeholders only.

Findings

  • should-fix — up nulls three kept columns, down again → migration:91
  • consider — pickSlots restates a type the constant carries → import.ts:118
  • consider — publishOptions mirrors the locale beside it → import.ts:336
  • consider — nothing pins the catalogue to the widget → spec:192
Checked

Both schemas parsed: 33 leaf groups, 193 widget keys, kept subtrees deep-equal, only those three columns' keys changed. Ten seeds: 0 undeclared, 0 blank, 0 over maxLength. Against SahajAtlasWeb@4380e18, data.en.json matched by value to the 219-key en bundle: 0 orphan seed values, 19 orphans, all Appendix C and unreferenced.

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


Generated by Claude Code

Comment thread seeds/translations/import.ts Resolved
Comment thread seeds/translations/import.ts Resolved

// Every other assertion here filters a list. This one states its size, so
// none of them can pass by walking an empty schema.
it('declares 193 widget-facing keys across 33 leaf groups', () => {

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.

This pins the schema against SahajCloud's own constants and the seeds, the half this repo owns. The other half is unpinned: once sydevs/SahajAtlasWeb#198 deletes public/locales/, this schema is the widget's only key source, and a key added or renamed there fails nothing here — it renders blank at a visitor.

This repo already has the pattern: atlas-url-contract.json, pinned by atlas-canonical-url.spec.ts and diffed cross-repo. A follow-up ticket?

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


Generated by Claude Code

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.

Agreed, and the gap is real: once sydevs/SahajAtlasWeb#198 deletes public/locales/, a key renamed there fails nothing here.

I did not file the ticket. AGENTS.md says to ask before creating an issue, and this run has no one to ask. Ask for it and the next run opens it, shaped like atlas-url-contract.json — a committed catalogue file plus a spec, diffed cross-repo.

Leaving this thread open for that call.

🤖 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 9, 2026
The three kept columns were nulled wholesale in both directions, so any
copy a manager had translated in the admin was destroyed with no recovery
— and "seed placeholders only" was an assertion, not something the
migration could rely on.

Each UPDATE now keeps every key the direction it moves toward still
declares, and drops only the rest. 10 of registration_form's 14 keys and
8 of event_recurrence's 11 are shared between the old and new key sets,
so their values survive up() and come back through down(). What is still
lost is exactly the copy under a key #706 deletes from the catalogue:
share.action, registration.form.{cancel, mailing_list_consent,
register_now, thank_you}, event.recurrence.{weekly, monthly,
no_recurrence}.

jsonb_object_agg over no surviving key yields NULL, which is the emptied
state the old statement wrote. The jsonb_typeof guard is load-bearing:
without it jsonb_each raises "cannot call jsonb_each on a non-object" on
a column holding a scalar or an array and aborts the migration — verified
by running the unguarded form against Postgres 16 on such a row.

Both directions were run end to end on a real cluster over rows holding
old-shape copy, new-shape copy, NULL, {}, [] and a scalar.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QDHYfUsBKxPFvARPPQUcTJ
EVENT_TITLE_DEFAULTS is declared Record<EventTitleSlot, string>, so its
keys already are EVENT_TITLE_SLOTS. pickSlots rebuilt the same object and
needed an `as string` to do it. Its one call site now passes the constant
straight to fillBlanks.

The drift it might have caught is already pinned:
atlas-translations-schema.spec.ts asserts event.title against the slots.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QDHYfUsBKxPFvARPPQUcTJ
publishOptions.publishSpecificLocale was the `locale` argument beside it
at every call site, so the object carried nothing the parameter did not.
writeGlobal now takes `publish = false` and passes `locale` through.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QDHYfUsBKxPFvARPPQUcTJ
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-750 September 9, 2026 17:10 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Addressed the adversarial round. Head is 2bdaa0a.

Adopted — 3

Open — 1

  • spec:192 — agreed, and unfiled. AGENTS.md asks before an issue is created, and this run has no one to ask.

A routine has no production database credential, so I could not run the query the first thread asked for. The migration changed instead, and the body now names what it still destroys.

Lean gate green. The seed spec (9) re-ran against a real Payload and Postgres.

🤖 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 9, 2026
@sydevs-bot
sydevs-bot requested a review from Ardnived September 9, 2026 17:20
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

I could not mark ready here — the dispatch token is not allowed to. Everything else on this item is done, so this is the one step left for you.

🤖 sydevs dispatcher

@sydevs-bot

Copy link
Copy Markdown
Contributor Author

This draft has had no CI activity for hours and no session holds it. Comment or push to wake me.

🤖 sydevs dispatcher

@sydevs-bot
sydevs-bot marked this pull request as ready for review September 10, 2026 01:21
@sydevs-bot sydevs-bot moved this from Revising to Approved in SYDevelopers Technical Roadmap Sep 10, 2026
@sydevs-bot sydevs-bot added awaiting bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed awaiting labels Sep 10, 2026
One conflict, in `tests/COVERAGE.md`: both sides appended a row to the
same coverage table. Kept both — #744's two Sentry rows and this branch's
Atlas seed row.

`src/payload-types.ts` and `src/globals/AGENTS.md` auto-merged and were
verified rather than trusted: `pnpm generate:types` reproduces the merged
types byte for byte, and both sides' AGENTS.md paragraphs survive (#705's
`stringsSchema` rename beside #706's Atlas tab list).

No semantic conflict. `main` brought #756's `jsonField` helper, which
rewrites `src/fields/translationsField.ts` — a file this branch never
touched — and added no migration, so the branch's migration stays last in
`src/migrations/index.ts`.

Gate: lint, typecheck, typecheck:tests, 1757 unit tests in 132 files.
Targeted: translations-globals, available-locales and the Atlas seed
spec, 43 tests, against a real Payload and Postgres.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DEd12ZA8W99LeMM2ukWup1
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-750 September 12, 2026 05:41 Destroyed
@sydevs-bot sydevs-bot added awaiting and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Sep 12, 2026
@Ardnived
Ardnived merged commit 4dfd629 into main Sep 12, 2026
10 checks passed
@Ardnived
Ardnived deleted the claude/feat-706-atlas-translations-by-view branch September 12, 2026 16:22
@sydevs-bot sydevs-bot moved this from Approved to Done in SYDevelopers Technical Roadmap Sep 12, 2026
sydevs-bot pushed a commit that referenced this pull request Sep 12, 2026
`main` moved five commits past this branch's base and `tests/COVERAGE.md`
conflicted: both sides appended a row to the same table. Kept both — the
`#743` guard row stays with the two Sentry rows above it, and #750's
translations-seed row follows.

Everything else merged clean. The overlap worth checking was
`src/lib/env/deploymentEnvironment.ts`, which `credentialRejection.ts`
imports: #763 only added `clientDeploymentEnvironment` beside it, so the
server-side read is untouched. `main` changed nothing under
`src/plugins/sentry/` or `src/lib/endpoints/`.

Lean gate green after the merge: lint, typecheck, typecheck:tests, and
1786 unit tests across 135 files.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WMc58cJat8rdZnpNWc4Fnp
sydevs-bot pushed a commit that referenced this pull request Sep 12, 2026
Resolves the only conflict, `src/migrations/index.ts`: both branches
appended a migration. Kept both, in timestamp order — main's
20260909_161353_atlas_translations_by_view (#750) before this branch's
20260911_235823_pages_app_cards_localize_status. Their DDL is
independent: one rewrites the Sahaj Atlas translations schema, the other
moves `_status` into the pages / app_cards locale tables.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PBHRDEQqp6sryryeHTMXN4
sydevs-bot pushed a commit that referenced this pull request Sep 12, 2026
Resolves the conflicts #750 (the Sahaj Atlas schema rewrite, #706) created.
Both branches rewrote a translations global, so the overlap is the one
importer, the migration index, and the specs that read both schemas.

Four conflicts, each resolved to keep both behaviours:

- `src/migrations/index.ts` — all three migrations, in timestamp order:
  #750's atlas reshape first, then this branch's drop and add.
- `seeds/translations/import.ts` — `seedWmWeb` (real English copy, published)
  beside `seedAtlas` (ten locales, each published). `writeGlobal` takes
  main's `locale` parameter, so wm-web passes `DEFAULT_LOCALE` explicitly.
- `tests/int/translations-globals.int.spec.ts` — main's atlas field set,
  this branch's wm-web set, one merged docblock.
- `seeds/AGENTS.md` — one section covering both globals' real copy and both
  publishes.

`generateExampleData` is deleted, not merged. Each side replaced one of its
two callers with real copy, and this branch's own comment said to delete it
once #706 took the last one. The plural-expansion fix this branch made to
that generator goes with it — `pnpm seed translations` no longer generates
data for any global, so the break it repaired cannot recur here.

Also repairs the out-of-order snapshot trap (`src/migrations/AGENTS.md`).
The two migration snapshots on this branch were generated before #750
merged, so the newest-by-timestamp snapshot described the pre-#750 atlas
columns. The next `migrate:create` would have re-emitted #750's DDL and
crash-looped the boot migration (#566). Both snapshots now carry #750's
atlas tables, and `pnpm db:migrations:create --skip-empty` emits nothing.

Verified: lean gate green (lint, typecheck, typecheck:tests, 1778 unit
tests); `translations-globals` (23), `wm-web-translations-seed` (7) and
`translations-field` (22) integration specs green; `pnpm generate:types`
leaves `src/payload-types.ts` byte-identical, so the merged types already
match the merged config.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01T8bW17CGRLHDEzMz9pTk4m
sydevs-bot pushed a commit that referenced this pull request Sep 12, 2026
…-seo-root

#750 rewrote the atlas translations schema by widget view while this branch
added a `seo` group to the same global. Four files conflicted; two more
needed adapting because main renamed a key this branch reads.

- `src/migrations/index.ts` — both migrations kept, in timestamp order, so
  `20260909_..._atlas_translations_by_view` runs before
  `20260912_..._atlas_translations_seo_group`. The `seo` column name collides
  with nothing #750 adds or drops, so the DDL is unchanged.
- `20260912_..._atlas_translations_seo_group.json` — rebased onto #750's
  snapshot plus the two `seo` columns. It is the highest-timestamp snapshot,
  so left describing the pre-#750 schema it would have made the next
  `migrate:create` re-emit all of #750's DDL and crash-loop the boot
  migration (#566, `src/migrations/AGENTS.md`). Regenerating it under a new
  timestamp is unsafe — this branch has already deployed to its preview — and
  `migrate:create` cannot answer its own rename-vs-create prompt unattended.
  Verified: `migrate:create` now finds no schema change and no longer prompts,
  where against the stale snapshot it prompted on `common_chrome`.
- `common.free_meditation_classes` became `common.chrome.widget_label` in
  #750 — same string in all ten locales. The root title's in-locale fallback
  now reads the new path, and the select descends into `common` rather than
  taking all seven of its columns.
- `src/globals/AGENTS.md`, `tests/int/translations-globals.int.spec.ts`,
  `tests/unit/atlas-translations-schema.spec.ts` — `Seo` joins `Emails` as the
  second group no widget view reads, so #750's "one tab per widget view" rule
  and its three key counts now name both exceptions.
- `src/payload-types.ts` — regenerated; carries both `SyAtlasTranslationsSeoStrings`
  and `SyAtlasTranslationsCommonChromeStrings`.

Gate: lint, `tsc` over src and tests, 1804 unit tests. Targeted specs
`atlas-seo` + `translations-globals` — 72 passed.

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

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-750 — c6737376 Deployed Sep 12, 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): rewrite the Sahaj Atlas schema by widget view, seed all ten locales, and gate availableLocales on them

3 participants