From fecc8a6bfd01dacea90bee6d9864527d26cf1714 Mon Sep 17 00:00:00 2001 From: Guilhem Date: Tue, 10 Nov 2026 22:52:56 +0100 Subject: [PATCH] fix: load mermaid diagrams without source flashes or layout jumps (#12319) * fix: load mermaid diagrams without source flashes or layout jumps Co-Authored-By: Claude Opus 5.5 * fix: use the shared skeleton for the mermaid placeholder Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- .../copilot/chat/script/MermaidDisplay.svelte | 121 ++++++++++++++---- 1 file changed, 97 insertions(+), 24 deletions(-) diff --git a/frontend/src/lib/components/copilot/chat/script/MermaidDisplay.svelte b/frontend/src/lib/components/copilot/chat/script/MermaidDisplay.svelte index d39ab52bf7..6635774248 100644 --- a/frontend/src/lib/components/copilot/chat/script/MermaidDisplay.svelte +++ b/frontend/src/lib/components/copilot/chat/script/MermaidDisplay.svelte @@ -1,27 +1,60 @@ - + + -{#if showSvg} -
+{#if showSource} +
{code}
+{:else if svg === undefined} + +
+ +
+{:else} +
-{:else} - -
{code}
{/if}