story-kit: create 188_story_render_matrix_bot_messages_with_html_formatting

This commit is contained in:
Dave
2026-02-25 15:51:08 +00:00
parent 0877614a60
commit 8a3da81b8c

View File

@@ -0,0 +1,22 @@
---
name: "Render Matrix bot messages with HTML formatting"
---
# Story 188: Render Matrix bot messages with HTML formatting
## User Story
As a Matrix user chatting with the bot, I want messages to render with proper formatting (bold, lists, code blocks, etc.) so that responses are easy to read in Element and other clients.
## Acceptance Criteria
- [ ] Add pulldown-cmark dependency to server/Cargo.toml
- [ ] Create a markdown-to-HTML helper function in the matrix module
- [ ] Replace RoomMessageEventContent::text_plain(chunk) with text_html(plain, html) in the post_task at bot.rs:296-297
- [ ] Plain text fallback (body field) still contains the original markdown for clients that don't support HTML
- [ ] Existing paragraph-buffering and streaming behaviour is unchanged
- [ ] Unit test for the markdown-to-HTML helper covering bold, lists, inline code, and code blocks
## Out of Scope
- TBD