Skip to content

Render Markdown in browser chat messages - #33

Merged
storytellerF merged 1 commit into
storytellerF:mainfrom
AgentStart1:codex/web-message-markdown
Oct 3, 2026
Merged

storytellerF merged 1 commit into
storytellerF:mainfrom
AgentStart1:codex/web-message-markdown

Conversation

@AgentStart1

Copy link
Copy Markdown
Contributor

Summary

Render Markdown in browser chat messages instead of showing formatting syntax as plain text. Support headings, emphasis, lists, quotes, fenced code, tables, links, and images while keeping the copy button's output as the original Markdown.

Parse each incoming message once in the existing Worker with a locally bundled markdown-it 15.0.2. Raw HTML stays disabled, dangerous URL validation remains enabled, and sender-supplied HTML fields are ignored. Links open separately with noopener noreferrer. Include upstream license notices and a reproducible vendoring script.

Keep long messages inside the scrollable message log so the composer stays visible on phones. Code blocks and tables scroll horizontally without widening the page.

This builds directly on merged PR #32 and contains only the Markdown increment. No CI workflow changes.

Validation

Completed locally during implementation:

  • 10 web Host and Markdown tests passed, covering formatting, unsafe HTML/URLs, sender-supplied HTML, and preservation of original text.
  • Chromium desktop/mobile regression passed, including Markdown rendering, raw-text copy, long code blocks, composer visibility, untrusted payloads, reconnect, and existing file/login flows.
  • :app:testDebugUnitTest --tests '*WebPagesTest' passed, including real Ktor serving of the parser modules with JavaScript MIME types.
  • :app:assembleDebug passed.

Browser interaction checks use mock HTTP/SSE/WebSocket endpoints; real Ktor resource serving is checked separately on the JVM. Installed-device end-to-end testing and Alpha/Release builds were not run for this change.

@storytellerF
storytellerF merged commit d220bfe into storytellerF:main Oct 3, 2026
1 check passed
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.

2 participants