Skip to content

feat: Pele renderer support — WYSIWYG editing over Obsidian's Pele - #48

Open
caseyg wants to merge 21 commits into
inkeep:mainfrom
caseyg:pele-renderer-poc
Open

caseyg wants to merge 21 commits into
inkeep:mainfrom
caseyg:pele-renderer-poc

Conversation

@caseyg

@caseyg caseyg commented Nov 2, 2026

Copy link
Copy Markdown

Summary

Adds Pele (Obsidian's from-scratch Mermaid renderer) as a second renderer for Visimer's WYSIWYG canvas. An app passes peleAdapter(pele) from @visimer/dom instead of its mermaid instance and gets the full point-editing experience over Pele-rendered SVG. Core, CodeMirror, and Monaco are untouched (one exception: a type-union widening for Diagnostic.source); the Mermaid path is preserved call-for-call and proven by the unmodified existing suites.

Try it: pnpm dev → playground → toggle Mermaid | Pele in the top bar.

What's in it

Renderer seam (PoC): RendererAdapter + mermaidAdapter/peleAdapter in @visimer/dom; MermaidCanvasView routes render/validate/diagnostics through it; optional renderer prop on the React components; pele stays a peer-level dependency (packages never import it — PeleLike is a hand-written structural interface).

Correlators (full coverage): every diagram type that is editable under Mermaid is now editable under Pele — state, class, ER, pie, gantt, sequence, and the 15 line-item types, joining the flowchart correlator from the initial seam. Each maps Pele's documented data-id/pele-* SVG contract onto the existing Correlation/SequenceCorrelation shapes, so gestures, popovers, and shared undo work unchanged.

  • Core anchors every zip; Pele's index/count-style ids are hints only; ambiguous matches degrade both sides to view-only — never a wrong pairing
  • Scenery core has no entity for ([*] states, sequence activations/fragments, gantt gridlines) is never tagged
  • Mermaid-only affordances gate under Pele instead of silent no-ops (edge animation — Pele's style allowlist drops animation-*); class-member editing gains an overlay-editor fallback under Pele
  • Design + implementation plan live in docs/superpowers/ (spec, plan, and per-task review trail)

Known limitations (documented in README/TESTING.md, deliberate)

  • zenuml doesn't render under Pele (external plugin — Pele doesn't support external diagrams)
  • architecture (~1/8 items), gitgraph branch statements, and c4 relationship lines remain view-only pending a core firstBracketed extractor fix (affects both renderers — follow-up)
  • Pele labels are SVG <text>, so in-place contenteditable becomes the overlay editor under Pele

Testing

  • dom suite 144 tests (was 25 at branch start), including ~101 pele-correlator fixtures that render real Pele output (metrics fallback works under jsdom) against real core parses, with per-family adversarial cases (invisible-edge phantom buckets, underscore-id ambiguity, duplicate labels, index-shifted sequence zips)
  • core 84 / codemirror 6 / monaco 7; all 8 workspace typechecks; playground vite build
  • Existing mermaid suites pass unmodified (byte-identical mermaid path)
  • TESTING.md updated: the pele-side correlation seam now has automated fixtures (mermaid-side remains manual, as before)

Every task was implemented and reviewed by separate agents (task-scoped reviews + a whole-branch review); mis-pairing paths found during review are pinned by adversarial fixtures, not just fixed.

@caseyg
caseyg deployed to inkeep-oss-sync November 2, 2026 00:16 — with GitHub Actions Active
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

Thanks for the contribution!

What happens next:

  • A maintainer will review your PR.
  • If you don't hear back within a few business days, please comment here to nudge our team.
  • This repository is maintained through an internal mirror. When your change is accepted, this PR will close automatically. Don't be alarmed when it closes — that's how it merges, and your authorship is preserved.

This branch was successfully deployed

1 active deployment
inkeep-oss-sync — 7ab3d812 Deployed Nov 2, 2026 by caseyg via sync #90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant