Gap G-35-1 (supersedes D-05; D-06 reset and D-07 drift per locale):
- the templates list keeps one row per template (the base row, or the
lowest variant when only variants ship) with a Customized locales
column (Default, then locale codes, at most three then +N);
- row states and the status filter aggregate over the template's
locale versions; the locale filter is removed;
- a not-customized locale without a file shows the base row's current
subject, body and layout; its info partial says so, its file version
compares with the base file, and Reset returns it to the base file
(postcard.ResetOverride accepts a fallback-locale code);
- copy: mail.template.customized_locales, mail.info_locale_default,
mail.info_locale_fallback (en/pl);
- tests: TestMailScreensSmoke/locales_list, templates and drift updated,
TestMailDrift on the grouped row, TestMailTemplateFilterScopes.
Gap G-35-1 (supersedes D-05), tracer slice:
- postcard: migration 202611130001_mail_template_base_code (base_code
column and index); SyncIndex writes base_code; EnsureLocaleRows creates
the <template>-<locale> rows of locales that ship no file; TemplateBase
and Catalog.TemplateFor; send, preview and validation resolve a missing
<template>-<locale> to the locale's customization, else the base's
customization, else the base file. Names with their own file send as
before.
- cabana: mail locales are the translator's plus the TranslationWriter's
enabled locales; sync ensures the locale rows and re-syncs when the
locale set changes; record lookups admit fallback-locale rows; the
record title is the base code; RecordMeta.LocaleVariants
(RecordLocaleVariant) on the show and update responses.
- admin: LocaleVariantSwitcher in the update form header, from
meta.localeVariants, behind the unsaved-changes confirm.
- tests: TestMailOverrideSmoke/locale_fallback,
TestMailScreensSmoke/locales, LocaleVariantSwitcher.test.ts.
- Layouts and partials controllers with catalog scoping, reset action and File version diff
- Custom layout create/delete with in-use refusal; meta.deletable and customized/outdated row states
- List schema golden fixtures updated for the two new row-state message keys
Co-authored-by: Cursor <cursoragent@cursor.com>
- Settings -> Mail -> Mail templates in the internal pseudo-plugin when
postcard's Mailer is published; system.manage_mail_templates and
system.manage_mail_layouts registered with no role grants
- MailTemplate/MailLayout models, catalog-scoped list and form, layout
relation over file and custom layouts, no create or delete
- save stamps is_custom, base_hash and customized_at and validates the
override through postcard.Editor inside the save transaction
- serve-start postcard.SyncIndex through lagoon.OnDatabase, retried on
the first mail list request
- copy en/pl, README and docs; TestMailScreensSmoke/templates
Plan 35-02, task 1