fix(l10n): stamp a missing l10nSource when a connected translation is opened #345
No reviewers
Labels
No labels
bug
enhancement
needs-triage
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle!345
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/343"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #343
What
Opening a connected translation in the editor (
GET /api/page,GET /api/page/elements, viaopenPage) now stamps, after the existingl10n.Repair:l10nSourcewith its source element's current hash (l10n.StampMissing, built onwalkElements,sourceParam,hashOf,setSourceParam);l10nSourcewhen missing (l10n.StampMissingPage→pageops.TranslationPageStamp, samepageFormFieldsasTranslationPageChanged).The write is persisted with the existing
repair translationsnapshot. Edge cases:translated.Rule owners
sourceParam.pageSource, whichPageChangedandStampMissingPageshare.Hash/ItemHash/PageHash.Docs and skills
scaffold/site/AGENTS.md: "Change tracking", "Change tracking of the page's own fields" and "Translations by hand" now say the editor stamps a missing hash on first open.docs/api.md: GET /api/page "Languages" and "Writes", the translations overview andpageChanged.docs/architecture.md: "Multilingual sites".edit-contentandmigrate-site. Neither contradicts the new behaviour, since both point at AGENTS.md, so they are unchanged.Tests
l10n:TestStampMissingandTestStampMissingPage.pageops:TestTranslationPageStamp.server:TestOpenStampsMissingSourceHashesis the regression from the report. It failed before this change and passes now.TestOpenStampTracksParamAndTitleChangesTestOpenStampEdgeCasesTestOpenStampSnapshotgo vet ./...andgo test ./...are green.web/is untouched.🤖 Generated with Claude Code
[autoland] verdict: pass
PASS — signal: ci / build-and-test success (run 365; release skipped). Title is Conventional Commits, body carries Closes #343. Diff matches the issue: l10n.StampMissing / StampMissingPage (sourceParam stays the one 'is stamped' owner, pageSource shared with PageChanged, hashing only via hashOf/PageHash), pageops.TranslationPageStamp over the same pageFormFields as TranslationPageChanged, wired into openPage (both GET /api/page and GET /api/page/elements) under the existing repair-translation snapshot. Edge cases (stale hash kept, free translation untouched, no same-uid/same-name source skipped) are tested at l10n, pageops and server level, plus the #343 regression. AGENTS.md, docs/api.md and docs/architecture.md updated; skills unaffected (they point at AGENTS.md). Base moved by #344 (supervisor only, disjoint); merge-tree is clean.