From a778a0b2f73f8a1e6bb87c07284f11026f3f4d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sat, 4 Jul 2026 23:33:16 +0200 Subject: [PATCH] feat(insights): render plain lists and bold in the AI prose surfaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The prose renderer knew only blank-line paragraphs, so a reply that enumerated options read as dash-prefixed text lines and a bold marker surfaced as literal asterisks. ProseBlocks now groups consecutive "- " lines into a real list and renders **bold** spans as strong text — pure string splitting over the trusted string, fail-closed on anything unclosed or unknown, still no markdown library. The Coach streaming renderer settles completed paragraphs through the same block renderer. --- .../insights/__tests__/prose-blocks.test.tsx | 26 ++++ .../insights/coach-panel/streamed-prose.tsx | 12 +- src/components/insights/prose-blocks.tsx | 124 ++++++++++++++++-- 3 files changed, 146 insertions(+), 16 deletions(-) diff --git a/src/components/insights/__tests__/prose-blocks.test.tsx b/src/components/insights/__tests__/prose-blocks.test.tsx index 65c20860d..1a58fe22d 100644 --- a/src/components/insights/__tests__/prose-blocks.test.tsx +++ b/src/components/insights/__tests__/prose-blocks.test.tsx @@ -84,6 +84,32 @@ describe("ProseBlocks", () => { expect(html).toContain("metric:WEIGHT"); expect(html).not.toContain('data-slot="inline-learn-link"'); }); + + it("groups consecutive '- ' lines into a real