Skip to content

Focused Mermaid chat rendering with source fallback and browser coverage #782

Closed

Description

@kilhyeonjun

Problem and scope

Completed Mermaid fences currently stay code in chat. I would like to contribute a focused Mermaid-only implementation against current main, with the existing code/source view preserved. #616 already explores Mermaid and Markdown images; this proposal deliberately keeps file previews/images outside the change and offers the rendering/fallback/verification work as a focused alternative or material to combine.

Proposed behavior

  • Lazy-load a pinned Mermaid 11.16.1 renderer, keeping the initial page free of its diagram payload and avoiding v12's default ELK load for ordinary flowcharts.
  • Render completed, explicitly marked Mermaid fences; preserve source while streaming or on unsupported, oversized, malformed or unavailable render input.
  • Offer diagram/source switching, original-source copy and a keyboard-accessible expanded view with zoom and fit.
  • Serialize configuration and rendering, clean up only an owned temporary container, discard stale results, and bound input, pending jobs and SVG cache.
  • Use fixed strict configuration and SVG image output, with application-side input/output limits and no external diagram service.
  • Add actual-library browser regressions covering multiple diagrams, Korean, themes, streaming, stale results, failed lazy loading, mobile controls and same-origin/external resource requests; include dependency notices and CI registration.

Coordination

Owner: @kilhyeonjun, assisted by Codex. Branch/worktree: feat/mermaid-chat-20261011 in an isolated contributor worktree. Start SHA: 2f6bb46. Dependencies: none of my other PRs. Status: design independently reviewed; implementing and verifying. Maintainer feature/overlap decision remains open, so the initial PR will be a draft.

I will reference #616 in the PR and disclose the pinned-library payload, supported input boundaries and verification results. No release or main merge is requested.

Activity

  1. devswha commented on Oct 12, 2026

    @devswha
    Owner

    The parts of this issue that main already covers are done. The remaining work moves to #903, so this issue can close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions