Repository navigation
Description
Summary
Markdown inside table cells on the workspace canvas is not rendered. A table block whose cells carry **bold**, `code`, or [link](https://example.com) shows the raw markdown characters instead of formatted text. The same is true for a ```table fence embedded in a markdown block, because both paths dispatch to the same cell renderer.
Only the structured table path is affected. A GFM pipe table written directly in markdown prose goes through marked (gfm enabled) and renders inline markdown correctly — so an agent sees two "tables" on the same canvas behaving differently, and the one the MCP tool guide recommends (table = {columns, rows}) is the one that does not format.
Context
Reported from the Workspace canvas. Root cause confirmed in code:
src/frontend/src/components/canvas/CanvasBlock.vuedelegateskind: tabletoReportRenderer(REPORT_DELEGATED_KINDSincanvasUtils.js), andCanvasMarkdown.vuedoes the same for a```tablefence segment.ReportRenderer.vuemapstable→src/frontend/src/components/reports/ReportTable.vue.ReportTable.vuerenders every cell with plain text interpolation ({{ cell(row, col) }});cell()stringifies the value and nothing runs it through a markdown renderer or sanitizer. Headers (<th>{{ col }}</th>) are plain text too.
Agents routinely put emphasis, inline code, and links in table cells (status columns, "see X" references, ticket links). Today those all leak as literal **/backticks/brackets.
Note the component is shared with reports (ReportRenderer is the single renderer for both, ent#537 / #1535), so a fix in ReportTable.vue changes report tables as well. That is probably desirable (same defect there), but the fix must keep the shapeOk / display-hint contract pinned by tests/unit/test_1535_report_prompt_guidance.py intact, and any rendered HTML must go through the existing DOMPurify entry points in src/frontend/src/utils/markdown.js (H-005) — no second sanitizer.
Reproduction
- From an agent (or via the MCP
set_canvastool) write a block:{"kind": "table", "title": "Repro", "payload": {"columns": ["Item", "Status"], "rows": [["**Deploy**", "`done` — see [runbook](https://example.com)"]]}} - Open the Workspace → agent → Canvas tab.
- Observe the cell text
**Deploy**and`done` — see [runbook](https://example.com)rendered literally. - Write the same content as a GFM pipe table inside a
markdownblock — it renders bold/code/link correctly. That inconsistency is the bug.
Acceptance Criteria
- Inline markdown (emphasis, strong, inline code, links, strikethrough) in
tableblock cells renders as formatted text on all three canvas surfaces (Workspace rail Canvas tab, Workspace agent page, Agent Detail Canvas tab). - The same holds for a
```tablefence inside amarkdownblock. - Links in cells get the same hardening as everywhere else (
target="_blank",rel="noopener noreferrer"), and the output passes through the existing DOMPurify configuration — no rawv-htmlof unsanitized cell content, no second sanitizer instance. - Block-level markdown in a cell (headings, lists, nested tables, fenced code) is either rendered inline-only or degrades to plain text — a cell must not break the row/column layout (bug(canvas): every block layout an agent can produce renders unbroken in the workspace column — gallery test + fixes #2583 layout bar).
- Non-string cell values (numbers, booleans, objects) keep their current rendering (
JSON.stringifyfor objects,String()otherwise);null/undefinedstill render empty. - Column headers are handled consistently with cells (either both render inline markdown or the decision is documented in the component).
- A unit spec in
src/frontend/tests/unit/covers: bold, inline code, a link in a cell; a raw<script>/<img onerror>payload in a cell is stripped; a numeric cell is unchanged. - Report tables (same component) are checked for regression —
npm run test:unitgreen, includingportalReportsRendering.spec.jsand the raw-color ratchet. - If the decision is made that cells should stay plain text instead, the MCP
set_canvaskind guide insrc/mcp-server/src/tools/canvas.tsand the platform prompt say so explicitly, and this issue is closed with that rationale.
Technical Notes
- Likely fix shape: render cells through an inline-only marked pass (e.g.
marked.parseInline) + the existingDOMPurifyconfig fromutils/markdown.js, exposed as a smallrenderInlineMarkdown()helper next torenderMarkdown/renderCanvasMarkdownso the policy stays in one home. Register any marked configuration inutils/markedConfig.js(the one configured parser, bug(workspace): code blocks in agent replies are unreadable — same-tint block, ~11px type, horizontal scroll — and nothing in the thread can be copied #2515). - Keep the
min-w-0/overflow-x-autobounded-viewport behaviour of the table wrapper; rendered links and code spans must wrap ([overflow-wrap:anywhere]already used byCanvasProse.vue). ReportTable.vuestill carries raw gray palette classes; do not increase the count (raw-color ratchet,src/frontend/raw-color-baseline.json). Prefer semantic tokens if touching those lines.- Adjacent, not duplicate: bug(canvas): every block layout an agent can produce renders unbroken in the workspace column — gallery test + fixes #2583 (canvas layout gallery, in-dev) and bug(workspace): tables, headings and lists in agent responses render unstyled — the transcript is the one markdown surface with no typography #2616 (transcript markdown typography) — neither covers markdown inside table cells.
Activity
dolho commentedon Sep 14, 2026
/claim
github-actions commentedon Sep 14, 2026
Claimed by @dolho. Label
status-in-progressadded.Next steps:
feature/2771-<short-slug>Fixes #2771fix(canvas): render inline markdown in table cells and headers (#2771)
fix(canvas): render inline markdown in table cells and headers (#2771)
fix(canvas): render inline markdown in table cells and headers (#2771)
fix(canvas): render inline markdown in table cells and headers (#2771)
fix(canvas): render inline markdown in table cells and headers (#2771)
fix(canvas): render inline markdown in table cells and headers (#2771)
fix(canvas): render inline markdown in table cells and headers (#2771) (
fix(asks): render agent markdown in asks, and show only waiting asks …