Repository navigation
Description
Bug: bulk Inbox messages interpret plain text as HTML
Candidate inbox-bulk-plaintext-as-html-20260929 · P2 · one content-format contract defect. Source f406afc4aa0d4b916d6f09ff9781400a92d7f4d0; live main matched this exact SHA at final readback (2026-09-29T14:21:14.191414+00:00).
Reproduction
- Select one or more ordinary email conversations with valid recipient addresses. Open bulk Send messages.
- In its plain Message textarea, type
Use <price> from A&B.and press Send. - The real bulk hook passes that exact raw string as
content. Rendering that recorded content in the actual Message/EmailPreview producesUse from A&B.: the literal<price>disappears because it is parsed as markup. - Repeat with two textarea lines,
First lineandSecond line. The recorded content contains a newline, but the actual message displaysFirst line Second linewith computedwhite-space: normal.
The native reply service independently queues both raw strings as contentType: 'HTML', with the exact raw string in body. The problem is not limited to the local bubble; the queued email representation also designates user-entered plaintext as HTML. No actual email was delivered or inspected at a recipient.
Expected: a plain textarea's literal characters and intentional line breaks survive both the sent-message representation and the outbound body. Serialize it using safe escaping and line-preserving markup, or carry an explicit plaintext type through the send contract. Do not fix just the preview while leaving the queued body typed as HTML.
Evidence and controls
bulk-format.browser.test.tsx: 4 Chromium cases pass. SimpleHello customer.survives; correctly escaped and paragraph-marked rich HTML preserves<price>and a paragraph break; raw bulk text loses the placeholder and collapses newlines.bulk-format.native.test.ts: 3 native boundary cases pass. It records queued raw-placeholder, raw-multiline and correctly escaped rich-HTML bodies, each typed HTML. Database/provider/network calls are zero.browser.replay.log,native.replay.log; screenshotsbulk-literal-placeholder-lost.png,bulk-lines-collapsed.png.- Combined runs also revalidate the existing bug(platform): bulk Inbox Send rejects valid API conversations #3912 API email gate in 4 Chromium + 3 native cases. Those 7 auxiliary cases are not new findings. Total final runs: 8 Chromium + 6 native cases, exit 0.
Source
services/platform/app/features/conversations/components/bulk-send-dialog.tsx:47: raw trimmed textarea text goes to onConfirm; the input is a plain Textarea at line 49.services/platform/app/features/conversations/hooks/use-bulk-actions.ts:208: rawbodyis passed ascontentat line 211 without conversion or a format discriminator.services/platform/backend/core/conversations/reply_to_conversation.ts:25:splitHtmlTextalways returnshtml: content.services/platform/backend/domains/conversations/send.ts:504: reply uses that split; lines 323–324 select its nonempty HTML as queued body and set contentType HTML.packages/ui/src/components/data-display/email-preview.tsx:453: the readback renders the sanitized HTML. Sanitizing custom tags is expected here; the wrong format entered upstream.
Dedup
Checked baseline 102, accepted ledger 109, current issue searches and all-state PR searches in the retained JSON snapshots. #2047/#2234 cover the prior hardcoded placeholder/non-delivery implementation. #2839 improved the rich Milkdown path's HTML fidelity, not this plain bulk textarea boundary. #3225 covers queue/send integrity. #3905 changes bulk failure-summary reasons and leaves this content path intact. #3912 is the API-recipient eligibility gate. No equivalent literal-text/linebreak bulk report or repair was found. The two manifestations here count once.
Replay
From /Users/yannick/.codex/notes/tale-1000-additional/inbox-current-next/checkout/services/platform:
bunx vitest --config /Users/yannick/.codex/notes/tale-1000-additional/inbox-current-next/vitest.browser.config.ts run --reporter verbose
bunx vitest --config /Users/yannick/.codex/notes/tale-1000-additional/inbox-current-next/vitest.native.config.ts run --reporter verboseLimits
- Chromium runs actual BulkSendDialog, useBulkActions, Message, EmailPreview, shared dialog/textarea/i18n and browser HTML rendering. The mutation hook is a recorder; the small harness mounts a Message from exactly its recorded content to represent the successful message readback. It does not run the full Inbox shell, actual HTTP adapter, backend reads or provider delivery.
- Native replay runs actual replyToConversation and its transactional send/queue core. SQL row responses, thread credential resolution, enqueue, pending-draft completion, audit and realtime hints are controlled fixtures. The queue record proves the selected body/contentType; no actual SQL or job is written. fetch throws if called; provider and API delivery spies stay at zero.
- The rich-HTML positive control supplies an escaped, paragraph-marked body directly to the actual Message component and native queue boundary. It does not test the Milkdown editor. The formatting candidate path is entirely outside Milkdown.
- Existing external dependencies are symlinked from the shared installation; @tale package links target this exact current checkout. Vitest 4.1.11/browser 4.1.10 warning retained. The separate bug(platform): bulk Inbox Send rejects valid API conversations #3912 ordinary-reply revalidation uses installed Milkdown 7.20.0 although main requests 7.21.3; no lifecycle claim is made from that auxiliary test.
- Screenshots use the component harness without full application CSS. DOM, innerText and EmailPreview inline styles establish the content/whitespace observations; no full-app layout or actual recipient-email rendering claim.
- Initial harness logs are retained: missing useToast export in a mock, and JSX decoding an entity-bearing control string before it reached the component. Both were corrected only in the scratch fixture; final observations and controls pass.
- No source/product edits, production/shared Chrome, provider, database, deletion or publication action. Checkout remains clean.
Coordinator verification
The coordinator inspected the actual textarea, bulk hook, splitHtmlText and native queue typing; independently reran all 8 Chromium and 6 native cases with exit 0 (parent-browser.log, parent-native.log); and reviewed nearby issue/PR dedup. Seven cases concern this new format defect; seven revalidate #3912 without adding a finding. Main still matched the tested full SHA before publication.
Activity
fix(platform): let bulk Inbox Send reach API threads and keep refusals