Registry Mirror
Skip to content

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

Ask AI answers in plan review, annotate and code review dropped markdown tables: the chat sanitizer's tag allowlist had no table tags, so DOMPurify removed the table structure and kept the cell text as one line.

  • Allow table, thead, tbody, tr, th, td and marked's align attribute (no style) in renderChatMarkdown.
  • Style tables in .ai-markdown (theme.css, used by both apps): theme-token borders, small padding, and sideways scroll for wide tables in the narrow panel.
  • Test: packages/ui/utils/aiChatFormat.test.ts checks every tag and attribute marked writes for a GFM table is allowed, and that no script, style or event handler is. happy-dom cannot host DOMPurify, so the real sanitizer was checked once in headless Chromium (table kept; script, img and onclick removed).
  • The guides.show viewer bundles theme.css, so its pinned manifest is synced.

Fixes #2069.

The chat sanitizer's allowlist had no table tags, so DOMPurify stripped a
GFM table and kept its cell text on one line. Allow table, thead, tbody, tr,
th, td and marked's align attribute, and style tables in .ai-markdown so a
wide one scrolls inside the narrow chat panel.

The guides.show viewer bundles theme.css, so its pinned manifest is synced.
@backnotprop
backnotprop merged commit e886995 into main Oct 22, 2026
41 of 42 checks 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.

Missing markdown table rendering in the chat sidebar

1 participant