Skip to content

fix(chat): preserve delivered plain text verbatim - #181

Open
rudycelekli wants to merge 1 commit into
Merit-Systems:mainfrom
rudycelekli:fix/preserve-delivered-plain-text
Open

rudycelekli wants to merge 1 commit into
Merit-Systems:mainfrom
rudycelekli:fix/preserve-delivered-plain-text

Conversation

@rudycelekli

Copy link
Copy Markdown

Problem

The shipped send_message tool promises plain text delivered exactly as written. The default iMessage transcript sends its text through a Markdown renderer: literal stars and backticks disappear, numbered notes become a list, and an old hard-break conversion changes trailing spaces.

Change

Render user-visible text as plain text with its original whitespace. Keep bare HTTP(S) URL segments in the existing MessageResponse renderer, including its external-link confirmation. Remove the producer's Markdown-only newline conversion. Full trace retains intentional Markdown rendering; attachment and input-request branches retain their existing behavior.

Evidence

  • The actual registered send_message tool accepts and returns the exact ordinary text; its owning test exercises that producer. The route-colocated test exercises the actual delivery projection and React server renderer with valid shipped output.
  • Same final fixture on unchanged production source: 5 fail / 37 pass. Patched source: 42/42 pass, across five existing test files. Controls cover ordinary text, HTTP links, trace Markdown, contact delivery and attachments, failed-send filtering and existing projection.
  • Native Chromium renders the original ChatConversation/AgentMessage/MessageResponse with the installed Eve message reducer and completed send_message fixture events. Baseline loses stars, backticks, numbered-note punctuation and two trailing spaces before a newline. The fix retains exact text content in all seven cases; ordinary filename/prose, an inline URL, trace narration and the real external-link confirmation retain their controls.
  • Chromium innerText inserts paragraph separators around the retained URL renderer. Native Range measurements confirm the surrounding text and URL occupy the same physical line, with wrapper/paragraph computed inline; textContent matches the original. The fixture supplies only the relevant whitespace/inline utilities, not a full Next deployment.
  • Focused repository Oxlint with type-aware rules passes.
  • Unchanged owned-fork Checks on exact signed head 367ef598e5e1de557f68fdb285aa1f21b0bbf68a: frozen installation, full pnpm check (6 tasks; 95 files / 885 tests), and complete pnpm test:runtime (2 evaluations / 13 gates), including post-job cleanup. Its actual merge checkout 05f17388662056e0959ee8790dc82e461946d239 has the identical source tree.
  • Supplemental owned-fork production build checks out and verifies that exact signed source head, installs with the frozen lockfile and passes actual pnpm build (1 task; 14 generated static pages). It uses fresh public installation fixtures and an owned helper workflow outside this patch. No upstream workflow or dependency change.

Overlap and limits

Fresh overlap records include all 23 open PR bodies and the full #169/#170 diffs. #169 rewrites the transcript projection, removes the separate delivery map and retains the hard-break conversion and unchanged parts Markdown renderer; it does not correct this plain-text formatting behavior. Its producer/test changes will require adapting this small newline-conversion removal if it merges first. #170 adds a messaging provider and retains the same plain-text tool contract.

No live model, provider account, channel network delivery or deployed application claim. Local heavy builds were held by shared-host disk exhaustion; the exact hosted required commands above passed. Upstream workflow authorization is separate and no pending upstream check is claimed green.

AI assistance was used for investigation, implementation, tests and source review under the submitting account. Signed DCO commit included.

Signed-off-by: Rudy Celekli <rudy@gradiahq.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant