Inline image + Mermaid diagram rendering in the preview pane #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "worktree-mermaid-image-rendering"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Renders
![]()images and fencedmermaiddiagrams as real terminal graphics (Kitty/iTerm2 protocols) in the assembled-post preview pane, falling back to labeled text placeholders in unsupported terminals.Highlights
internal/graphicspackage: protocol detection, image decode/encode, mermaid rendering (mmdc CLI first, HTTP API fallback), a thread-safe LRU cache for remote fetches.bodyPreview()(glamour sanitizes raw-HTML nodes, so escapes are spliced in as text after rendering, not through the AST).tea.Cmd/Msgpattern so the render path never blocksView().ui.preview.allow_remote_images), and placeholder text never leaks a URL's query string or an underlying error's raw text.Review trail
Spec + plan each went through two independent external reviews before implementation (a multi-model consult and a manual second-opinion consult) — see
docs/superpowers/specs/2026-08-01-mermaid-image-rendering-design.mdand the companion-BUFFY-CONSULT.mdfile. All 7 implementation tasks passed individual review clean. The final whole-branch review found 2 Critical + 5 Important cross-task issues (cursor-movement policy desyncing the renderer, raw error text leaking into placeholders, two missing scan/cleanup wiring paths, and an incorrect tmux-passthrough assumption) — all fixed in one follow-up wave and independently re-verified.Known open item
Step 10 of the plan (manual verification in a real Kitty/WezTerm terminal — scroll a post with 2+ images, confirm no ghosting) could not be performed in the agentic environment (no interactive terminal available). Recommended before relying on this in daily use.
🤖 Generated with subagent-driven-development (Claude Code)