Repository navigation
Replace Mermaid with Pele while preserving shape threads - #3168
Merged
Merged
Conversation
Keep authored node identities across flowchart, state, class, entity and sequence diagrams. Render from explicit semantic models without shared parser serialization, and retain inert SVG, live palette colors and offline exports. Adapt Pele rich labels so unsupported HTML-looking tags remain safely escaped literal text rather than disappearing.
leaf-agent
approved these changes
Oct 19, 2026
This was referenced Oct 19, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 19, 2026
Pele's SVG classes and diagram sizes left four browser checks on unreachable or uncovered targets. This updates their fixtures to exercise painted nodes, a scrollable drawing at the narrow width, and a second reaction target clear of the floating card. The checks still test aim, available room, edge fade, and action bar placement through real browser input. These four cases failed on current `main` before the change and pass together after it (`4 passed` in the focused browser run). The changed drawing geometry follows [#3168](#3168), which replaced Mermaid with Pele. [Failed main CI run](https://github.com/max-sixty/leaf/actions/runs/39321098548). --------- Co-authored-by: leaf-agent <[email protected]>
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.
Replace the diagram package's Mermaid renderer with Pele 1.6.0 while retaining Mermaid source syntax and threads attached to individual shapes. Leaf registers the same
node:<authored id>anchors from Pele's parsed models and rendered boxes across flowcharts, state, class, entity-relationship and sequence diagrams, including containers and nested states.Pele supplies parsing, layout and SVG generation in one lazy, offline-capable module. The renderer is 666 KB uncompressed (246 KB gzip), down from 5.25 MB (1.49 MB gzip). Leaf supplies its fonts and live light/dark palette, disables source links and images, and updates authored selectors and measured diagram heights in the examples and documentation. One vendoring adaptation preserves unsupported HTML-looking tags as escaped label text instead of silently dropping them; the upstream request is Pele #31, also reproduced on 1.7.0.
Validation: focused browser/model checks cover shape-thread submission, source revision and reload, keyboard and touch selection, all supported diagram families, duplicate identities, hostile labels, fonts, scheme changes, SVG definitions and lazy loading.
pnpm run checkcovers reproducible bundles, framework, runtime and Worker tests. Independent code review and a fresh browser user verified shape-thread behavior; before/after light and dark views were inspected.