Commit Graph

2393 Commits

Author SHA1 Message Date
31d019fcc5 docs(35): fill the validation map
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 14:23:48 +01:00
1ae1a9553f test(admin): unit and browser tests for the mail editor fields
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 14:23:28 +01:00
45017039b2 fix(admin): rebuild boardwalk dist after mail preview and insertImage fixes
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 14:23:28 +01:00
52e854a19e fix(admin): skip mail preview requests while the field is off-screen
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 14:21:48 +01:00
275e70b42d fix(admin): encode parentheses in markdown mail image URLs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 14:21:48 +01:00
cd20540f13 test(cabana): unit tests for mail permissions, save validation, drift, reset, layout delete and test send
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 14:14:08 +01:00
659969b9ac test(postcard): unit tests for overrides, fallback, partials, samples, validation, sync and branding
- Pin override precedence, fallback, partials, samples, draft validation and branding
- Postgres TestStore/TestSync for index sync, drift hashes and reset
- Pact row-state and mail capability method-set pins; attach AbsolutePublicURL cases

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 14:04:14 +01:00
1df2e31dea fix(admin): isolate CodeMirror load for chunk-failure tests
- Route CodeEditorField through codeeditor/load so vitest can mock the chunk
- Keep registry expectations for colorpicker/codeeditor without importing the editor SFC

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:57:16 +01:00
e81cfde7b2 fix(admin): restore suite after colorpicker and codeeditor registration
- Expect colorpicker/codeeditor as registered controls; use notatype for unsupported cases
- Seed DatePicker placeholder from the model value so the calendar opens on that month
- Make CodeEditor chunk-failure mock reject the dynamic import

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:53:44 +01:00
5f62cd6b92 test(35): phase gate script check-phase35.sh
- Fail-closed stages for self-test, go, docker, consumers, admin, docs, marker and additive
- Consumers run sm-user-plugin and sm-paymentgateway-plugin mail tests against this checkout

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:53:44 +01:00
95eed7ad98 docs(35-03): complete mail templates SPA editor plan 2026-11-13 13:43:33 +01:00
f232076531 docs(state): record phase 31.2 context session 2026-11-13 13:41:27 +01:00
b8638aac66 docs(31.2): capture phase context 2026-11-13 13:41:25 +01:00
8969806dc8 fix(phrasebook): add mail.picker copy keys used by the admin image picker
SPA literals for insert/use/upload states and empty/error copy must resolve
in en and pl or the phrasebook SPA key check fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:40:49 +01:00
36f3410896 build(admin): rebuild the embedded admin for the mail editor
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:38:48 +01:00
d13340672f feat(admin): footer record actions, deletable flag, mail row states and diff styles
- FormView footer RecordActions when there is no preview; meta.deletable hides Delete
- Partial fields reload after save and record actions; customized/outdated badges
- .summer-diff kit and docs for codeeditor, mailpreview and footer actions

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:37:55 +01:00
aba512800e test(35-03): add failing test for customized and outdated row badges
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:35:48 +01:00
68e1d36fd5 feat(admin): colour picker, mail image field and the image picker with insert
- insertImage escapes markdown/html/css/text snippets per UI-SPEC C4
- MailImagePicker with canUpload-gated upload, radiogroup tiles, insert/choose modes
- ColorPickerField, MailImageField, markdown/codeeditor Insert image wiring

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:34:54 +01:00
48e87b7543 docs(state): record phase 31.1 context session 2026-11-13 13:32:27 +01:00
db88fb15f2 docs(31.1): capture phase context 2026-11-13 13:32:26 +01:00
3e29e6042e test(35-03): add failing tests for insertImage and colorpicker
- insertImage C4 table expects escaped markdown/html/css/text snippets
- ColorPickerField sync cases; stubs return empty until GREEN

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:29:09 +01:00
9975cf4b52 feat(admin): codeeditor field on CodeMirror 6, loaded lazily
- Pin the seven approved CodeMirror/lezer packages exactly; lockfile integrity matches the decision note
- Lazy createCodeEditor with Go {{ }} highlighting, form hotkeys kept, Tab unbound
- Loading skeleton, chunk-failure textarea fallback, read-only pre

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:28:02 +01:00
7e2c01172f test(35-03): add failing tests for codeeditor field
- Browser smoke: Tab leaves, Mod+S/Mod+Enter save, Esc does not cancel
- Happy-dom: loading box, read-only pre, chunk-failure textarea fallback
- Stub field/editor so imports resolve; assertions fail until GREEN

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:24:19 +01:00
ee0bbc27f8 docs(31): record planned phase and patterns 2026-11-13 13:15:24 +01:00
6e0d4bbca7 docs(35): CodeMirror decision note and STACK.md row for the admin code editor
- Document seven exact pins, integrity values, and the too-new flag on @codemirror/view
- Add Admin SPA STACK.md rows linking the decision note before any npm install

Plan 35-03, task 2

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:15:23 +01:00
52204e171d feat(admin): mail preview field with sandboxed HTML and test send
- Add MailPreviewField (POST /mail/preview + /mail/test-send, empty sandbox iframe)
- Register mailpreview as valueless/group-labelled; SettingsFormView FORM_VALUES/FORM_LOCALE
- Smoke tests for srcdoc, sequence guard, 422 keep-last, and 429 Retry-After

Plan 35-03, task 1

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:14:22 +01:00
9ea3159ba2 fix(31): reslice plans after checker feedback 2026-11-13 13:07:56 +01:00
da6bfa9e48 docs(35-02): record plan progress in state and roadmap
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:05:49 +01:00
399ba5fb60 docs(35-02): complete mail screens server plan
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:05:25 +01:00
0c73c8d4f1 feat(cabana): mail preview and test send to yourself
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 13:02:49 +01:00
4fd2ed07eb feat(cabana): code editor, colour and mail image fields, mail branding and the image library
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-13 12:53:09 +01:00
b996a8fc83 docs(31): add recording foundation todo and test plans 2026-11-13 12:48:32 +01:00
83f76cc3f7 feat(cabana): mail layouts and partials screens with reset, drift and custom layouts
- 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>
2026-11-13 12:33:20 +01:00
Jakub Zych
7efb9ed7ad feat(cabana): mail templates screen over postcard overrides
- 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
2026-11-13 11:45:13 +01:00
Jakub Zych
2acf8e46c4 docs(31): split into 31, 31.1 and 31.2 and record the planning decisions 2026-11-13 11:29:37 +01:00
Jakub Zych
7b25fcff55 docs(phase-31): add validation strategy 2026-11-13 11:21:57 +01:00
Jakub Zych
1bfe0514f8 docs(31): research phase domain 2026-11-13 11:20:52 +01:00
Jakub Zych
533d0d2fcd docs(35-01): record plan decisions in state 2026-11-13 11:11:42 +01:00
Jakub Zych
db86b51a51 docs(35-01): complete mail domain layer plan 2026-11-13 11:11:01 +01:00
Jakub Zych
2bf9081c1b feat(postcard): mail branding and the logo URL
- Brand, DefaultBrand and CompileBrandCSS: thirteen colours, each checked
  as a six-digit hex colour, compiled into CSS for plain elements and the
  built-in layouts and partials
- once the branding row exists its compiled CSS replaces mail.brandCss;
  mail.css still follows, and the file version sent after a failing
  override keeps the Branding
- layouts get logoUrl, built per send from storage.uploads.public_url or
  app.url through attach.AbsolutePublicURL; a logo that cannot be shown is
  left out with a rate-limited warning
- Editor previews and validates a Branding draft (rule colour)

Plan 35-01, task 5.
2026-11-13 11:06:43 +01:00
Jakub Zych
935e4bf64f feat(attach): absolute public URL from config
- attach.AbsolutePublicURL builds the absolute public URL of a blob key from
  storage.uploads.public_url, or from app.url and the public path prefix
- it reads the config only, not the values OpenBucket recorded, so a job
  worker that opened no bucket gets the same URL as serve
- attach.ErrNoAbsoluteURL when neither base is configured

Plan 35-01, task 5.
2026-11-13 11:01:43 +01:00
Jakub Zych
f8fa0f1b4b docs(31): capture phase context 2026-11-13 10:59:36 +01:00
Jakub Zych
495319ee21 feat(postcard): sample values, file hashes, index sync and the draft editor
- sample.<path> header keys and a parse-tree walker that fills every other
  variable with a visible [path] placeholder, nested fields and range
  targets included
- every file entry carries the sha256 of its CRLF-normalized text; the
  catalog lists its files (Templates, Layouts, Partials) for admin code
- SyncIndex upserts one index row per file and never touches the override
  columns of a customized row; ResetOverride returns a row to its file
- Editor validates, previews and test-sends a template, layout or partial
  draft through the render path of Send and reports field and rule
- pact.RowStateCustomized and pact.RowStateOutdated

Plan 35-01, task 4.
2026-11-13 10:57:05 +01:00
Jakub Zych
5df1ec27cf feat(postcard): mail partials, built-in layouts and layout and partial overrides
- pact.HasMailPartials: plugins declare <plugin>::mail.partials.<name>,
  loaded from views/mail/partials/<name>.htm; HasMailTemplates is unchanged
- bodies and layouts call {{ partial "name" "key" value ... }}; a call in a
  Markdown body leaves a per-render random token swapped after goldmark, so
  raw HTML stays disabled for bodies
- built-in partials button, panel, table and subcopy, built-in layouts
  system and minimal next to the unchanged default, reachable by alias
  after a plugin's own aliases
- NewDBSource also reads customized and database-only layouts and
  customized partials; a layout's CSS goes before mail.css

Plan 35-01, task 3.
2026-11-13 10:38:14 +01:00
Jakub Zych
7e5d2c74af feat(postcard): database overrides for mail templates with file fallback
- postcard owns the system_mail_* tables (postcard.Migrations), run by lagoon
  as the framework set summercms.postcard after system_files
- Send asks an OverrideSource once per message; NewDBSource reads the
  customized template row through the *gorm.DB published on the app
- a failed lookup, missing tables or an override that does not render or
  fails the safety checks sends the file version and is logged
- the caller's Message.Subject still wins; Mailer, Message, NewMailer,
  Catalog.Register and BootPlugin keep their signatures

Plan 35-01, task 2 (tracer).
2026-11-13 10:26:10 +01:00
Jakub Zych
3198bbe1aa docs(quick-261108-pe4): beachcomber highlights and field projection v0.6.4 2026-11-08 18:45:54 +01:00
Jakub Zych
7819c6746c feat(beachcomber): search highlights and field projection (quick-261108-pe4)
- Additive: Query.IncludeFields, ExcludeFields and Highlight; left empty,
  the Typesense request is the same as before.
- SearchResult.Hits holds one Hit per id, in step with IDs; SearchPage
  always fills it.
- Snippets are plain-text Segment runs split at private-use highlight tags,
  never HTML; MaxSnippetsPerArray is applied client-side.
- Optional HighlightSearcher capability, checked with SupportsHighlights
  (true for Typesense, false for null and third-party engines).
- README and docs: Highlights sections with the rule that a caller drops
  the hit of every id failing the SQL re-check before showing a snippet.

Targets framework v0.6.4 (additive, no breaking change).
2026-11-08 18:45:29 +01:00
Jakub Zych
6f9b77033f docs(35): create phase plan (4 plans, 4 waves) 2026-11-06 19:43:03 +01:00
Jakub Zych
a0242808a0 docs(35): pattern map and planning-time decisions D-22..D-25 2026-11-06 19:10:23 +01:00
Jakub Zych
9232dc1048 docs(35): research and validation strategy for the mail templates editor 2026-11-06 19:05:34 +01:00