Repository navigation
Conversation
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
from
November 17, 2026 10:31
a63445a to
cec7d11
Compare
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
from
November 17, 2026 11:16
cec7d11 to
f72f04b
Compare
This was referenced Nov 17, 2026
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
2 times, most recently
from
November 17, 2026 12:27
8a4ddc8 to
80fb7ce
Compare
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
3 times, most recently
from
November 17, 2026 13:13
f302c40 to
c8213e9
Compare
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
2 times, most recently
from
November 17, 2026 13:26
c833ab9 to
56e3688
Compare
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
from
November 17, 2026 13:44
56e3688 to
167c111
Compare
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
from
November 17, 2026 15:28
167c111 to
199749c
Compare
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
from
November 17, 2026 16:26
199749c to
5e1281f
Compare
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
from
November 17, 2026 16:42
5e1281f to
68a3257
Compare
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
from
November 17, 2026 17:16
68a3257 to
6bed2b6
Compare
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
2 times, most recently
from
November 17, 2026 17:30
b11d293 to
dbf98cc
Compare
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
from
November 17, 2026 22:00
dbf98cc to
5838f8d
Compare
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
from
November 17, 2026 22:05
5838f8d to
858ff0f
Compare
allozaur
added a commit
that referenced
this pull request
Nov 17, 2026
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
from
November 17, 2026 22:21
858ff0f to
d4c1b0f
Compare
Assisted-by: Claude (Opus 5.5 Medium)
allozaur
force-pushed
the
allozaur/perf/ui-pele-diagrams
branch
from
November 17, 2026 22:35
d4c1b0f to
a45e545
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Llama Chat draws Mermaid diagrams with Pele instead of Mermaid.js. The app downloads a quarter less JavaScript at start (2.18 MB -> 1.62 MB gzipped), and diagrams now follow the light/dark theme switch.
Additional information
Part 12 of 13 of the work-in-progress stack on the fork, the top of it, based on
allozaur/perf/ui-import-cost(#74), which found Mermaid and its dependencies to be the largest part of the bundle (~2.9 MB raw).What changed
pele1.13.0 (MIT, no dependencies, from obsidianmd) replacesmermaid11.17.2, which drops 105 packages from the lockfile.renderMermaidDiagrams()renders eachpre.mermaidwith Pele's synchronousrender(), measuring labels with the block's own font after the page fonts load. On a narrow block (phones) Pele may turn a left-to-right flowchart top-to-bottom.--pele-*variables on:rootinapp.css, mapped to the theme tokens (code background, foreground, muted, border, primary, destructive). The SVG inherits them inline and inside the preview dialog's shadow root, so a theme switch recolors diagrams without a redraw. Mermaid baked its theme in at render time, so diagrams kept the old theme until the page reloaded..mermaidTooltiprule is gone.MarkdownContentgets a Diagrams story (flowchart, sequence, state, pie and a broken one) whose play test checks that four diagrams draw and the broken one shows its error.What's different from Mermaid.js, per Pele's compatibility page: its own layout engine (positions and edge paths differ), no Mermaid themes, no HTML labels, no ZenUML or other external plugins. All diagram types built into Mermaid 12.1.0 are supported;
clicklinks are filtered, callbacks ignored.Numbers
Mermaid was already behind
import(), butbundleStrategy: 'single'inlines dynamic imports, so it shipped at boot. Pele stays behindimport()too, so a latersplitbuild would load it only when a message has a diagram.Testing
ui/apps/chat:npm run check(0 errors),npm run lint, the 1085 unit tests, the Storybook tests (115 files, 252 tests, the new Diagrams story included) andnpm run buildpass.Context "Tooltip.Provider" not founderrors fromdialog-focus-mobilehappen on ui: drop the import costs that slowed Llama Chat's boot, tests and dev server #74 too.Requirements
Claude (Opus 5.5 Medium)