Skip to content

Mermaid diagrams never render: artifact side panel shows raw HTML as text (macOS, VS Code terminal) #966

Description

@PetarVukovic

First off — I use jcode daily and it's great. This is the one papercut I keep hitting.

Problem

When the model produces a mermaid diagram, it never renders visually for me. The artifact side panel shows the raw HTML markup as plain text (<div>, <svg>, … printed literally) instead of a diagram or any readable fallback.

I'm genuinely unsure whether I'm missing a setting on my side or whether this is a bug, hence the issue rather than a PR.

Environment

  • jcode v0.76.0 (bbef1f6a8)
  • macOS (Darwin 25.2.0), Apple Silicon
  • Terminal: VS Code integrated terminalTERM=xterm-256color, TERM_PROGRAM=vscode

What I expect

I understand the VS Code terminal supports no inline image protocol (no kitty, no iTerm2, no Sixel), so I don't expect a real rendered diagram there. But I'd expect one of:

  1. the documented half-block / text fallback with the TERMINAL_IMAGE_FALLBACK_NOTE message, or
  2. at minimum the original mermaid source, which is readable,

instead of the generated HTML wrapper dumped as text — that's the least useful of the three, since it's neither a picture nor something a human reads.

Questions

  • Is there a config flag or env var to pick the fallback renderer explicitly for terminals with no image protocol?
  • Is native rendering in the artifact side panel expected to work at all in the VS Code terminal, or is a graphics-capable terminal (Ghostty / kitty / WezTerm / iTerm2) a hard requirement? If it's a hard requirement, saying so in the docs would already save people the guesswork.

Related

Happy to provide a repro session, logs, or test a patch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-infoWaiting on reporter for details/repro (distinct from unclear)triage: unclearCannot reproduce / insufficient infouxUser experience and usability improvements

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions