From 8a3da81b8c7ec545c38379e2884c2d22aa37af5b Mon Sep 17 00:00:00 2001 From: Dave Date: Wed, 25 Feb 2026 15:51:08 +0000 Subject: [PATCH] story-kit: create 188_story_render_matrix_bot_messages_with_html_formatting --- ...atrix_bot_messages_with_html_formatting.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .story_kit/work/1_upcoming/188_story_render_matrix_bot_messages_with_html_formatting.md diff --git a/.story_kit/work/1_upcoming/188_story_render_matrix_bot_messages_with_html_formatting.md b/.story_kit/work/1_upcoming/188_story_render_matrix_bot_messages_with_html_formatting.md new file mode 100644 index 0000000..280be59 --- /dev/null +++ b/.story_kit/work/1_upcoming/188_story_render_matrix_bot_messages_with_html_formatting.md @@ -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