Repository navigation
feat(translations): ship the Atlas clock-label copy and two rewordings to production - #1095
Conversation
…s to production Two new sy-atlas-translations keys for the widget's clock labels (sydevs/SahajAtlasWeb bug #25 of the 6 Nov sweep): - `event.display.zone_time` — "%{city} time", after a time, naming the clock it is in ("8:00 pm Prague time"). - `calendar.times_note` — "Times are local to each class. Online classes show your time (%{zone})." under the calendar while online classes show. And two rewordings the widget is ready for: - `common.errors.captcha_blocked` stops blaming "this page". - `registration.form.privacy_policy` marks its link as `<link>privacy policy</link>`, which sydevs/SahajAtlasWeb#371 renders as a link (deployed); unmarked copy stays plain text. A data migration writes the English values, so production has them on deploy rather than by hand in the admin. It never overwrites an editor's copy: a key lands only where English lacks it, and a rewording only where the stored value is still the seeded original. Main and latest version rows are both written, so the next save keeps them. `down` removes the two keys, since the old schema refuses a save that stores them. The int spec was watched failing against both defects it guards: with the version row left out, the copy is lost on the next save; without the guards, an editor's wording is overwritten. `withSchema` moves to tests/utils for its second caller. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🚅 Deployed to the SahajCloud-pr-1095 environment in sahajcloud
1 service not affected by this PR
|
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
Four English strings, one guarded data migration, and the rule written down once. #1094 asked for two of them as an admin edit; shipping them with the code is the better call, and the two clock keys join it by area, files and verification step, so no part of this is smuggled scope. The guards could fail silently, so I read production's live English: all four match the migration's from values exactly, so every statement fires. down's one guard is the only thing I would change.
The body writes bug #25, bug #1, bug #28. GitHub renders those report numbers as links to SahajCloud #25, #1 and #28; #1094 wrote them as "Atlas bug 1", with no #.
Findings
should-fix—downkeeps an editor-editedzone_time, re-arming the unsavable-global failuredownexists to prevent.src/migrations/20261107_225000_atlas_clock_copy.ts:86consider— the new rule's default contradictssrc/migrations/AGENTS.md, with no cross-reference.src/globals/AGENTS.md:342
What was checked
- Production, read-only.
GET /api/globals/sy-atlas-translations?locale=en&depth=0:captcha_blockedandprivacy_policyare byte-exact matches forCAPTCHA_BEFORE/PRIVACY_BEFORE;zone_timeandcalendar.times_noteare absent. - Schema.
_sy_atlas_translations_v.latestand all eight*_localescolumns the migration names exist in the committed snapshot, which is identical to20261105_201411_atlas_digests_and_homes.json. - Ladder.
tests/utils/withSchema.ts(two callers) matchestests/utils/'s shape. No migration here uses Payload's local API; 104 usedb.execute. - Consumer side.
splitInlineLinkis on SahajAtlasWebmain, so the<link>span renders as a link, not literal markers — #1094's one ⚠.types:cmsleavestranslations.en.jsonalone, so the contract sync cannot red the consumer.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
…ver they hold Review: `down` kept an editor's `zone_time`, so a rolled-back deploy left a key the previous schema cannot store, and the global refused every save — the failure `down` exists to prevent. It now removes both new keys from every locale and every version row unconditionally, guarded only by `?` against a scalar column. The two rewordings stay guarded both ways. The spec seeds a French `zone_time` and an edited English one; it failed against an English-only, value-guarded `down` before this change. The globals guide now says how this migration relates to src/migrations/AGENTS.md's caution about augmenting generated migrations. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Both critic threads adopted, pushed to
Lean gate green. Anomaly: the PR body changed at 22:24Z, mid-run, already describing this wider 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
|
I could not merge the relay here, so this is the step left for you.
🤖 sydevs dispatcher |
The address-review session fixed the same finding in parallel on claude/relay-1095-78494bd, which could not merge over bfa2e5d. Its version is the stricter one, so it replaces mine: `dropKey` also checks `jsonb_typeof` (a scalar string equal to the key answers true to `?`, and `-` on it would abort the rollback), the down cases are split by what each proves, and src/migrations/AGENTS.md points at the carve-out from its side. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* feat(time): name the clock each class time is in
Bug 25 of the 6 Nov sweep: an online card showed the visitor's time, then
the host's with no label, and the two could fall on different days.
Each time now names its clock by the zone's own city: an online class
always ("3 AM London time", with "Mon 8 PM Toronto time" under it), and
an in-person class only when the viewer's clock differs at that moment.
The calendar says the same in one line under the grid, while the month in
focus holds an online class.
The two keys shipped in sydevs/SahajCloud#1095. The synced snapshot also
carries that PR's two rewordings, so the security-check fallback text
moves with it, and two registration strings an editor changed since the
last sync.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs(changelog): class times say whose clock they are
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(calendar): fold the times note in and drop its month gate
The note is one sentence, so a component file, a spec file and a reactive
store read cost more than it does. It now sits in `CalendarGrid` beside the
grid it annotates.
The focused-month gate also hid it where it was needed. A week straddling two
months read only the earlier one, so an online class on the 1st at 01:00 sat
on the grid with nothing to explain it, and the list view pages past its own
month. Any online entry in the 12-month expansion shows the note instead,
which drops the subscription to `date` — a field `store.ts` documents as read
through `getState` alone.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVxTgyXQ52LgKmZj2m
* fix(time): say nothing when a schedule names no timezone
`scheduleTimeZone` degrades a missing or malformed `firstDate_tz` to UTC, and
`firstDate_tz` is nullish in this repo's own types. Naming the clock then read
"7:30 PM UTC time" to every viewer off UTC, and UTC is our placeholder for
absent data rather than a clock the venue keeps. `scheduleNamesZone` tells the
two apart, so an in-person time and an online host's subtext fall back to the
unlabelled form they had before.
An online class's own time is the VIEWER's zone, which is real whatever the
schedule carries, so it stays named.
The JSDoc on `eventStartTime`, `eventTimeRange` and `whereSubtext` still
described the unlabelled strings, and the host's as "in Prague".
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVxTgyXQ52LgKmZj2m
* docs(changelog): match the entry to what the two fixes changed
The note's visibility is no longer the focused month, and an unnamed
timezone now leaves a time unlabelled.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVxTgyXQ52LgKmZj2m
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
Ships four pieces of English Sahaj Atlas copy with the code, so production has them on deploy. Before this, they needed an admin to type them in.
event.display.zone_time(new)%{city} timecalendar.times_note(new)Times are local to each class. Online classes show your time (%{zone}).common.errors.captcha_blockedregistration.form.privacy_policy<link>privacy policy</link>."This replaces the admin edits that #1094 asked for.
How
translationsSchema.json, and all four English values are set indata.en.json. Theprivacy_policydescription now tells translators about the<link>span.20261107_225000_atlas_clock_copy: it changes data only, and its.jsonis the previous snapshot with a new timestamp.migrate:createconfirms there's no schema change, because both new keys live inside existing JSON columns.upnever overwrites an editor's copy: a new key is added only where English lacks it, and a rewording only where the stored value is still the seeded original.latest: trueversion row. A save loads from the version row, so without that the next save would drop the copy.downis required, not optional: the old schema has no entry for the two new keys, and would refuse every save of the global while they are stored. So it removes them from every locale and every version row, whatever they hold. The two rewordings are the other case — the old schema declares both keys, sodownreverts English alone, and only where the value is stillup's.src/globals/AGENTS.md, with this migration as the worked example, andsrc/migrations/AGENTS.mdpoints its own no-backfill default at that carve-out.Checked
tests/int/atlas-clock-copy.int.spec.tspasses all 7 cases. Each guard was watched failing against its defect: leaving out the version row loses the copy on the next save, droppingup's guards overwrites an editor's wording, and a value-guarded or English-onlydownleaves a rewordedzone_timebehind.atlas-drop-time-in-place.int.spec.tsstill passes now that itswithSchemahelper is shared fromtests/utils.After merge
pnpm sync:translations --writeand wireszone_timeandtimes_notefor Atlas bug 25.captcha_blockedand have no<link>span inprivacy_policy, so the link doesn't show for them yet. Both are for translators.🤖 Generated with Claude Code