Repository navigation
fix(lessons): translating a Path Step no longer overwrites its English text - #978
Conversation
A Path Step's title and its intro panels were stored once for every language, so a translator who switched the editor to French and typed there replaced the English text every app user sees. Two steps on production hold French in their English slots because of it (#977). `title` and the whole `panels` array are now `localized`. Localizing the array rather than each panel's text fields keeps the migration to one `_locale` column on `lessons_panels`, makes the panel video's subtitles per-language for free, and stops one language's translator deleting or reordering another's panels. The cost is that a panel added in English does not reach French until someone adds it there; Launch Readiness reports that gap through its `panels-set` check. `panels` loses `required`, `minRows` and its default empty row. With any of them, an update in a second locale writes a blank panel list, which then hides the panels that locale falls back to. `title` loses `required` too, which the ticket did not ask for. Measured: Payload validates a required localized field against that locale's OWN value, and the English fallback does not satisfy it — the same behaviour `src/collections/AGENTS.md` records for `publishSpecificLocale`. So `required` refuses every write in a second locale that does not also carry a title for it, and the existing per-locale `meditation` spec went red proving it. Launch Readiness gains a `lesson-title-set` check for the blank title this now permits. The key is prefixed because a check key is global across sections and app-cards owns `title-set`. The generated migration is augmented, because the generated delta cannot be applied as issued: it adds `lessons_panels._locale` as `NOT NULL` to a populated table and drops `lessons.title` without reading it. The two backfills are what make it applicable, and `down` restores the column from the English locale row and deletes the non-English panel rows. Verified on a scratch Postgres carrying the pre-change schema: the chain was applied with this migration held back, then steps, panels, a locale row with an article but no title, and a step with no title at all were seeded, then up and down run. Every English title and panel came back byte-identical, the French panel rows were gone, and the step with no title restored as empty rather than aborting the `NOT NULL`. Each new spec was watched failing with the `localized` flags removed and with the readiness check removed. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VVEKTqb9fx1newcaZ6a6Ex
`CleanupOrphanedMedia` read each collection at the default locale, so a reference held only by a localized field was invisible to it — and an invisible reference reads as an orphan, which the job then trashes. Localizing a Path Step's `panels` (#977) puts `panels.*.media` and its subtitles behind that blind spot, which the new integration case proves: with the scan reverted to a single locale, a file referenced only by a French panel is trashed. The same hole already covered a localized `richText`, so the Lexical scan is read the same way. Both scans now read `locale: 'all'` and hand the walker the configured locale codes. `localeValues` splits the `{ [locale]: value }` shape only when every key is a configured locale, so a group whose subfields happen to look like locale codes is left alone, and an empty list — a caller that read one locale — splits nothing. The new integration case sits last in the file because the throughput cases assert against the orphan backlog every earlier case leaves, and one more run of the job spends the budget they measure. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VVEKTqb9fx1newcaZ6a6Ex
Two Path Steps carry French where their English panel text and title belong, typed there while `panels` was shared across every language: step 0's only panel holds a Shri Mataji quote in French, and step 1's second panel holds a French title over English text (#977). Re-read from production today, read-only, and those two fields are still the only ones affected. Localizing `panels` alone would leave that French as the English every app user sees, and whoever restores the English would overwrite it. So this data migration gives each affected step a French panel list of its own, copied from its English one, which carries the French forward. The English it replaced is NOT restored here. Neither original is in this repo or recoverable from production — `lessons` has no version history — and inventing a quote attributed to a named teacher is worse than leaving a visible defect. The PR asks the Path content owner for both strings. Data only, so the snapshot is the previous migration's, per `src/migrations/AGENTS.md`. Both halves are guarded and both were measured replaying the statement: a step is matched by the exact French string in its English panels and skipped if it already has French panels, so the migration inserts nothing on an environment with no Path Steps, nothing on a second apply, and nothing once the English is corrected. Row ids are derived from the English row's, which is what lets `down` delete the rows this migration wrote and leave a hand-authored French panel alone. Verified on the same scratch Postgres: with the two French strings seeded in English slots, up gave both steps a complete French panel list and left every other step alone, and down removed exactly the derived rows. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VVEKTqb9fx1newcaZ6a6Ex
Three facts a reader cannot re-derive from the code: that the array is localized rather than its text fields, and what that trades away; that `required` is refused on `panels` and on `title` for two different reasons, the second one Payload's own validation of a localized field; and that a localized upload reference needs a `locale: 'all'` scan or the media-cleanup job trashes a file in use. The schema-introspection example gains the locale codes its caller now passes, and the Storyblok importer's guide says the panels it writes land in English. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VVEKTqb9fx1newcaZ6a6Ex
- `select` the fields each media scan actually reads. `locale: 'all'` returns every translation of every field and runs a field `afterRead` hook once per locale, so reading whole documents to look at two paths multiplied the cost of the ones it ignores — `Pages.content` and `Lessons.article` each carry a Lexical sanitizer hook and are the largest values in their rows. - `extractIdsFromDocument`'s `locales` is required, not defaulted. An omitted list splits no locale map, which is right for a single-locale read and loses every translated reference for an `all` one — the #977 failure, re-armed. - The rescue migration matches an accent-free substring instead of the whole French string. A migration that matched nothing would still record as applied, so one curly apostrophe would have made it unrepeatable. Measured: the substring still matches a curly-quote and guillemets variant, and still inserts nothing once the English is restored. Its derived row id is now one `sql` const, since `up` and `down` must spell it identically. - The comment on `title` named the wrong readiness key, and three comment blocks restated what `src/collections/AGENTS.md` already holds. Both migrations were re-verified end to end after the edit, on a scratch Postgres carrying the pre-change schema: up, then down, with the English titles and panel rows coming back byte-identical. Dismissed, with reasons in the PR body: `payload.config.localization?.` does not typecheck (the property is `false | {…}`), and the readiness section's own fallback-blind read belongs to the branch the ticket names for it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VVEKTqb9fx1newcaZ6a6Ex
|
🚅 Deployed to the SahajCloud-pr-978 environment in sahajcloud
1 service not affected by this PR
|
sydevs-bot
left a comment
There was a problem hiding this comment.
1 question for the reviewer, one per thread.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff is the size #977 asked for: two localized flags, the two migrations they force, and the readiness check that replaces the dropped required. The CleanupOrphanedMedia change is correctly joined — localizing panels makes a French-only file read as an orphan, and the job trashes those. Nothing here is smuggled. One design question on how that scan learns which fields are localized, and one timing risk on the rescue.
Beyond this PR: the scan read the default locale before today, so a reference held only by a localized rich text (Pages.content, Lessons.article) has always been invisible to it. This fixes that class going forward, but nothing looks back at what was already trashed for it. Worth a ticket?
Findings
should-fix— the locale split is inferred from key shapes at scan time, when the schema walk already knows it (schemaUtils.ts:263).should-fix— the rescue loses the French if the English is corrected before deploy (20261017_095800_rescue_french_lesson_panels.ts:40).consider—downleaves behind thelessons_localesrowsupcreated (20261017_093546_localize_lesson_title_and_panels.ts:40).
What was checked. #977 against the diff. Lessons.ts, schemaUtils.ts and CleanupOrphanedMedia.ts read whole. Both migrations against the pre- and post-change snapshots: lessons_locales carries the unique index ON CONFLICT needs, and lessons_panels has no unique on _order, so one _order per locale is safe. Every localized: true in src/collections classified — none is an upload or a files/images relationship, so locale: 'all' changes nothing for them. Preview answers 200; not opened, no PREVIEW_ADMIN_EMAIL here, as the body says. Reviewer profile read.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`traverseField` already reads every field's config, so the walk records
which path segments a `locale: 'all'` read returns as a `{ [locale]: value }`
map, on `FieldReference.localizedAt`. Extraction splits exactly there.
That drops both halves of the inference it replaces: `localeValues` no
longer reads key shapes to guess whether an object is a locale map, and
the locale list is no longer threaded through four functions. Payload
deletes `localized` from a field nested inside a localized one, so the
flag read is the whole answer.
Also fixes a reference the scan could never resolve. A named tab's path
was built as `${pathPrefix}.${tab.name}`, which yields `.default.media`
when the prefix is empty — no key any document has. AppCards nests its
named view tabs inside an unnamed tab, so every per-view image and button
icon read as an orphan, which is the #977 failure in another spelling.
Both now go through one `joinPath`.
The unit spec covers the walk against a stub config rather than
`localeValues` alone, since what is recorded is now the property that
matters. Each new assertion was watched failing at its cause: the
localized marks with `recordLocalized` no longer marking, and the tab path
with the old interpolation.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QJgQpAB9gJUE9jaG5arTfc
|
Three threads, all adopted. Pushed 3e1ff27, 10b1eb3.
The look-back question is #979: nothing has checked what the job already trashed for a reference it could not see. Base was current. Lean gate ✓ (2546 unit) plus 51 targeted. The question thread waits on the content owner. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
main added three migrations while this branch added two, so src/migrations/index.ts conflicted in both its import block and its array. Both sets are wanted, and neither side's migrations touch the other's tables. The five entries are interleaved by timestamp rather than appended, because that is the order `migrate:create` regenerates this file in and the order `prodMigrations` applies the chain. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SrYFAzP7KmEpwpohPT6CN1
|
Merged ⚠ The merge leaves the snapshot chain out of timestamp order ( Gate green: lint, typecheck (src + tests), 2574 unit. Integration 94 passed — 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Clean merge. None of main's three commits touches a file this branch does: the endpoint-permission gate, the routine dependency bump and the seeds splash fix are all elsewhere. Both AGENTS.md edits were auto-merged into separate sections. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01XyZquVggCjDfECHEedX1Qu
|
One thread, answered. Pushed 81892e3 — a base merge, no code change.
Base merged: Gate green on the merged base: lint, typecheck (src + tests), 2584 unit, plus 60 targeted integration — Body refreshed: the test counts, and the settled option. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
`main` moved under this branch: #978 made `lessons.title` and `lessons.panels` localized. The merge therefore turns two of this PR's own assertions false, and CI failed on `expect(fr['panels-set']).toBe(true)`. Both changed checks are now right to report red at a locale with no panels and no title of its own, so the spec says so. The label is the part that needed code: `labelOf` reads `title`, which the section's `fallbackLocale: false` read now nulls, so every Path Step row rendered as `#42` at an untranslated locale — the defect this PR fixes for Pages and User Choices, arriving in a third section. `lessons` joins `readFallbackTitles`, and the fallback title stays out of the documents the checks read so `lesson-title-set` keeps answering per locale. Watched failing first: with the label taken from the per-locale read, the case reports `expected '#1' to be 'English-only lesson'`. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_016kz4f18hn5u39scrC3FDut
main gained #978 (translating a Path Step no longer overwrites its English text) and #985 (the admin Transcript tab). Three files conflicted. Each was touched on this branch only by 3b05cad, the pure `prettier --write` commit, so each took main's content and was re-formatted rather than merged hunk by hunk — there was no hand-written side to weigh: - docs/architecture.md — main drops the `meditationTranscript` endpoint row - src/jobs/CleanupOrphanedMedia/schemaUtils.ts — main's `localizedAt` tracking - tests/COVERAGE.md — main's new rows `prettier --write .` then ran over the whole merge result. That is part of the resolution, not a separate change: four of main's files auto-merged unformatted (CleanupOrphanedMedia.ts and three unit specs), and the `format:check` step this branch adds would have failed on main's own files. For all 36 files main changed, the merged content is byte-for-byte `prettier(main's version)`: 29 formatted files reproduced exactly, 6 prettier-ignored files identical to main, and src/payload-types.ts — the one hybrid of two generator renderings — reproduced exactly by `pnpm generate:types`, twice in a row. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RwENrwzLpaNpXvFXVnvGFR
…sh fallback (#997) * fix(status): Launch Readiness answers about the locale, not the English fallback Every non-English locale carries `fallbackLocale: 'en'`, so a section read that named no `fallbackLocale` resolved the English value and a check described "for this locale" passed on it. Six of the seven sections read that way, which made "Meditation assigned" and "Article translated" green for 18 locales in which no Path Step has been translated at all. Each section's `prepare` now passes `fallbackLocale: false` wherever one of its checks reads a localized field, and every read in the global hands the Local API a `localeIsolatedReq` copy. `createLocalReq` assigns `locale` and `fallbackLocale` onto the request it is given, so forwarding the shared one let a section decide what the sections after it resolved — in whichever order Payload runs the virtual fields' `afterRead` hooks. Lectures keeps the fallback, and says why: no check there reads a localized field, so it resolves only the row labels. Pages and User Choices do read one, so their labels get their own fallback read rather than degrading to `#42` on a screen an operator acts on. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QaWaWVrTnDo4vJWqYfUi2m * refactor(status): the request copy moves into runSection, and labels onto the row Review pass over the locale-scoping fix. Four changes, none of them a behaviour change to what the report answers: - `runSection` copies the caller's request once per section. Payload awaits every virtual field's `afterRead` in one `Promise.all`, so the sections run concurrently on one request, and `find` destructures `locale` and `fallbackLocale` off it after its own await — a sibling read can land an assignment inside that window. The invariant belongs to the machinery; a section's own reads still copy wherever they differ from each other. - The fallback title is merged onto the row in `prepare` instead of being threaded as a second channel. `labelOf` then needs no argument it did not already have, and no group evaluator carries a label map it only indexes by an id it holds. - Both label reads select `title` alone and run beside the read they used to wait for. The user-choices one dropped a `where` built from its sibling's rows, which was the only thing forcing it to wait. - `getWmAppConfig` uses the shared `memoizeOnRequest` rather than its own copy of that logic, including the rationale. `DocumentReport.label` now owns why a check and a label want opposite locale policies, so neither section restates it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QaWaWVrTnDo4vJWqYfUi2m * docs(status): a concurrent sibling read needs the copy too The nested-read rule said to skip the `req` copy when the nested call uses the caller's own locale. That is the case #982 bit: concurrent reads on one request repoint each other between `createLocalReq` and the operation's own read of the flags, whatever locale each names. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QaWaWVrTnDo4vJWqYfUi2m * fix(ci): lessons title and panels are localized now `main` moved under this branch: #978 made `lessons.title` and `lessons.panels` localized. The merge therefore turns two of this PR's own assertions false, and CI failed on `expect(fr['panels-set']).toBe(true)`. Both changed checks are now right to report red at a locale with no panels and no title of its own, so the spec says so. The label is the part that needed code: `labelOf` reads `title`, which the section's `fallbackLocale: false` read now nulls, so every Path Step row rendered as `#42` at an untranslated locale — the defect this PR fixes for Pages and User Choices, arriving in a third section. `lessons` joins `readFallbackTitles`, and the fallback title stays out of the documents the checks read so `lesson-title-set` keeps answering per locale. Watched failing first: with the label taken from the per-locale read, the case reports `expected '#1' to be 'English-only lesson'`. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_016kz4f18hn5u39scrC3FDut * fix(status): one request copy, at the read that makes it `runSection` copied the caller's request per section and every read inside a section copied again. Only the second is load-bearing: reads within one section differ from each other, so a single copy at the seam could never cover them, and no group `evaluate` reads anything for it to guard. The machinery copy also made the isolation spec vacuous. It asserts the caller's locale and fallback survive every section in `WeMeditateAppStatusSpec.sections`, and passed off `runSection`'s copy whether or not a section's own reads took one. With it gone, dropping `isolatedReq` from `translations`' read reports `translations repointed req.fallbackLocale` — watched failing, then restored. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VuvbQcWhFEViZCoZvbJMsQ * fix(status): the core-pages group stops naming a page count The group read "All ten required app pages" while `APP_PAGE_FIELDS` holds 14, so the figure it showed an operator was wrong by four. A count in that sentence drifts with the list and the group already shows one row per page, so it names none. Its subtle-system sibling keeps "twelve": that set is closed and a migration seeds exactly those slugs. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VuvbQcWhFEViZCoZvbJMsQ * fix(ci): re-measure the pinned unit spec count `perf-figures-pinned.spec.ts` compares PERF.md's recorded file count against the specs on disk, and it read 215 against 216. The lane is otherwise green: 2787 of 2788 passed, this pin the only failure. The extra file came in with `a99aae9` (#1008), which added `tests/unit/signin-token.spec.ts` without re-measuring. So the same assertion is red on `main`, and fixing it here is what gets this PR green — PERF.md's own rule is that the Files / tests row carries "the current tree's" counts while every timing stays with the session that measured it, so the counts move and the 77.9 s median does not. Re-measured on this head, 4 cores: 216 files / 2788 tests, the figure CI reported on `5394892`. The three consumer docs that quote the counts move with it, which is the coupling the spec's second and third claims exist to enforce. #1009 carries 220 / 2835 for its own tree — it adds four spec files of its own, so its numbers cannot stand in for this branch's. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WcsBbMS7ZqEP272YZNHXYk --------- Co-authored-by: Claude <[email protected]>
Summary
CleanupOrphanedMedianow scans every locale — localizingpanelswould otherwise make a file referenced only by a French panel look orphaned, and the job trashes those.joinPathfixes it.Change outline
Contract — the collection, and what a write in a second locale may omit
Both fields move out of the base table. Neither may be
required, for two different reasons, so the admin stops enforcing content and Launch Readiness reports it instead.weMeditateAppStatus → Path Lessons src/globals/WeMeditateAppStatus/sections/lessons.ts + lesson-title-set # the title `required` no longer enforces panels-set # already covered the empty panel list intro-audio-set, meditation-set, article-localized, …Contract — the two migrations
The generated delta cannot be applied as issued: it adds
_localeasNOT NULLto a populated table and dropslessons.titlewithout reading it. The backfills are what make it applicable.Flow — the media-cleanup scan
An invisible reference reads as an orphan, and the job trashes orphans. A localized field's value is invisible to a single-locale read, and so is a field whose recorded path is not a path.
Preview
Data: not seeded.
previewUrl.seedis unset in.claude/workflow.jsonand this session holds noPREVIEW_ADMIN_EMAIL, so neither link can be opened on content from here. A Railway preview carries no rows, so a reviewer has to create one Path Step, then switch the admin locale to French and edit its title and panels there.Migration
src/migrations/20261017_093546_localize_lesson_title_and_panels.ts,src/migrations/20261017_095800_rescue_french_lesson_panels.tslessons.titlemoves tolessons_locales.titleasen;lessons_panelsgains_locale, every existing row markeden. Then two steps get a French copy of their English panel list. No row is dropped and no title or panel text is lost.lessonsandlessons_panelscame back byte-identical, andlessons_localesdid not.upinserts a locale row for every step, including steps that had none, anddowndrops thetitlecolumn and leaves those rows behind with every remaining value NULL — harmless, and not byte-exact. The schemadownrestoreslessons.titlefrom the English locale row and deletes the non-English panel rows, so a French translation made after the up is discarded, which is what reverting this means. The data migration'sdowndeletes only the rows it wrote, by their derived ids.How the migrations were verified, since no test lane runs them
push: !isProductionmeans dev and both test lanes sync the schema with Drizzle push and never replay the migration chain, so CI is silent about this folder.Verified on a scratch Postgres instead: the chain was applied with these migrations held out of the folder, leaving the pre-change schema. Then seeded — three steps with titles, three panels, a locale row carrying an article but no title, a step with no title at all, and the two exact French strings read from production — and
payload migraterun.lessons_localesasen, every panel row markeden,lessons.titledropped, and both affected steps given a complete French panel list. Other steps untouched.diffagainst the pre-up dump oflessonsandlessons_panels), the French panel rows were gone, and the step with no title restored as''rather than aborting the restoredNOT NULL.INSERT 0 0when French panels already exist,INSERT 0 0once the English is corrected. The loosened matcher was replayed too: it still matches a curly-apostrophe and guillemets variant.Test results
pnpm lint && pnpm typecheck && pnpm typecheck:tests && pnpm test:unit(2584 unit tests), re-run on the merged baselessons,cleanup-orphaned-media,schema-utils, on the merged base. The earlier pre-merge run also passedwemeditateAppStatus,cleanup-jobs,meditation-transcriptionandcollections-smokeEvery new assertion was watched failing at the site that causes it: the three locale-isolation cases with the two
localizedflags removed, the readiness case with the check removed, the orphan case with the scan reverted to a single locale, the localization marks withrecordLocalizedno longer marking, and the tab path with the old interpolation.Manual verification
GET /api/lessons/<id>?locale=fr).?locale=fr.Notes for reviewer
title'srequiredwas not in the ticket. It is forced: withrequired, updating a step in French without also typing a French title is refused, and the repo's existing per-localemeditationspec went red proving it. Thelesson-title-setreadiness check is what replaces the enforcement. The key is prefixed because the generatedstatusConfig.jsonflattens check keys across sections and app-cards ownstitle-set.lessonshas no version history, so production cannot give them back. Inventing a quote attributed to a named teacher is worse than a visible defect, so the branch carries the French intofrand leaves the two English slots to a manager (step 4 above).Review passes, and the two findings dismissed
Ran
/simplify(four lenses) and/code-review high;pr-review-toolkitis not installed here.comment-lint.mjsclean. Security review skipped — no path matchessecurityReview.triggerPattern.Acted on: the
selectabove (locale: 'all'otherwise multiplies every field the scan ignores, including two Lexical sanitizer hooks, by the locale count); the rescue matcher loosened from byte-exact to an accent-free substring, because a migration that matched nothing would still record as applied; the derived row id hoisted to onesqlconst, sinceupanddownmust spell it identically; a comment naming the wrong readiness key; three comment blocks restatingsrc/collections/AGENTS.md.Acted on after the adversarial review: the locale split moved onto the schema walk (
FieldReference.localizedAt), which drops both the key-shape inference and the locale listextractIdsFromDocumenttook — and turned up the named-tab path defect above.Dismissed:
payload.config.localization?.localeCodes ?? []— does not typecheck. The property isfalse | {…}, and optional chaining does not narrowfalse. Moot now: the job no longer reads the locale list at all.preparein the readiness section reads through the English fallback, solesson-title-setandpanels-setcannot fail for a non-English locale. True, and it is the pre-existing shape forarticle-localizedandmeditation-setas well — the ticket names branchfix/status-locale-isolated-reqas the fix for per-locale judging, so taking it here would collide with it. The new check still bites where droppingrequirednewly permits a blank: English.Not taken, as outside this change: deduplicating the Lexical scan across the
filesandimagespasses (it is target-agnostic, so the two passes build the same id set from the same I/O). Pre-existing, and its own change.Closes #977