Skip to content

feat(translations): rewrite the WeMeditate Web schema by page, seed and publish English - #755

Merged
Ardnived merged 16 commits into
mainfrom
claude/feat-707-wm-web-translations
Sep 12, 2026
Merged

Ardnived merged 16 commits into
mainfrom
claude/feat-707-wm-web-translations

Conversation

@sydevs-bot

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

Copy link
Copy Markdown
Contributor

Summary

Closes #707. Unblocks sydevs/WeMeditateWeb#80.

Changes

  • src/globals/WeMeditateWebTranslations/translationsSchema.json — the 12 tabs, 22 leaf groups, 140 keys of Appendix A, each with a translator-facing description naming its placeholders.
  • seeds/wm-web-translations/data.en.json (new) — the English copy, shaped like the global's API response so the importer hands it over untransformed.
  • seeds/translations/import.ts — seedWmWeb reads that file instead of inventing values from key names, and publishes English. generateExampleData and seedFromSchema are gone.
  • src/fields/translationsField.ts — SUBGROUP_PRESENTATION, one table holding a sub-group slug's label and collapse rule together. toWords('a11y') is "A11y". Only a sub-group reads that table: slugLabel labels every tab, subGroupLabel consults it.
  • src/migrations/ — two migrations, drop then add.

Preview

The route worth opening is /admin/globals/wm-web-translations, for the twelve tabs and the collapsibles.

Migration

Why two migrations and not one. A drop and an add of jsonb columns in one diff reads to drizzle-kit as a rename, and its rename-vs-create prompt hangs forever on non-TTY stdin (src/migrations/AGENTS.md). Generated by reducing the schema to the two surviving tabs, generating the drops, restoring it, then generating the adds — so each file is pure and neither run saw a prompt.

Both snapshots were repaired in the merge. See the merge section below — left alone they would have crash-looped the next deploy's boot migration.

Contract impact

src/payload-types.ts: 22 named WmWebTranslations…Strings interfaces, one per leaf group, up from 5 — each key's description carried through as JSDoc. …CommonStrings, …PageTagsStrings and …ErrorsStrings are gone; …NavigationStrings and …FooterStrings keep their names with new members.

sydevs/WeMeditateWeb#80 consumes this global for every string. It must run pnpm types:cms only after production has deployed and an operator has run pnpm seed:prod translations — the sequence is in Manual verification below.

Test results

  • Lean gate: ✓ pnpm lint && pnpm typecheck && pnpm typecheck:tests && pnpm test:unit (1778 unit tests, post-merge)
  • Targeted specs: ✓ translations-globals (23), wm-web-translations-seed (7), translations-field (22)
  • Migration chain: ✓ applied and rolled back against a real Postgres holding main's table shape
  • Snapshot chain: ✓ pnpm db:migrations:create --skip-empty emits nothing against the merged config
  • Types: ✓ pnpm generate:types leaves src/payload-types.ts byte-identical after the merge
  • Build: N/A (Railway builds the preview)

Manual verification

  1. In the admin, open WeMeditate Web → Translations: 12 tabs in order, each nested tab showing General open and Accessibility collapsed, every key with a description.
  2. Type 20 characters into Media → General → duration_minutes and save — it must be refused (strict limit). Meditation → General → label over 20 must still save (advisory).
  3. After the production deploy, an operator runs pnpm seed:prod translations, confirms en shows as published, then selects English in wm-web-config.availableLocales. Only then may feat(i18n): source every UI string and the locale set from SahajCloud WeMeditateWeb#80 run pnpm types:cms.

Notes for reviewer

One deliberate deviation from the ticket, and it is a number — this is the open thread. Appendix A puts strict maxLength 10 on media.duration_minutes / duration_seconds. The limit measures the raw stored string, and Appendix A's own English for those keys is %{count} min — 12 characters. At 10 the ticket contradicts itself: seeding the English it specifies would be refused by the strict gate it also specifies, so pnpm seed translations could never pass its own acceptance criterion. They are 18 here, which keeps the gate blocking while leaving nine characters for the translated unit. The new unit spec asserts this class of mistake directly, and I watched it go red at 10 before changing it. Nothing changes here until you rule on which side moves — the schema or the appendix.

140 keys, not the 135 the ticket's prose estimates. Appendix A is the contract ("Appendix A is the schema, key for key"), and several of its rows declare two keys (a11y.previous / a11y.next). The 140 is what the appendix lists.

A second scope note. SUBGROUP_PRESENTATION in the field builder is not in the ticket. It exists because the acceptance criterion asks for a collapsible labelled "Accessibility" while the builder derives "A11y" from the slug, and the ticket pins the slug (a11y is Appendix A's name for the sub-group, and sydevs/WeMeditateWeb#80's key paths are written against it). It also absorbs the initCollapsed: subSlug === 'a11y' rule that was already there, so one table now holds everything a sub-group slug decides about its presentation.

A third defect found on the way, filed rather than fixed: #753. The same generator wrote a nested tab's placeholder data to a top-level key Payload does not have, so it was discarded silently. That generator is now deleted, so #753's cause is gone with it — close it against this PR rather than fixing it separately.

Known follow-up, not addressed here. localesErrorOrNull in the new int spec is a fourth copy of the same helper (available-locales, client-canonical, events have the others). A shared fieldErrorOrNull(write, path) in tests/utils/testHelpers.ts would absorb all four; doing it here would have meant editing three specs this PR has no other business in.

Merge with main (2026-09-12)

9c83125 merges origin/main in and resolves the conflicts #750 created. Both branches rewrote a translations global, so the overlap is the one importer, the migration index, and the two specs that read both schemas. Every conflict kept both behaviours.

Conflict Resolution
src/migrations/index.ts All three migrations, in timestamp order: #750's atlas reshape, then this branch's drop and add.
seeds/translations/import.ts seedWmWeb beside seedAtlas. 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: no global is seeded from generated data, so the break it repaired cannot recur here. That is the one behaviour the merge removed, and it is deliberate.

The conflict hid a second, quieter problem. Both migration snapshots on this branch were generated before #750 merged, so after the merge the newest-by-timestamp snapshot still described the pre-#750 atlas columns — the out-of-order snapshot trap in src/migrations/AGENTS.md. The next migrate:create would have re-emitted #750's atlas DDL, and replaying it aborts the boot migration on deploy (#566). Both snapshots now carry #750's atlas tables, and pnpm db:migrations:create --skip-empty against the merged config emits nothing — which is the check that proves it.

Review round (2026-09-09)

Two findings adopted, one commit each, both watched red at the site that would cause them.

  • 9b39b00 — article.general.tag_* restated PAGE_TAGS (src/lib/pageTags/index.ts) with nothing joining them, so a sixth tag would have given pages a filter facet with no translatable label and no failure anywhere. The seed spec now asserts the two sets are equal.
  • fb185d3 — groupLabel served both the sub-group collapsibles and the top-level tabs, so SUBGROUP_PRESENTATION decided a tab's label too, while its name and src/globals/AGENTS.md both said sub-group. Split into slugLabel (every tab) and subGroupLabel (the table, else slugLabel). No real schema declares a tab named a11y, so the emitted config is unchanged today — the spec states the rule instead.
Detail

The seed publishes, and only for We Meditate

wm-app-translations keeps its plain update. One _status covers every locale there, so publishing would claim 19 translated languages from an English-only file. wm-web-translations has per-locale _status (#705), so publishing English leaves every other locale a draft. sy-atlas-translations publishes each of its ten locales on its own (#750).

My first three commits gave the wrong reason for the publish, and the review pass caught it. They said it is what lets availableLocales offer en. It is not: availableLocalesField.ts exempts English from that gate by design, because gating the one locale nobody can deselect would deadlock the save. A probe against a real database settled the other half — a global read returns the same document whether draft is true, false, or unset.

So the publish sets state and nothing else. That is precisely why the spec has to read _status directly: a publish that silently did nothing would leave every downstream behaviour looking correct and show up only as wrong state in the admin. The reasoning is in the importer, seeds/AGENTS.md, and the spec header.

The pre-existing break, and why it is no longer reachable

generateExampleData wrote one property per declared key. A plural: true key is stored as its CLDR family, and #705 gave every leaf column a JSON Schema naming those expanded keys and nothing else. So the atlas write was rejected — "The following field is invalid: Emails > Emails" — and writeGlobal rethrows, taking the whole command down after the app and web globals had already been written. sy-atlas-translations.emails.sessions_count was the only such key, which is why nothing caught it: the failure was in the one global still using generated data, and the generator had no test.

This branch fixed that generator. The merge deletes it instead, because #750 gave the atlas global real copy. Both are the same repair by different means, and the second one is permanent.

Every new assertion was watched failing

Per tests/AGENTS.md, a new assertion is not finished until it has failed. Sixteen defects were reintroduced at the site that would cause each one, and each turned exactly the intended case red:

  • Seed spec (7): a dropped key, a dropped plural form, an extra nested key, an extra flat key, a blank value, an unexplained %{placeholder}, an over-strict value.
  • Field builder and schema (5): a11y unable to be renamed, a11y starting open, plural keys stored unexpanded, a strict limit dropped from the emitted schema, a sub-group deleted from the schema.
  • Seed integration spec (4): the seed no longer publishing, the publish leaking to every locale, the app global published too, plural keys unexpanded in the generator.

The review round added two more: a sixth PAGE_TAGS entry, and the tab site reading SUBGROUP_PRESENTATION again. The last of the four integration mutations concerned the generator and went out with it; the other seventeen survive the merge and were re-run green.

One mutation came back green and is worth recording rather than hiding: leaving the _meta header in the updateGlobal payload changes nothing, because Payload ignores an unknown top-level key on a global. The refusal that does bite is inside a leaf group. The importer's comment says so, instead of implying the strip is protective.

The migration chain, checked against a real database

The integration lane uses drizzle push, so it never runs the migration files. Both up functions were applied in order to a Postgres schema rebuilt to match main's snapshot (with a placeholder row in it), then both down functions in reverse:

  • baseline: 1 row, 9 columns
  • after drop: common, errors, page_tags gone; _status, footer, navigation kept
  • after add: 26 columns, row intact
  • after both downs: exactly the original column set

Fixture pre-mortem

The seed file assumes the key paths the field builder produces. Rather than re-derive them, the unit spec walks the schema with collectLeafLookups (src/lib/translations/schemaWalker.ts) — the same walker clientEnglishFallback uses to decide which keys to fill from English. English strings were spot-checked against the real WeMeditateWeb source: components/atoms/Spinner/Spinner.tsx:60, components/molecules/MasonryGrid/MasonryGrid.tsx:86,88, pages/+config.ts:22-23, server/error-utils.ts:113-119, components/molecules/ErrorFallback/ErrorFallback.tsx:49-52, pages/map/_components/AtlasContent.tsx:127,132.

English plural forms

The seed populates _one and _other only. few and many exist in the storage family for Russian, Ukrainian and Czech, and pluralize() falls back to other where a locale does not use them — so seeding them in English would invent a form the language has no rule for. The unit spec states that explicitly rather than expanding via PLURAL_CATEGORIES and quietly demanding four.

🤖 Generated with Claude Code

https://claude.ai/code/session_01T8bW17CGRLHDEzMz9pTk4m

Replaces the 16 placeholder keys drafted in #528 — none of which the site
ever read — with the 140 UI strings WeMeditateWeb actually renders, laid
out as 12 tabs in reading order rather than by data type.

Every tab carrying screen-reader-only copy declares explicit `general` +
`a11y` sub-groups, which #705 renders as collapsibles with `a11y` closed.
`navigation` and `footer` stay flat. Every key carries a translator-facing
description naming its placeholders; `%{count}` is reserved for the number
that selects a plural form.

The English seed is the copy extracted from the site's own source, one
value per Appendix A row, shaped like the global's API response so it is
the `updateGlobal` payload verbatim.

One deviation from the ticket, deliberate: `media.duration_minutes` and
`duration_seconds` take `maxLength` 18, not 10. The limit measures the
RAW stored string, and English is already `%{count} min` — 12 characters.
At 10 the ticket's own acceptance criteria contradict each other, since
seeding Appendix A's English would be refused by the strict gate it also
asks for. 18 keeps the gate blocking while leaving nine characters for
the translated unit.

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

`seedFromSchema` invented values from key names, which is fine for a
placeholder schema and useless for a real one. wm-web now reads
`seeds/wm-web-translations/data.en.json` the way wm-app already reads its
own file, `inlineData` entry included so a remote seed can upload it.

It also PUBLISHES the English locale. `wm-web-config.availableLocales`
refuses a locale whose translations are unpublished (#705), so without
this step nobody could offer English at all. Publishing is per-locale, so
every other locale stays a draft.

`wm-app-translations` deliberately keeps the plain update: one `_status`
covers all its locales there, so publishing would claim 19 translated
languages the file does not contain. `sy-atlas-translations` keeps the
generated example data until #706 replaces it — that PR deletes
`generateExampleData` as its last caller.

Types regenerated: 22 named `WmWebTranslations…Strings` interfaces, one
per leaf group, with each key's description as JSDoc.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MCdVPp5bCT3neC7hWcDbNZ
Two migrations, not one, and the split is mechanical rather than stylistic:
a drop and an add of jsonb columns in the same diff reads to drizzle-kit as
a rename, and its rename-vs-create prompt hangs forever on non-TTY stdin
(src/migrations/AGENTS.md). Generated by reducing the schema to the two
surviving tabs, generating the drops, restoring it, then generating the
adds — so each file is pure, and neither run saw a prompt.

`drop_wm_web_placeholder_tabs` drops `common`, `errors`, `page_tags` and
their `version_` twins. `wm_web_translations_tabs` adds the 20 new
`<tab>_<sub-group>` columns and their twins. `navigation` and `footer` keep
their names, so nothing touches them.

Every dropped column held only seed placeholders — no locale of this global
carries live copy (#705 established that) — so the drops lose nothing.

Both validated with the migration-validator skill: reversible, compiling,
no unrelated DDL. The DROP COLUMN warning is the point of the first file.

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

`toWords('a11y')` renders "A11y" — a shorthand the translator is left to
decode, on ten of the twelve new tabs. A group may now carry a `title`,
which the tab and collapsible labels prefer over the slug. It is
presentational only: the field name, data path and column all still come
from the slug, so naming a group migrates nothing. The wm-web schema uses
it once, for "Accessibility".

Test changes track the rewrite: the twelve tabs in reading order, and the
leaf groups as `<tab>.<sub-group>` PAIRS rather than bare names — `general`
and `a11y` now repeat across ten tabs, so a bare name identifies nothing
and a dropped sub-group would have gone unnoticed.

New: plural keys expand for storage and stay collapsed for the admin. The
two sides read a plural key differently, so a builder that expanded in both
places, or in neither, would still look plausible from one side. Also that
a `strict` limit survives the expansion onto every stored form, and that an
advisory one stays out of the emitted schema where it cannot block a save.

The new unit spec pins the English seed to the schema: every declared key
covered, no undeclared key present, no blank value, every `%{placeholder}`
named in its own description, and every `strict` value inside its limit.

Each new assertion was watched failing against the defect it exists to
catch, at the site that would cause it — five in the field builder and the
schema, seven in the seed.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MCdVPp5bCT3neC7hWcDbNZ
`pnpm seed translations` has failed outright since #705 merged. The
generator writes one property per DECLARED key, but a `plural: true` key is
stored as its CLDR family, and #705 gave every leaf column a JSON Schema
naming those expanded keys and nothing else. So the atlas write was
rejected — "The following field is invalid: Emails > Emails" — and
`writeGlobal` rethrows, taking the whole command down after the app and web
globals had already been written.

`sy-atlas-translations.emails.sessions_count` is the only such key today,
which is why nothing caught it: the failure is in the one global that still
uses generated data, and the generator has no test.

Found while writing the seed integration spec in this PR, which runs the
real importer and so fails on this before it can assert anything.
#706 deletes this generator when it gives the atlas real copy — until then
the command has to work.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MCdVPp5bCT3neC7hWcDbNZ
The unit spec proves the seed FILE agrees with the schema. It cannot prove
Payload accepts it: the shape only satisfies the per-column JSON Schema if
the importer hands it over untransformed, and the publish only lands if
`localizeStatus` treats `_status` as a per-locale column. Both are database
facts, and the first defect this spec found was in neither the file nor the
schema but in a sibling global's generator.

It asserts the publish itself, not only its effect. English is exempt from
the `availableLocales` publish gate, so a publish that silently did nothing
would still let `['en']` through — and would surface only when someone
tried to add a second language, long after the deploy.

`fallbackLocale: false` on the French read is load-bearing: without it
French resolves `_status` through the English fallback and reports itself
published.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MCdVPp5bCT3neC7hWcDbNZ
…s, and the publish

Three things a future contributor cannot infer from the code:

- The twelve Web tabs are in the site's reading order, not grouped by data
  type, and every tab carrying screen-reader copy splits into `general` +
  `a11y`. So does the pair of conventions the schema depends on — the
  "Not shown on screen" description prefix, and `%{count}` being reserved
  for the number that selects the plural form.
- A group may name itself with `title`, and why the default is wrong for
  `a11y` in particular.
- `pnpm seed translations` publishes the WEB global and must never publish
  the app one, plus the reason each way round.

Also corrects an overclaim in the importer's own comment: Payload ignores
an unknown TOP-LEVEL key on a global, so stripping `_meta` is for the
reader, not the database. A mutation run proved it — leaving `_meta` in the
write changed nothing. The refusal that does bite is inside a leaf group.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MCdVPp5bCT3neC7hWcDbNZ
Three review lenses ran over the branch. The substantive findings:

**The publish rationale was wrong, in four places.** Every comment said the
English publish is what lets `wm-web-config.availableLocales` offer `en`.
It is not: `availableLocalesField.ts` exempts English from that gate by
design, because gating the one locale nobody can deselect would deadlock the
save. A probe against a real database settled the other half — a global read
returns the same document whether `draft` is true, false, or unset. So the
publish sets state and nothing else, which is exactly why the spec has to
assert `_status` directly rather than infer it from an effect. Corrected in
the importer, `seeds/AGENTS.md`, and the spec's own header.

**`title` on `GroupSchema` was one level too shallow.** It introduced a
general schema extension to carry one value repeated ten times, while three
lines from its call site the builder already special-cased the same slug a
different way (`initCollapsed: subSlug === 'a11y'`). Two mechanisms for one
group, and ten duplicated literals with nothing pinning them equal. Replaced
by `SUBGROUP_PRESENTATION`, one table where a slug's label and collapse rule
sit together. The schema JSON goes back to declaring no presentation at all.

Simplification, no behaviour change: the seed spec's four copies of the
plural expansion collapse into `DeclaredKey`, which resolves each key once
into the paths English must fill and the paths the schema permits — making
the English-vs-full-family distinction visible in one place instead of four.
Three same-shaped tests become filters over it, and the per-key `it.each`
becomes one collected assertion that names every missing path at once rather
than the first of 140. In the config spec, two walkers over the same tab
structure become one, and a hand-maintained `toBe(20)` is derived.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MCdVPp5bCT3neC7hWcDbNZ
`title` on a group schema is gone — `SUBGROUP_PRESENTATION` carries the
label and the collapse rule together instead.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MCdVPp5bCT3neC7hWcDbNZ
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-755 September 9, 2026 16:55 Destroyed
@railway-app

railway-app Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

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

Service Status Web Updated
SahajCloud ✅ Success (View Logs) Web Sep 12, 2026 at 4:53 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 9, 2026
@sydevs-bot

sydevs-bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running
CI fix 1

recent dispatches
  • 16:37Z resolve-conflicts · attempt 1 · session · done
  • 16:37Z resolve-conflicts · attempt 1 · session
  • 16:23Z address-review · attempt 1 · session · done
  • 16:23Z address-review · attempt 1 · session
  • 17:25Z address-review · attempt 1 · session · done

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

`translations-field.int.spec.ts` still asserted `toWords('a11y')`'s "A11y"
for the accessibility collapsible. This PR's `SUBGROUP_PRESENTATION` renames
it to "Accessibility", which the ticket's acceptance criterion asks for, so
the pre-existing expectation went stale and CI went red on it.

The lean gate is Tier 2 (unit only), so the int lane first ran in CI — the
sibling assertion added here, `translations-globals.int.spec.ts:263`, covers
the new label and passed.

The assertion's real property is the collapse rule, and it is unchanged.
Confirmed still load-bearing: setting the table's label back to 'A11y' turns
this case red and nothing else.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012oRh6doD5BV4ebFpqDW8ra
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-755 September 9, 2026 17:07 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 Sep 9, 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

Scope matches the ticket. All 140 keys agree with Appendix A key for key — order, plurals, limits, English. The hand-written surface is small; the 59k lines are generated. Both migrations are pure drop then pure add, reversible column for column. Two things want your ratification.

Findings

  • should-fix — five tag_* keys restate PAGE_TAGS, nothing pins them (schema:218).
  • consider — SUBGROUP_PRESENTATION labels tabs too, though name and docs say sub-group (translationsField.ts:165).
  • consider — strict maxLength 18 against Appendix A's 10 (schema:510).

What was checked

  • All 140 leaf paths of the schema and data.en.json against Appendix A: no extras, no gaps.
  • translationsField.ts whole — stringsJsonSchema puts maxLength on each plural form, so the gate bites.
  • Both migrations: 6 drops, 40 adds; navigation, footer untouched.
  • WeMeditateWeb names this global in two TODOs only, and no removed interface.
  • PAGE_TAGS (src/lib/pageTags/index.ts:9) and importers; both new specs.

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


Generated by Claude Code

Comment thread src/fields/translationsField.ts Resolved
"duration_minutes": {
"type": "string",
"plural": true,
"maxLength": 18,

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.

18 here, 10 in Appendix A. The PR body's reasoning holds — the limit measures the raw string, and %{count} min is 12, so 10 would refuse the English the ticket specifies.

Flagging it inline because it changes a number you wrote. 18 leaves nine characters for a translated unit: confirm that is the budget you want, or correct the appendix.

🤖 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.

Left at 18 — the one thread with nothing to change until you rule.

18 is %{count} min (12) plus six for a longer unit. 10 refuses the English Appendix A itself specifies, so the ticket cannot pass its own criterion. Say which side moves and I will change the schema or the appendix.

🤖 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
`article.general.tag_*` names one filter chip per `PAGE_TAGS` entry, which
`Pages` and `ContentIndexBlock` both read. Nothing joined the two lists, so a
sixth tag would give pages a facet with no translatable label and no failure
anywhere — here or in WeMeditateWeb. Pinned in the spec that already loads the
schema. Watched red with a sixth entry added to `PAGE_TAGS`.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015Q7E9s5cCBUvcaNn8GGZEE
`groupLabel` served both the sub-group collapsibles and the top-level tabs, so
the table decided a tab's label too — while its name, its comment, and
`src/globals/AGENTS.md` all said sub-group. Split into `slugLabel` (every tab)
and `subGroupLabel` (the table, else `slugLabel`), so the name and the
behaviour agree.

No real schema declares a tab named `a11y`, so the emitted config is unchanged
today. The spec states the rule directly instead, and was watched red with the
tab site reading the table again.

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

Copy link
Copy Markdown
Contributor Author

Two of three review threads adopted and pushed. One waits on you.

Both new assertions were watched red at the defect site. Lean gate green, plus translations-field (22) and translations-globals (22).

🤖 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

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
@Ardnived

Copy link
Copy Markdown
Contributor

@sydevs-bot Resolve the merge conflicts in this PR. They were created by merging #750 into main

@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed awaiting labels 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
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-755 September 12, 2026 16:34 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Merge conflicts resolved. main (4dfd629, carrying #750) is now a parent of the head, 9c83125.

Four files conflicted. Both sides survive in each: the seed importer (wm-web's English copy beside the atlas's ten locales), src/migrations/index.ts (three migrations in timestamp order), the translations int spec, and seeds/AGENTS.md. generateExampleData is deleted — #750 and this PR each replaced one of its two callers.

Two sessions were dispatched for your one comment. Both produced the same resolution; the one that pushed won. This run verified that result instead of re-pushing: lean gate green (1778 unit tests), and translations-globals, wm-web-translations-seed and #750's atlas-translations-import specs green.

GitHub still lists the PR as conflicting. That field lags the push.

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


Generated by Claude Code

@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Conflicts resolved and pushed — 9c83125. The PR is mergeable again.

#750 and this branch each rewrote a translations global, so the four conflicts were the shared importer, the migration index, and two specs. Each kept both behaviours: the atlas seeds ten published locales, wm-web seeds real English and publishes it.

generateExampleData is deleted rather than merged — each side replaced one of its two callers with real copy. That removes #753's cause too, so it can close against this PR. Your call.

One thing the conflict hid. Both migration snapshots here predate #750, so the newest snapshot still described the old atlas columns. The next migrate:create would have re-emitted #750's DDL and crash-looped the boot migration (#566). Both now carry #750's tables, and --skip-empty emits nothing.

Lean gate green (1778 unit tests), the three translations integration specs green, generate:types leaves payload-types.ts unchanged.

The maxLength 18-vs-10 thread is still yours to rule on.

🤖 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 12, 2026
`main` moved again with #747 — `wm-app-translations` gains per-locale
`_status` and `wm-app-config` gains `availableLocales`. Both sides'
behaviour is kept.

- `src/globals/AGENTS.md`: kept this branch's #707 Web-tabs section and its
  two key conventions, and took `main`'s framing sentence. All three
  translations globals now carry per-locale status, so "three things
  distinguish the two web globals from wm-app" is no longer true.
- `tests/COVERAGE.md`: took `main`'s two rewritten rows and kept this
  branch's two wm-web rows, which `main` has no counterpart for.
- `src/migrations/index.ts`, `src/payload-types.ts` and the four `main`-only
  specs merged cleanly, in timestamp order.

**Both snapshots repaired a second time.** #747's migration is
`20260909_161243`, older by timestamp than this branch's `161848` and
`162104`, so after the merge the newest-by-timestamp snapshot still described
the pre-#747 `wm_app` schema — the out-of-order snapshot trap in
`src/migrations/AGENTS.md`. Verified before the repair: `db:migrations:create
--skip-empty` re-emitted #747's DDL byte for byte, and replaying it aborts
the boot migration on deploy (#566). Both snapshots now carry #747's
`wm_app` schema, and the same command emits nothing.

**Two comments the merge falsified, corrected without changing behaviour.**
`seeds/translations/import.ts` and `tests/int/wm-web-translations-seed.int.spec.ts`
both said `wm-app-translations` holds one `_status` for every locale. It has
per-locale status since #709. The seed still leaves it unpublished — an
operator republishes each locale after the deploy — and the assertion, read
at `locale: 'en'`, still holds.

Gate: lint, both typechecks, 1778 unit tests, and the three integration
specs covering the conflicted files (49 tests) all pass.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0146WwB8svzTLxZMfRraYati
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-755 September 12, 2026 16:50 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Merged main again — #747 landed after the last merge. 48bd40f.

Both migration snapshots were repaired a second time. #747's migration is 20260909_161243, older by timestamp than this branch's 161848 and 162104, so the newest-by-timestamp snapshot again described a stale schema. Before the repair, db:migrations:create --skip-empty re-emitted #747's DDL byte for byte — the #566 boot crash-loop. After it, the command emits nothing.

Two comments the merge falsified. seeds/translations/import.ts and wm-web-translations-seed.int.spec.ts said wm-app-translations holds one _status for all locales. #709 made it per-locale. Behaviour is unchanged: the seed still leaves it unpublished, and the locale: 'en' assertion still holds.

Only src/globals/AGENTS.md and tests/COVERAGE.md conflicted. Both are docs, and both keep each side's rows.

Gate: lint, both typechecks, 1778 unit tests, plus translations-globals, wm-web-translations-seed and available-locales (49 tests) — all pass.

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


Generated by Claude Code

@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 0dc0e76 into main Sep 12, 2026
9 of 10 checks passed
@Ardnived
Ardnived deleted the claude/feat-707-wm-web-translations branch September 12, 2026 16:54
@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
Resolves #755's WeMeditate Web schema rewrite against this branch's atlas
`seo` group. Three conflicts, all kept from both sides:

- `src/migrations/index.ts` — both branches added imports. #755's two
  entries are ordered before this branch's, matching the array the merge
  already produced and the migrations' timestamps.
- `src/globals/AGENTS.md` — #755 documented the Web tabs' reading order and
  the `a11y` conventions; this branch documented `Seo`/`Emails` as the two
  server-read exceptions to the one-tab-per-widget-view rule. Both paragraphs
  stand, Atlas first.
- `tests/int/translations-globals.int.spec.ts` — took #755's docblock, which
  restates the leaf/nested split for all three globals, and added `Seo` back
  to the sy-atlas leaf-tab list.

Refreshes `20260912_031449_atlas_translations_seo_group.json`. That snapshot
is the newest by timestamp, so `migrate:create` diffs the next migration
against it — and it predated #755, so it still carried the old `wm_web`
columns. Regenerated post-merge; the `.ts` DDL comes out byte-identical, so
the file and its timestamp are unchanged and the preview's applied migration
row still matches (src/migrations/AGENTS.md, the out-of-order snapshot trap).

`pnpm generate:types` reproduces the merged `src/payload-types.ts` exactly.

Gate: lint, `tsc` over src and tests, 1812 unit tests. Targeted specs:
translations-globals, translations-field, wm-web-translations-seed (52) and
atlas-seo (53).

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

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-755 — 48bd40f0 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

3 participants