Skip to content

fix(translations): localize five per-language fields admins edit - #1002

Merged
sydevs-bot merged 11 commits into
mainfrom
claude/fix-981-localize-admin-edited-fields
Oct 21, 2026
Merged

sydevs-bot merged 11 commits into
mainfrom
claude/fix-981-localize-admin-edited-fields

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Five admin-edited fields now store a value per language, so a French edit no longer replaces the English for all 19 locales.
  • Two migrations move them into their _locales tables, copying each existing value into en first.

Change outline

Contract — the five fields

Each becomes per-locale. The three app-card view tabs share one declaration, so destinationFields() covers all three.

 videos.subtitles                                      src/collections/Videos/Videos.ts
+  localized: true                                     # jsonField passes extra props through

 app-cards.{default,startingSoon,liveNow}.meditation   src/collections/AppCards/AppCards.ts
+  localized: true                                     # one edit in destinationFields(), used at :292 and :435

 forms.title                                           src/collections/Forms/fields.ts
 forms.redirect.url
 forms.fields[select].placeholder
+  localized: true                                     # mapped onto the plugin's defaultFields
+  required: false                                     # title and redirect.url ship required — see below

Flow — how the three form-builder defaults get localized

The plugin ships them unlocalized, and its fields: { select: … } option merges arrays by source — so reaching placeholder through it means re-supplying the block's whole field list, label thunks included. The field list is mapped on the way through instead.

 formFields({ defaultFields })                 src/collections/Forms/fields.ts
   strip `emails`
+  map localizePerLanguage over each remaining field
+    title (text)                              → perLanguage
+    redirect (group)  → localizeNamedText(fields, 'url')
+    fields (blocks)   → select block → localizeNamedText(block.fields, 'placeholder')
+                                              # placeholder sits inside a `row`, hence the descent
+  perLanguage = { localized: true, required: false }
   append actionType, recipient, client

Copies rather than mutates: generateFormCollection puts the plugin's own module-level block objects straight into blocks, and the production config and the test harness both build from them.

required comes off with the flag. title and redirect.url are required: true upstream, and Payload validates a required localized field against that locale's own value — the English fallback does not satisfy it. Left on, the flag refuses every save in any second locale unless the editor retypes both, which is what the German-labels case in atlas-report-issue-form hit. #977 settled the same question for lessons.title, and src/collections/AGENTS.md records it as the rule.

Contract — migration tables

Generated, then hand-edited so each value is carried across before the base column goes.

videos.subtitles                     → videos_locales.subtitles                        (en)
app_cards.*_meditation_id            → app_cards_locales.*_meditation_id               (en)
_app_cards_v.version_*_meditation_id → _app_cards_v_locales.version_*_meditation_id    (en)
forms_blocks_select.placeholder      → forms_blocks_select_locales.placeholder         (en)
forms.title, forms.redirect_url      → forms_locales.title, forms_locales.redirect_url (en)

One rule for all five — insert the en row, or update it where it exists. Two things the generated delta got wrong, both fixed:

-ALTER TABLE forms_locales ADD COLUMN title varchar NOT NULL;   # aborts on a populated table
+ADD COLUMN title varchar;  … backfill …  ALTER COLUMN title SET NOT NULL;
+                           # every OTHER existing locale row needs a title too, or the
+                           # constraint fails on a form carrying only a French submit label
-add locale column; drop base column                            # loses every value
+add locale column; copy into the `en` row; THEN drop base column

Two locale tables carry a NOT NULL sibling, so a row inserted for a parent that had none must satisfy it: forms_locales.title from forms.title, and videos_locales.title from whichever locale row the video does have. That second one is the only value this migration writes that the old schema did not hold — see Notes.

An inserted row states its publish state rather than taking the table's. app_cards_locales._status and _app_cards_v_locales.version__status default to 'draft', and both are the localized publish state since #718 — so a card with no en row would gain one marked draft where it had no English state at all, and down() deletes no rows. Both are inserted as an explicit NULL, cast to their own enum, and left out of ON CONFLICT DO UPDATE so an existing row keeps what it had.

Preview

A Railway PR environment forks configuration and variables, never volume data, so every content table is empty. Each link opens the collection's list; create a row and switch the admin locale to see the change. Local dev auto-signs-in, and a preview signs you in as PREVIEW_ADMIN_EMAIL.

  • Videos — add subtitles, switch locale, confirm the cues are per-language
  • App Cards — a card whose destination is a meditation; the picker lists only the admin locale's meditations
  • Forms — title, the redirect URL, and a select field's placeholder

Data: not seeded. previewUrl.seed is unset for this repo, so there is no seeding command to run against the host.

Migration

Two files, deliberately not one:

  • src/migrations/20261020_170450_localize_admin_edited_fields.ts — moves the five fields. videos, app_cards, _app_cards_v, forms and forms_blocks_select lose the five base columns; their _locales tables gain them. Every existing value is copied into the en row first. forms_locales.title ends NOT NULL, as forms.title was.
  • src/migrations/20261020_185917_forms_title_optional_per_locale.ts — drops that NOT NULL again, because forms.title stops being required. Stacked rather than folded in: the first migration has already deployed to this PR's preview, and reshaping a migration that has run leaves the columns in place with no payload_migrations row naming the new one, which crash-loops the boot migration (feat(access): add embed metadata and canonical ownership to Clients #633, src/migrations/AGENTS.md).
  • Reversible: yes, both. The first copies each en value back onto its base column before dropping the locale columns, and restores forms.title's NOT NULL after backfilling it, preferring the en row and falling back to the lowest-id locale row. The second fills any NULL title with '' before restoring the constraint, as 20261017_093546's own rollback does — there is no other source on that table.

Test results

  • Lean gate: ✓ pnpm lint, pnpm typecheck, pnpm typecheck:tests, pnpm test:unit (2642 passed)
  • Targeted specs: 95 passed — tests/int/videos.int.spec.ts, tests/int/app-cards-for-audience.int.spec.ts, tests/int/forms-action-type.int.spec.ts, tests/int/atlas-report-issue-form.int.spec.ts
  • Build: N/A — Railway builds the preview
  • Migration round trip: verified twice against PostgreSQL 16, see Manual verification
  • Chain healed: pnpm db:migrations:create chain_probe --skip-empty writes no files on the merged tree

Manual verification

The migration was round-tripped locally against PostgreSQL 16, on a database carrying the real pre-migration chain and rows shaped to hit every arm: a video with cues and an en row (conflict update), a video with cues and only a French row (insert, with a borrowed title), a video with no cues that must gain no row, an app card with no en row (insert), a version row that had one (conflict update), a form with a titleless French row (the SET NOT NULL edge), and a form with no locale rows at all. After up every value read the same at en and the base columns were gone; after down every value was back on its base column with forms.title NOT NULL again, and the non-English rows survived both ways.

⚠ That round trip predates the second migration and the explicit-NULL publish state, so it is evidence about the first migration as it was issued. Neither change touches the paths it exercised — one column list gained a literal, and the second migration is two statements on an empty constraint — but the run itself has not been repeated.

What that cannot cover, and a reviewer should:

  1. Run it against a restored production copy. The ticket records production as: video 1 with captions, cards 39/41/46–56 with a meditation, 3 forms each with an en row, no select blocks, and redirect_url empty on all 3. Compare every en value before and after.
  2. Edit each field in the admin at a non-English locale and confirm English is unchanged. The admin is the surface the bug was reported on, and no spec drives it.
  3. A form's title is now optional, in every locale including English. That is the cost of localizing a previously-required field, and the same trade lessons.title took in fix(lessons): translating a Path Step overwrites its English text #977. Confirm an untitled form reads acceptably in the admin list, which uses title as its label.

Notes for reviewer

  • The one value this migration invents, and why. videos_locales.title is NOT NULL and videos.title is itself localized, so there is no unlocalized English to read. A video whose only locale row is, say, French therefore lands that French title in the new en row, where English rendered blank before. The alternative is losing the cues: the base column they came from was read by every locale, so leaving them behind drops them outright. An earlier revision raised an exception instead — the branch review rejected that, correctly: prodMigrations applies migrations in-process on boot, so it was a Railway boot crash-loop armed by a data condition nobody can evaluate before deploying, which is the opposite of what src/migrations/AGENTS.md asks for. Production has no such row.
  • origin/main was merged in, and it moved the snapshot chain. The merge is clean (a77ca5c), but it brought fix(lessons): translating a Path Step overwrites its English text #977's two lesson migrations, whose timestamps sort below this branch's — so this branch's snapshot was both the newest and stale, which is the feat(regions): country slug = ISO alpha-2 code #566 duplicate-re-emission trap armed for whoever generates the next migration. The second migration's own .json, taken on the merged tree, is what makes the newest snapshot whole again. Its generated delta re-emitted four lessons statements that 20261017_093546 already ships; those are trimmed, and the file's docblock names them.
  • Filed on the way: fix(app-cards): localize the destination discriminator beside its targets #1001. The app-card destination select decides which target column the app reads, and it stays global while url and now meditation are per-locale. A French editor switching a card's destination flips the discriminator for every locale and writes the target into fr only, so English loses its destination. Pre-existing — url has been localized since it was written — but this PR is what makes the pair half-localized by intent. It needs six more enum columns and a product call on whether languages may point at different kinds of destination, so it is not folded in here.
  • src/payload-types.ts carries two lines, and only two. Localization changes the stored schema, not the generated types — but dropping required does: Form.title and Form.redirect.url become optional. ⚠ The file also gets rewritten with one unrelated verificationStage union collapsed onto a 110-character line, past the repo's 100 printWidth, by any payload CLI run or integration-spec boot in this environment. That hunk is reverted here, and it came back twice during this session.
  • Scope held to the ticket. pages.featuredVideo stays unlocalized as the ticket directs. page, lecture and album destinations were checked and are not the same case — those documents carry their own localized fields, whereas a meditation document is single-locale. Lessons' panels[].subtitles and introSubtitles are the same column type but sit beside unlocalized panels[].title/text, so that whole panel tree is a different change.
  • Dismissed from the review: three down() backfills were flagged for lacking the source-NULL guard their videos sibling has, which rewrites some rows to the NULL they already hold. Left as is — at this scale it is no-op row churn in a rollback path, and three added OR-chains cost more reading than the work they save. Also left: localizing placeholder upstream in @payloadcms/plugin-form-builder. It would not delete the walk, since dropping required from title and redirect.url stays this repo's to do; filing it upstream is a maintainer's call, and reachable from no loop session.
  • The website follow-up the ticket names is unaffected here: PageTemplate.tsx in WeMeditateWeb still labels the inline track "EN" whatever language the captions are in, and only matters once a non-English caption exists.
Detail

Why the form fields are mapped rather than configured. formBuilderPlugin builds its block set from fields[fieldKey], and for select: true it returns the plugin's module-level Select object unchanged — no merge happens. Passing fields: { select: {...} } instead takes the deepMergeWithSourceArrays path, which replaces target arrays with the source's, so supplying a fields array to reach placeholder is what would discard the block's field list. The plugin does export its block table, so the same walk could be written in src/plugins/formBuilder/index.ts against fields.select — that is the same hand-walk one module further from the spec that pins it, so it stayed in formFields.

Why placeholder needed a descent. In the plugin's Select definition the shared placeholder field is spread inside a row wrapper, while redirect.url sits directly in the group's fields. localizeNamedText handles both by walking through any field with no name of its own. placeholder is used by the select block alone, verified against the plugin's fields.js, so no other block is touched. A tabs field would not be walked; the comment says so, and the spec would catch it.

Test shape. Asserted functionally, never off the config: Payload strips localized from the sanitized config a booted instance exposes (tests/AGENTS.md), so reading the flag back would pass either way. Each case was watched failing with its defect reintroduced — the flag removed from videos.subtitles and from the app card's meditation, and localizePerLanguage bypassed for all three form fields. The forms cases are three its over one shared edit, so a field that stops being localized names itself rather than hiding behind the first failure.

What pins the required half. No new spec: tests/int/atlas-report-issue-form.int.spec.ts already saves German labels and carries neither value, so it is the guard. Putting required back fails it with ValidationError: The following fields are invalid: Title, Redirect > URL to redirect to — watched, then restored. The six lines of German data a CI fix added to get past that validation are reverted, which is what hands the assertion back to the spec.

Two fixture facts worth keeping. title is required and was already localized on both videos and app cards, so a French save owes one of its own whatever this change does — the first run of the videos spec failed on exactly that. And createMeditation takes locale as an override (its third argument), not a dependency, so the French meditation was initially created at the default locale; pnpm typecheck:tests caught it.

Also dropped in the review pass. A videos case asserting the English fallback was deleted: it pinned Payload's own localization fallback, which tests/AGENTS.md lists under what not to test, and its own comment conceded it stayed green with the defect reintroduced. Three copies of one rule already stated in that guide were cut to a line each. The three up() backfill blocks became one, matching the cited precedent, and a dead "title" = EXCLUDED."title" clause came out of the forms ON CONFLICT — the round trip proves the IS NULL fill two lines down already owns it.

Anomaly, recorded not explained. pnpm payload migrate twice exited 0 having done nothing, with an empty log, when its output was piped; redirecting stdout to a file ran it correctly both times. src/migrations/AGENTS.md already warns that piping loses this command's output. Every migration result above was taken from a redirected run and confirmed against the database. Separately, both migrate:create runs in this session logged a nodemailer CONNECT_TIMEOUT while verifying the SMTP transport at boot, then generated normally.

Closes #981

Five fields hold text or a target that differs per language and stored one
value for all 19 locales, so an admin editing one with the panel switched to
French replaced the English everyone else reads (#981). The app-card picker
invites it: in the French admin it lists only French meditations.

`videos.subtitles` and the three `app-cards` destination `meditation` fields
take `localized: true` directly — `jsonField` passes extra props through, and
one edit in `destinationFields` covers all three view tabs.

The three form-builder defaults cannot: the plugin's `fields: { select: … }`
option replaces a block's whole field list rather than merging into it, so
`formFields` maps `defaultFields` instead. It copies rather than mutating,
because `generateFormCollection` puts the plugin's own module-level block
objects straight into `blocks`, which the production config and the test
harness both build from.

Localization changes the stored schema, not the generated types, so
`src/payload-types.ts` is untouched.

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

Generated by `db:migrations:create`, then hand-edited to backfill — the
generated delta adds each locale column and drops the base column, so every
existing value is lost: video 1's captions, the meditation 15 app cards open,
and all 3 forms' titles. The precedent is
`20260911_235823_pages_app_cards_localize_status.ts`.

Each value is copied into the `en` row alone. Fallback is on, so every other
locale keeps reading what it reads today and an editor narrows it per locale
from there.

`forms.title` is required, so it needs a value in every locale row that
already exists or the `SET NOT NULL` aborts on a form carrying only a French
`submit_button_label`. Its English text is copied to those rows as the
starting value. The constraint is therefore added last, not by the generated
`ADD COLUMN … NOT NULL`, which cannot succeed against a populated table.

`videos_locales.title` is `NOT NULL`, so an `en` row cannot be inserted for a
video that has none, and the cues would be dropped silently. A guard raises
instead; the migration is one transaction, so the schema is left untouched.

Verified by round trip against PostgreSQL 16 on a database carrying the
pre-migration chain and rows shaped to hit both arms — an app card with no
`en` row (insert) and a version row with one (conflict update), plus a French
form row with no title. After `up` every value reads the same at `en` and the
base columns are gone; after `down` every value is back on the base column
with `forms.title` `NOT NULL` again, and the non-English rows survive both
ways. The guard was watched aborting on a video with cues and no `en` row,
naming the count and leaving the schema unchanged.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KDFbCbs1hbpbWxYi66cE5x
Asserted functionally, not off the config: Payload strips `localized` from the
sanitized config a booted instance exposes, so reading the flag back would
pass either way (`tests/AGENTS.md`).

Each case was watched failing with its defect reintroduced — the flag removed
from `videos.subtitles`, from the app card's `meditation`, and
`localizePerLanguage` bypassed for all three form fields. The forms cases are
three `it`s over one shared edit so a field that stops being localized names
itself instead of hiding behind the first failure.

Two fixture facts the type-checker caught or the run surfaced, both recorded
at their call sites: `title` is required and was already localized on videos
and app cards, so a French save owes one of its own whatever this change does;
and `createMeditation` takes `locale` as an override, not a dependency, so the
French meditation was being created at the default locale.

The videos fallback case is labelled as pinning fallback rather than
localization — an unlocalized column answers it the same way — because it is
what makes the migration's en-only backfill correct.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KDFbCbs1hbpbWxYi66cE5x
From the branch review.

**The videos guard is gone.** It raised when a video held cues with no `en`
locale row, to avoid dropping them. But `prodMigrations` applies migrations
in-process on boot, so that exception is a Railway boot crash-loop armed by a
data condition nobody can evaluate before deploying, with production SQL as
the only way out — the opposite of what `src/migrations/AGENTS.md` asks for.

The file already resolved the same obstacle the other way two statements
later: `forms_locales.title` is `NOT NULL` too, and `forms.title` supplies it.
`videos.title` is itself localized, so there is no unlocalized English to
read — the `en` row borrows the title from whichever locale row the video has.
That writes one value the old schema did not hold, which the docblock now
states, and it is the only way to satisfy "every existing value reads the same
at `en`" for such a row: the base column was read by every locale, so leaving
the cues behind loses them outright.

All five fields now follow one rule — insert the `en` row, or update it where
it exists.

Also from the review:

- The three `up()` backfill blocks and two `down()` blocks are one each. The
  ordering constraint is binary (after the ADD COLUMNs, before the DROPs), and
  the cited precedent uses a single block.
- `"title" = EXCLUDED."title"` dropped from the forms `ON CONFLICT`: every
  pre-existing row has a NULL title at that point, so the `IS NULL` fill two
  lines down already owns it. Proven by the round trip — form 501's `en` row
  keeps its own `submit_button_label` and takes its title from the fill.
- `down()`'s two `UPDATE "forms"` statements are one, preferring the `en` row
  and falling back to the lowest-id locale row. It now restores `redirect_url`
  for a form with no `en` row too, which the pair left NULL.
- The production row counts are out of the docblock. They are a moving target.

Re-verified end to end against PostgreSQL 16, on data covering every arm: a
video with cues and an `en` row, one with cues and only a French row (the case
that used to abort the deploy), one with no cues that must gain no row, a card
with no `en` row, a version row that had one, a form with a titleless French
row, and a form with no locale rows at all. Every value reads the same at `en`
after `up`, and is back on its base column after `down` with `forms.title`
`NOT NULL` again.

The test comments lose three copies of one rule already stated in
`tests/AGENTS.md`, and the fallback case is deleted — it pinned Payload's own
localization fallback, which that guide lists under what not to test, and its
own comment conceded it stayed green with the defect reintroduced. The two
meditations now share a narrator and thumbnail instead of uploading their own.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KDFbCbs1hbpbWxYi66cE5x
The Form Builder section said three things the wrapper does that the plugin
options cannot, then listed four. It is five now, and the new one is the
reason a reader would otherwise reach for `fields: { select: … }` and find it
replaces the block's whole field list.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KDFbCbs1hbpbWxYi66cE5x
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 20, 2026
@sydevs-bot

sydevs-bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running
CI fix 1

recent dispatches
  • 23:51Z resolve-conflicts · attempt 1 · session · done
  • 23:51Z resolve-conflicts · attempt 1 · session
  • 23:20Z resolve-conflicts · attempt 1 · session · done
  • 23:20Z resolve-conflicts · attempt 1 · session
  • 18:52Z address-review · attempt 1 · session · done

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

`atlas-report-issue-form` updates a form at `locale: 'de'` to give its
blocks German labels. Localizing `forms.title` and `forms.redirect.url`
made that save owe a German value for each, and the fixture's
`confirmationType: 'redirect'` is what keeps the URL required. The save
was refused with `Title, Redirect > URL to redirect to`, so the labels
case never reached its assertion.

The German data now carries both. Confirmed by reverting the fixture and
watching the same two field names come back.

Worth a reviewer's eye beyond this spec: the per-locale requirement the
PR body records for `title` applies to `redirect.url` on the same terms.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JtFpUCoAoQYgF7GoKuUjmS
@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 Oct 20, 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 #981 exactly: five fields, one migration, four specs, nothing smuggled in. Skipping pnpm generate:types is right — localized moves storage, not types, so no types:cms sync is owed. #1001 is rightly filed, not folded: the half-localized destination/meditation pair needs a product call.

The form-builder walk earns its place, but the real question is upstream: the plugin already localizes label and defaultValue in that same block. Two things the body under-reports — redirect.url is now required per locale, and the migration's INSERTs create locale rows its cited precedent never would.

Findings

  • should-fix — the migration invents locale rows carrying _status: 'draft', and only one invented value is disclosed. src/migrations/20261020_170450_localize_admin_edited_fields.ts:90
  • should-fix — redirect.url is required per locale too, and #977 decided this question the other way. tests/int/atlas-report-issue-form.int.spec.ts:298
  • consider — localize placeholder upstream and delete the walk. src/collections/Forms/fields.ts:70

What was checked

Read whole: the four source files, the migration, its snapshot, the four specs, the profile. Against node_modules/@payloadcms/plugin-form-builder: title and redirect.url are text, required: true, and placeholder is used by the select block alone, inside a row, beside an already-localized label and defaultValue. From the snapshot: all five _locales tables carry the (_locale, _parent_id) unique index ON CONFLICT needs, and no inserted row meets a hidden NOT NULL sibling. appCardsForAudience reads at req.locale with fallback on, so app clients keep today's target. Backfill compared against the 20260911_235823 precedent.

All three ## Preview links 404 — the Railway environment was not up.

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


Generated by Claude Code

Comment thread src/collections/Forms/fields.ts Resolved
@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 Oct 20, 2026
The backfill's three `INSERT`s create locale rows where the cited
precedent only ever updated. `app_cards_locales._status` and
`_app_cards_v_locales.version__status` default to `'draft'`, and both are
the localized publish state since #718 — so a card with no `en` row
gained one marked draft where it had no English state at all, and `down()`
deletes no rows.

Both are now inserted as an explicit NULL, cast to their own enum so the
coercion is stated rather than inferred, and left out of `ON CONFLICT DO
UPDATE` so an existing row keeps the state it had. The docblock says what
an inserted row carries.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J2zahGY651q5iepAL49FJL
`title` and `redirect.url` ship `required: true`, and Payload validates a
required localized field against that locale's own value — the English
fallback does not satisfy it. So localizing them refused every save in any
other locale unless the editor retyped both, which is what the German-labels
case in `atlas-report-issue-form` hit. #977 settled the same question for
`lessons.title`, and `src/collections/AGENTS.md` records it as the rule.

`localizePerLanguage` now drops `required` as it localizes, through one
`perLanguage` helper shared with the `placeholder` descent. The spec's German
data goes back to carrying neither value, so it is the guard again —
reintroducing the flag fails it with `Title, Redirect > URL to redirect to`,
watched.

`forms_locales.title` therefore stops being `NOT NULL`, in a stacked
migration: `20261020_170450` has already deployed to this PR's preview, and
reshaping a migration that has run is #633's crash-loop. Its generated delta
also re-emitted four `lessons` statements that `20261017_093546` already
ships — trimmed, with the snapshot kept, which is also what makes the newest
snapshot whole again after merging `main`.

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

Copy link
Copy Markdown
Contributor Author

Three threads settled, and the base merged in first.

origin/main merged clean, a77ca5c. It brought #977's lesson migrations, so this branch's snapshot was newest and stale; the second migration's snapshot heals that. The lesson statements its delta re-emitted are trimmed as already shipped.

Gate green, plus 95 targeted int cases.

🤖 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 Oct 20, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review October 20, 2026 19:33
@sydevs-bot
sydevs-bot requested a review from Ardnived October 20, 2026 19:33
@sydevs-bot
sydevs-bot enabled auto-merge October 20, 2026 19:33
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed awaiting labels Oct 20, 2026
#1007 split the Form Builder section out of src/collections/AGENTS.md into
src/plugins/formBuilder/AGENTS.md, leaving a pointer; this branch had added
a bullet to that section in place. Both are kept: the pointer stands, and
the #981 bullet moves to the section's new home.

The bullet's reference to #977's `lessons.title` rule, and the same
breadcrumb in src/collections/Forms/fields.ts, now name
src/collections/Lessons/AGENTS.md — #1007 moved the reason there.

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

Copy link
Copy Markdown
Contributor Author

Merged origin/main in. One conflict, in src/collections/AGENTS.md.

Both sides wanted the same section changed. #1007 moved the Form Builder section out to src/plugins/formBuilder/AGENTS.md and left a pointer. This branch had added a bullet to it in place.

Kept both: main's pointer stands, and the #981 bullet moved to the section's new home.

One follow-on the diff does not explain. The bullet cited #977's lessons.title rule as "below", meaning the Lessons section of the same file. #1007 moved that reason to src/collections/Lessons/AGENTS.md, so the bullet and the matching breadcrumb in src/collections/Forms/fields.ts now name that file.

Lean gate green. forms-action-type and atlas-report-issue-form green, 33 tests.

🤖 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 Oct 20, 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 Oct 20, 2026
Both sides appended migrations, so the registry in src/migrations/index.ts
conflicted twice. Kept both sides, interleaved by timestamp, which is the
order migrate:create itself generates: main's five event-import migrations
sit around this branch's two.

That merge left the newest-by-timestamp snapshot stale again. 20261020_185917
was taken before main's `imports` tables existed, so it is newest and missing
them — the #566 out-of-order snapshot trap, armed for whoever generates the
next migration. 20261020_235623_merge_981_main_snapshot is the heal: its
`.json` was generated on the merged tree and carries both branches' schema,
and its DDL is empty because every statement migrate:create emitted is
byte-identical to what main's own snapshot already records as applied.

src/payload-types.ts auto-merged to main's file plus this branch's two lines,
Form.title and Form.redirect.url becoming optional. No product file overlaps.

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

Copy link
Copy Markdown
Contributor Author

Merged origin/main in again. Two conflicts, both in src/migrations/index.ts, where each side had appended its own migrations. Kept both, interleaved by timestamp — the order migrate:create itself generates — so main's five event-import migrations sit around this branch's two.

That re-armed the #566 snapshot trap. 20261020_185917 was still newest by timestamp but predates main's imports tables, so a fresh migrate:create re-emitted all of them. 20261020_235623_merge_981_main_snapshot is the heal, snapshot-only: its .json was generated on the merged tree and carries both branches' schema, and its DDL is empty because every statement emitted is byte-identical to what main's own snapshot records as already applied. chain_probe now writes no files. The body's note naming 20261020_185917 as the heal is superseded by this file.

src/payload-types.ts auto-merged to main's file plus this branch's two optional-field lines, and no product file overlaps between the sides.

Lean gate green.

🤖 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 Oct 21, 2026
@sydevs-bot
sydevs-bot added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
@sydevs-bot
sydevs-bot added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 5e302d7 Oct 21, 2026
21 checks passed
@sydevs-bot
sydevs-bot deleted the claude/fix-981-localize-admin-edited-fields branch October 21, 2026 02:34
@sydevs-bot sydevs-bot moved this from Revising to Done in SYDevelopers Technical Roadmap Oct 21, 2026
sydevs-bot added a commit to sydevs/SahajAtlasWeb that referenced this pull request Oct 21, 2026
sydevs-bot added a commit to sydevs/WeMeditateWeb that referenced this pull request Oct 21, 2026
sydevs-bot pushed a commit that referenced this pull request Oct 21, 2026
#1002 localized `meditation` on the same three view tabs, against the same
snapshot parent, so every hunk keeps both sides:

- `destinationFields()` carries `localized: true` on `destination` and on
  `meditation`. The comment calling every relationship target shared was
  true only before #1002, so it now names the three that still are.
- `src/migrations/index.ts`: both branches' migrations, in timestamp order.
- `app-cards-for-audience.int.spec.ts`: one `per-language destination`
  describe holding main's meditation case and this branch's two. 35 pass.
- `20261021_024228_merge_1002_main_snapshot` is new, and snapshot-only.
  `20261021_014535` left the newest snapshot without the columns #1002
  moved, so `migrate:create` re-emitted all of them — the out-of-order
  snapshot trap `src/migrations/AGENTS.md` names. A probe now writes no
  files.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017SW78tqnG85nKPBWAYgUTg
sydevs-bot pushed a commit that referenced this pull request Oct 21, 2026
Three docs conflicted on the same axis: main re-measured the unit lane
after #1005 added a spec, while this branch had reformatted the tables
prettier now owns. Took main's figures — 218 files / 2795 tests, and the
two session rows it added to tests/PERF.md — and re-ran the formatter
over them, so neither side loses. AGENTS.md keeps this branch's
`pnpm format:check` line beside main's repinned count.

main's src/collections/Forms/fields.ts (#1002) arrived unformatted and
would have failed the gate this branch adds, so prettier ran over it too.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SRTQ21Ydtb9NUo22SCXqMm
sydevs-bot pushed a commit that referenced this pull request Oct 21, 2026
…-locale-fallback

Both conflicts are this branch's code against #998's prettier 3.9.10 reformat,
so each hunk keeps this branch's behaviour and prettier reapplies main's shape.

- `lessons.ts`: `unitGroupSpecs` kept `labels` in the `evaluate` destructure;
  main had only collapsed the `.map()` callback onto one line.
- `shared.ts`: main reformatted a type annotation inside `getWmAppConfig`'s
  hand-rolled request cache, which this branch replaced with `memoizeOnRequest`.

#1002 localized `app-cards` destination `meditation`, which no check in the
`appCards` section reads, so the per-locale table in the PR body still holds.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AvMHhCzKemzTFd4e7TjxJS
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.

fix(translations): localize five per-language fields admins edit

3 participants