diff --git a/webui/src/components/MarkdownTextRenderer.tsx b/webui/src/components/MarkdownTextRenderer.tsx index 9c5019d43..5f8849a09 100644 --- a/webui/src/components/MarkdownTextRenderer.tsx +++ b/webui/src/components/MarkdownTextRenderer.tsx @@ -714,11 +714,13 @@ export default function MarkdownTextRenderer({ > by the markdown renderer's - custom `table` component (see MarkdownTextRenderer); min-w-max on the -
keeps natural column widths so it scrolls instead of shrinking. */ + /* Markdown tables wrap cell text to fit the conversation column. The + renderer's overflow-x:auto wrapper remains a fallback for content that + cannot shrink. */ /* Clip any residual horizontal bleed at the thread column edge. Vertical scrolling and internal code-block scroll are unaffected. */ diff --git a/webui/src/tests/markdown-text-renderer.test.tsx b/webui/src/tests/markdown-text-renderer.test.tsx index 142f4921c..a17cd9c61 100644 --- a/webui/src/tests/markdown-text-renderer.test.tsx +++ b/webui/src/tests/markdown-text-renderer.test.tsx @@ -483,7 +483,16 @@ describe("MarkdownTextRenderer", () => { expect(surface).toHaveAttribute("role", "region"); expect(surface).toHaveAttribute("tabindex", "0"); expect(surface).toHaveAccessibleName("Data table"); - expect(screen.getByRole("table")).toHaveTextContent("nanobot"); + const table = screen.getByRole("table"); + expect(table).toHaveTextContent("nanobot"); + expect(table).not.toHaveClass("min-w-max"); + expect(table).toHaveClass( + "table-fixed", + "[&_th]:whitespace-normal", + "[&_th]:[overflow-wrap:anywhere]", + "[&_td]:whitespace-normal", + "[&_td]:[overflow-wrap:anywhere]", + ); expect(container.firstElementChild).toHaveClass("space-y-4"); expect(container.firstElementChild).not.toHaveClass("space-y-0"); });