Repository navigation
feat(translations): add the inline embed's strings, drop the compact tab - #1268
Conversation
…the compact tab The widget now opens every embed inline (sydevs/SahajAtlasWeb#466): a heading names the place the visitor is in, one button opens the full map over the host's page, and another closes it. `common.map.expand`, `common.map.close` and `countries.place_title` are those strings. The same change retires the compact card, so the `compact` tab has no reader left and its one key goes with it. The nine non-English seeds lose their `compact` group and gain nothing: `_meta.omitted_keys` says an untranslated key is omitted, and the client read serves English for it. `translations-globals.int.spec.ts` exercised the JSON columns' schema enforcement through `compact`, the only other single-key flat tab, and now uses `online` instead. Co-authored-by: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVpjbGYp6Mvkwf2mDG
Generated by `pnpm db:migrations:create`: `up` drops `compact` and `version_compact`, `down` re-adds both as jsonb. No data statement — the whole column goes, so the JSONB key-retirement sweep does not apply (#1214 is the precedent). `pnpm generate:importmap` found no new imports. Co-authored-by: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVpjbGYp6Mvkwf2mDG
Three assertions named the tab: the config tab labels, the schema's tab order, and the seed's proof that French copy comes from the French file. The last one now reads `countries.title` in both locales, so one key shows two real values. Co-authored-by: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVpjbGYp6Mvkwf2mDG
Four accepted findings: the Map group description restated the two keys below it, both new descriptions pinned a pixel position the widget is free to move, the Countries group still described only the country list, and two specs carried a tab count their own `toEqual` list enumerates — which had already drifted, saying twelve while the list held eleven. Co-authored-by: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVpjbGYp6Mvkwf2mDG
|
🚅 Deployed to the SahajCloud-pr-1268 environment in sahajcloud
1 service not affected by this PR
|
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
|
🤖 no session running Written by the sydevs dispatcher. Sessions never edit this comment. |
|
The session for this item did not finish after 3 attempts. I have stopped retrying. A mention ( 🤖 sydevs dispatcher |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff is the size of its ticket: three keys declared, one tab retired, one generated migration, ten seed corpora moved in step. It adds no abstraction — new-pieces.mjs reports no new pieces, so no streamliner ran.
One shape question is worth your word, and it is the one the author raised and could not open a thread for. These three keys skip the default mechanism #1218 built to retire exactly this manual step, so production gains them only from a hand-run seed. Criterion 3 pinned the corpus route; nothing else does. I would take the default.
Findings
- should-fix — the three new keys declare no schema
default, leaving a manual production seed as their only delivery path.translationsSchema.json:227 - consider —
place_titlelowercasesclassesagainst two title-cased siblings.data.en.json:81 - consider — an added comment accounts for a removed count.
atlas-translations-schema.spec.ts:122
What was checked
Read whole on the branch: the atlas schema, the migration pair, migrations/index.ts, both specs, the seed test, englishDefaults.ts, and all ten seed diffs.
- SahajAtlasWeb
mainstill namescompactinWIDGET_TRANSLATION_TABSandTRANSLATION_SELECT, so the body's typecheck warning and merge order hold. - SahajCloud validates no
selectkey, so the consumer's stalecompact: truecannot 400 in the interval — it returns nothing. - WeMeditateWeb names
SyAtlasTranslationonly in its generated types, so its re-sync is type-only. - No reader of the
compactgroup survives. The two prose mentions (lib/clients/site.ts:52,InstallGuide/templates.ts:230) describe the widget's own card and stay correct until SahajAtlasWeb#466. - 12 top-level tabs, matching every
_meta.schema_version.onlinesubstitutes forcompactin the four jsonSchema cases.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The two lines explained why the tab count left the test name, which is change context the commit message owns. The `toEqual` list below is the specification, and `tests/AGENTS.md` already states that a spec pins no count the source enumerates. Co-authored-by: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVXfBskzDKKkXhoyvz
|
Three critic threads: one adopted, one rebutted, one back to you.
No base merge: the branch already sits on 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
The reviewer chose option A on the PR's open thread: the three new keys declare their English as a schema `default` rather than being seeded from `data.en.json`, so the deploy's own boot delivers them through `reconcileEnglishDefaults` and no manual production seed run stands between the merge and the widget's snapshot. Every future atlas key takes the same route. The corpus loses the three values, because `translationsSchema.json` is now their one home — two copies are free to disagree. The atlas corpus spec gains the pair of cases `wm-web-translations-seed.spec.ts` already carries for that: the coverage check exempts a key declaring its own English, and a second case refuses a corpus copy of one. Both were watched failing against `countries.place_title` before the split landed. Costs four no-op statements per boot, one per column per table, for the two columns the defaults now sit in. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVHn1D9qoWJhpzSJvC
|
Option A built. The PR's one open decision is closed.
The body is refreshed: its outline, preview and verification steps described the corpus route. Nothing remains.
🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
…s-inline-strings Both migrations are wanted, so `src/migrations/index.ts` lists both, in timestamp order: main's 20261123_185218_pages_parent_index_pages ahead of this branch's 20261125_152923_atlas_drop_compact_tab. That order leaves this branch's snapshot newest by timestamp and blind to main's twelve statements, which is the out-of-order snapshot trap (#566). 20261125_191844_merge_snapshot_heal carries the first snapshot generated on the merged tree; its own DDL is emptied, because every statement it emitted was byte-identical to the migration already shipping them. A probe migrate:create then wrote no files. `src/payload-types.ts` is generated, and the textual merge dropped main's field descriptions on WmWebConfig's homePage, indexPages.meditations and indexPages.lectures. Regenerated, so the file matches the merged config — it is a contractSync source for WeMeditateWeb and SahajAtlasWeb. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVyaeoS8cD9RppZyt3
|
Merged That order left this branch's snapshot newest by timestamp and blind to main's twelve statements — the out-of-order snapshot trap (#566). Git merged
Lean gate green on the merge, plus 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
…s-back-header-strings #1268 landed the atlas inline embed's strings and dropped the `compact` tab, touching the same four files this branch does. - `common.chrome.close`: both sides reworded it. Took this branch's "the filters, which sit over the page they narrow" and main's removal of the compact dialog, which is the wording #1262 wrote down for whichever landed second. - `atlas-translations-schema.spec.ts`: both sides wrote the one-home rule. Took main's two cases, which name the exempt set from its own `defaultedKeys()` helper and put a floor under it. Kept this branch's `englishValues()`, which merges both homes so a schema-declared `%{place}` is not read as invented. - `src/globals/AGENTS.md`: both sides added the atlas spec to the one-home sentence. Kept main's wording plus this branch's one-home-of-two trap. - `src/payload-types.ts`: generated. `pnpm generate:types` leaves the resolution unchanged. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWG8KpdZEJoRaX3pbS
`sy-atlas-translations` no longer declares a `compact` group: sydevs/SahajCloud#1268 retired it with the compact card it labelled, and dropped its jsonb column. The generated type arrived in this branch's last re-sync, so `WidgetTranslations` `Pick`ed a key `SyAtlasTranslation` no longer has, and `pnpm typecheck` failed with TS2344 — which took the build and, behind it, the preview the smoke lane reads. The tab list is stated in three places that cannot import one another, and all three lose the member: the constant, the SDK `select`, and the node script. Requesting a field the global has dropped is also a read this widget no longer has any answer for. `translations.en.json` keeps `compact.open`, and the card keeps asking for it. The snapshot is i18next's boot resource, so the one call site still resolves against compiled English while the group is gone upstream. Regenerating it here would pull in `common.map.expand`, `common.map.close` and `countries.place_title`, which nothing in this repo references yet. #466 removes the card and wires those three, running `pnpm sync:translations --write` itself. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX3jiAvDARU96rnGNV
sydevs/SahajCloud#1268 serves the inline embed's three strings and no longer serves `compact.open`, so a full `pnpm sync:translations --write` runs clean here. The hand-added `common.map.expand`, `common.map.close` and `countries.place_title` already matched production byte for byte. The sync also drops the thirteen screen-reader keys SahajCloud#1246 removed, which `RETIRING_KEYS` held since #456 moved them into `src/config/a11y/`; their entries go with them. `common.errors.captcha_blocked` stays retiring until SahajCloud#1278. `pnpm types:cms` wrote no change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
sy-atlas-translationsdeclarescommon.map.expand,common.map.closeandcountries.place_title, the three strings the inline embed needs.compacttab goes with the compact card it labelled: one generated migration drops its two jsonb columns.origin/mainis merged in at686cf04, cleanly.Change outline
The widget reads this schema, so the declared keys are the contract. Three added — each declaring its own English as a
default— one tab retired, and three descriptions that named the compact card reworded.sy-atlas-translations src/globals/SahajAtlasTranslations/translationsSchema.json common.chrome close # − "the compact dialog" widget_label # − "the compact card's heading" + the expanded map's dialog common.map # group: + "the pair that opens and closes the map" find_my_location, location_failed, location_not_available + expand # on the inline map → opens the full map over the host's page + # default "Expand map" + close # on the expanded map → returns the visitor to the page + # default "Close map" countries # group: + "the inline embed's page heading" title # + the heading where no place is chosen + place_title # the heading once the visitor is in a place; %{place} + # default "Free Meditation classes in %{place}" - compact - open # the card's one buttonA
defaultis the key's one home for its English, soseeds/sy-atlas-translations/data.en.jsoncarries none of the three.reconcileEnglishDefaultsputs them into a database that predates them, fromonIniton every boot, which is what retires the manual production seed for these keys and every future atlas key (#1218). It costs four no-op statements per boot — one per column per table, forcommon_mapandcountries.Each leaf group is one jsonb column, so the three new keys need no DDL and the retired tab takes its whole column. Generated, not hand-written.
Preview
The global's admin page is where the whole change is visible.
src/fixture/seeds collections, not globals, so the rows and the tab list come from the schema in this diff and are there on first load. The three new keys' values are declared defaults, so the preview's own boot writes them; every other key's value still arrives only from a seed run, which nothing here performs.src/fixture/views.tsalready listsglobalDoc('sy-atlas-translations')as whereTranslationsRowrenders, which is the component these two pages exercise.Contract impact
src/payload-types.tsis acontractSyncsource for WeMeditateWeb and SahajAtlasWeb:SyAtlasTranslationlosescompactand gains the three keys.⚠ The re-sync PR the loop opens on SahajAtlasWeb
mainwill fail its typecheck until sydevs/SahajAtlasWeb#466 merges —mainstill names thecompacttab inWIDGET_TRANSLATION_TABS, picked off the generated type. Merging #466 clears it. Nothing runspnpm sync:translationsin SahajAtlasWeb from here: that script reads production, so the widget PR syncs its own snapshot once this has deployed and the boot has written the three English values.Migration
src/migrations/20261125_152923_atlas_drop_compact_tab.tscompactonsy_atlas_translations_localesandversion_compacton_sy_atlas_translations_v_locales. Every locale's storedcompact.openis discarded. No data statement — the whole column goes, so the JSONB key-retirement sweep does not apply (chore(translations): drop WeMeditate Web's unused video tab #1214 is the precedent)downre-adds both as jsonb, empty. It restores no copy, as the ticket specifiesTest results
c893a59tests/int/translations-globals.int.spec.ts+tests/int/translations-english-defaults.int.spec.ts(41),seeds/tests/atlas-translations-import.test.ts(9, which runs the real import against a live database)migration-validator: 4 pass, 1 warn (DROP COLUMN, which is this change)pnpm generate:importmap: no new imports, no diffpnpm generate:typesafter the defaults landed: no diff —defaultis held back from the emitted JSON SchemaManual verification
reconcileEnglishDefaultsnever touches a key already present, so a manager's reword survives every later boot.Notes for reviewer
defaultover the corpus route in this thread, built in3bc3f91. feat(translations): add the inline embed's strings, drop the compact tab #1256's acceptance criterion 3 is reworded to match, marked as a review line.common.chrome.closeon the same lines. Both are open, so expect a conflict intranslationsSchema.json. Whichever lands second keeps the other's wording; after both, that description should read "the filters, which sit over the page they narrow, the report modal and the feedback banner".place_titleships as "Free Meditation classes in %{place}", the string the ticket specifies, while its siblingcountries.titleis "Free Meditation Classes" andseo.root_titleis "Free Meditation Classes Near You". The ticket calls these seed defaults a manager may reword, so this is flagged rather than changed — say the word and it is one commit.common.map.closeis a second close string besidecommon.chrome.close. Kept: the copy differs ("Close map" against "Close"), and chore(infra): migrate host to Railway + DB to Postgres #466 reads this key by name.Detail
Review findings dismissed, with reasons. Four lenses ran (
/code-review highplus/simplify's reuse, simplification, efficiency and altitude agents — no routine haspr-review-toolkit). The security review did not run: no changed path matchessecurityReview.triggerPattern. Four findings were accepted and committed as60eaf70. Dismissed:downshould restore English rather than empty columns. The ticket's acceptance criteria require no data statement, and the migration's own comment states the loss. Restoring would mean embedding ten locales' copy in a frozen file.down. The ticket requires both clauses.common.map.closeintocommon.chrome.close. See the note above.data.fr.jsoninstead of hand-copying it. The English line beside it is a hand-copied literal too, so fixing one half alone is inconsistent and fixing both widens the diff past the tab removal.tests/AGENTS.mdwants one wording assertion per subject, which is what it is.src/lib/clients/site.ts:52andsrc/components/admin/InstallGuide/templates.ts:230still name the widget's compact card. They describe the widget's live slot rules, which chore(infra): migrate host to Railway + DB to Postgres #466 retires — and this PR merges first, so rewording them now would make them wrong for the interval.Why
_meta.schema_versionmoved in all ten seed files.tests/unit/translations-seed-meta.spec.tsderives the tab and leaf-group counts from the schema and compares them to the quoted line, so12 tabs, 42 leaf groupsis checked rather than trusted.Coverage. The three new keys are held by
atlas-translations-schema.spec.ts's describes every key, plus the two cases thedefaultroute needs: covers every key the schema declares, bar the ones declaring their own and leaves a key declaring a schema default out of data.en.json. Both were watched failing with['countries.place_title']— the first with thedefaultremoved, the second with the corpus value put back. The second case asserts the exempt set is non-empty, since otherwise an empty one would make both pass over nothing. The retired tab is held by the schema's tab-order assertion and the int spec's tab-label assertion, both of which failed first.One comment went stale and was corrected.
translations-english-defaults.int.spec.tssaid "the shipped schema declares one default per column", whichcommon_map's two defaults now disprove. It nameswm-web-translationsinstead — the global that case writes to.onlinereplacedcompactin the int spec's jsonSchema cases. Those four cases need a flat tab with one unconstrained string key, which is whatcompactwas andonlineis (online.title, nomaxLength).Closes #1256