Skip to content

fix: render markdown in chat answers and load Monaco on task pages - #4

Merged
Bogdusik merged 2 commits into
mainfrom
fix/chat-markdown-and-editor
Nov 19, 2026
Merged

Bogdusik merged 2 commits into
mainfrom
fix/chat-markdown-and-editor

Conversation

@Bogdusik

Copy link
Copy Markdown
Owner

Summary

  • Chat: Message only parsed fenced code, so answers showed raw **asterisks**, ### and list markers. It now renders headings, ordered and bulleted lists, bold, inline code and fenced code as React elements, which also removes dangerouslySetInnerHTML: model text is never parsed as HTML.
  • Task editor: the Content-Security-Policy blocked Monaco's loader, CSS and codicon font from cdn.jsdelivr.net, so task pages fell back to a plain textarea. jsDelivr is now allowed in script-src, style-src and font-src.

Test plan

  • 6 new Message tests (bold, inline code, lists, headings, code blocks, HTML stays text); 179 tests pass locally (openai.test.ts needs DATABASE_URL, set in CI)
  • npm run type-check
  • After deploy: a chat answer renders formatting; a task page shows the Monaco editor with highlighting

@monaco-editor/react loads Monaco's loader, CSS and codicon font from
cdn.jsdelivr.net, which the Content-Security-Policy blocked, so task
pages fell back to a plain textarea with no syntax highlighting.
Message only parsed fenced code blocks, so answers showed raw
**asterisks**, ### hashes and list markers. Render a small Markdown
subset (headings, ordered and bulleted lists, **bold**, `code`, fenced
code) as React elements, which also drops dangerouslySetInnerHTML:
model text is never parsed as HTML. Tests cover each element and that
HTML in an answer stays text.
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
programming-helper-ai Ready Ready Preview Nov 19, 2026 3:20pm UTC

@Bogdusik
Bogdusik merged commit 8415fe4 into main Nov 19, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — c1a9aa6e Deployed Nov 19, 2026 by vercel[bot]
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.

1 participant