Rich text message authoring: reviewer evidence pack
PR 2001 replaces fragmented email text areas with one responsive rich text composition workflow for campaigns and automations. Authors gain formatting, links, personalization, undo and redo, optional plain text, and an HTML source view that protects advanced templates. Inline waivers gain Markdown authoring with a matching customer renderer that preserves legacy line breaks while blocking unsafe links and remote images.
bb82b0a98 (merge-base with main)…92f215ade (captured implementation head)
Source state
feat/1947-rich-text-editors at 92f215ade, pushed as draft PR #2001; this report is the following evidence-only commit
Generated
Reviewer brief
Outcome and scope
Message authors get one polished workflow without risking stored markup
Campaign and automation dialogs now share an accessible editor with responsive formatting controls and direct personalization insertion. Safe email HTML is edited visually, advanced email HTML opens in source mode, and existing plain-text alternatives open when dialog state arrives asynchronously. Waiver authors format Markdown and preview the same safe links, breaks, lists, and emphasis that customers receive.
What this report proves
Head-only captures exercise the new Storybook surfaces at 1200 by 948 and 390 by 844 CSS pixels. The base has no equivalent rich editor, source-preserving mode, or Markdown preview to pair honestly. Live Chromium checks cover composition, responsive layout, source preservation, link behavior, waiver formatting, and customer rendering. Focused tests cover persistence boundaries and unsafe content. This report does not replace CI, reviewer approval, or post-merge deployment verification.
Claim map
Evidence coverage
Each material changed behavior or state maps to direct evidence or an explicit gap.
Behavior or claim
Evidence
Status
Campaign and automation email writing share a polished visual composer
Advanced email templates and loaded plain-text alternatives remain visible and unchanged
Loaded-template source capture plus live DOM values for the table markup and expanded plain-text section
Covered
Waiver formatting previews the customer-facing result
Author preview and customer widget captures using the Markdown authoring and rendering path
Covered
Unsafe waiver links and remote Markdown images do not become active customer resources
Focused server-rendered tests and live customer DOM inspection reporting zero remote images
Covered
The production deployment serves the merged editor bundles
Deployment occurs only after merge and the release workflows complete
Gap
Observed change
Review evidence
Evidence is grouped by the reviewer question each item addresses.
Email composer, desktop
Screenshot
Formatting and personalization stay in one focused workspace
EmailComposer at 1200 by 948 after entering structured HTML through source mode and returning to Design. The visual editor retains the heading, personalized greeting, bold studio tag, and bullet list while the toolbar, subject, merge fields, and optional plain-text section remain visible together.
The shared composer renders structured content and exposes formatting, personalization, Design, HTML, and plain-text controls without leaving the dialog workflow.After
Email composer, narrow viewport
Screenshot
The complete authoring workflow remains usable at 390 pixels
The New Message story at 390 by 844 keeps the subject, personalization fields, wrapped formatting toolbar, editor, mode controls, and plain-text disclosure within the narrow surface.
Toolbar controls wrap instead of forcing a desktop-width editor, while touch targets and mode choices remain available.After
Advanced email compatibility
Screenshot
Loaded layout HTML opens in the source-preserving view
The story mounts with empty dialog state, then asynchronously loads a table-based email and a plain-text alternative. The editor switches to HTML, keeps the exact table string in the controlled textarea, and opens the populated plain-text section.
Advanced table markup is presented as source rather than being parsed through the reduced visual schema.After
Waiver authoring
Screenshot
Block formatting produces the preview it advertises
In the real waiver dialog story, placing the caret at the end of the first line and activating Heading changed the full line from plain text to a Markdown heading. Preview rendered that heading and the existing bullet terms as customer-facing content.
The Preview tab shows the formatted heading and list inside the same waiver dialog before save.After
Customer waiver
Screenshot
Customers receive safe, readable formatted terms
The public WaiverPanel story renders Markdown headings, bold text, a list, and an explicit HTTPS policy link. Live DOM inspection found two headings, three list items, the expected policy URL, and zero remote images.
The customer surface renders the same formatting vocabulary while retaining the acceptance controls and brand styling.After
Live browser scenarios
Table
The changed interactions were exercised through rendered Storybook surfaces
Observed states came from Chromium against the worktree's live CRM and widget Storybooks.
Scenario
Observed result
Formatted email composition
Source HTML returned to Design as one H2, two paragraphs, one strong merge field, and a two-item bullet list; the accessibility tree exposed all toolbar and mode controls
Asynchronously loaded advanced template
data-view became source; the textarea retained the exact table markup; the plain-text disclosure was expanded with the loaded alternative
Editor link click
The configured HTTPS link remained in the document; clicking it left the Storybook URL unchanged and the Chromium page count stayed 58 before and after
Waiver block formatting
A caret at the first line end changed the line to a complete ## heading and Preview rendered the same text in an H2
Customer waiver Markdown
Two headings, three list items, one HTTPS policy link, zero remote images, and the standard acceptance controls rendered
Confidence
Validation
Pass
Focused CRM editor tests
18 pass, 0 fail, 63 assertions across EmailComposer, MarkdownEditor, CampaignDialog, and HookDialog after rebasing onto current main
Pass
Focused customer waiver tests
15 pass, 0 fail, 62 assertions across WaiverPanel and WaiverStep, including line breaks, links, remote images, raw HTML, and document URL boundaries
Pass
Package type and build checks
Shared UI typecheck passed; CRM tsc and Vite production build passed; widgets Vite production build and both TypeScript projects passed
Pass
Dependency and formatting checks
bun install --frozen-lockfile reported no changes and Biome checked all 18 task-owned files without fixes
Pass
Independent regression review
Two independent review passes found advanced-state, duplicate extension, customer rendering, line-break, remote image, subject-limit, link-policy, and block-formatting defects. All were corrected; the focused follow-up found no remaining issue in those paths.
Limits
Known issues, risks, and gaps
One intentional compatibility boundary and one bundle-cost tradeoff remain
Design mode cannot round-trip arbitrary email markup Unsupported tags, attributes, comments, and template control blocks open in HTML mode by default. Authors can deliberately choose Design, but the composer warns that unsupported markup may be simplified. Focused tests pin the conservative compatibility detector.
Rich authoring adds client bundle weight The CRM now includes TipTap and the widget includes Markdown rendering. The rebased production builds completed successfully; Vite reported a 3,648.54 kB CRM JavaScript asset before gzip and a 974.51 kB widget IIFE, 1,092.11 kB and 277.10 kB gzip respectively.