Skip to content

feat(tui): render Mermaid GitGraph diagrams - #42179

Merged
kitlangton merged 2 commits into
v2from
merman-gitgraph
Aug 13, 2026
Merged

feat(tui): render Mermaid GitGraph diagrams#42179
kitlangton merged 2 commits into
v2from
merman-gitgraph

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Render Mermaid gitGraph fences as terminal-native vertical commit graphs in OpenCode.

○    baseline
│╲
│ ○  extract-seam Extract seam
│ │
│ ○  add-tests  (refactor, tag: ready)
│ │
○ │  unrelated-fix
│╱
◎    land-refactor  (main, tag: v2)

The vertical layout follows terminal Git graph conventions: branches staircase outward, remain vertical while active, and collapse directly into merge nodes without dangling corner glyphs.

How

  • Adds parsing for commits, branches, checkout/switch, merges, IDs, messages, tags, commit types, branch ordering, comments, titles, and accessibility metadata.
  • Preserves final branch heads and validates invalid branch and merge operations with source diagnostics.
  • Renders semantic commit types and colored branch lanes with auxiliary rows for wide transitions.
  • Integrates detection, themed Markdown rendering, streaming fallback, and tests.
  • Keeps the implementation synchronized byte-for-byte with the stacked @opentui/mermaid implementation.

Scope

  • This PR is stacked on feat(tui): render Mermaid timelines #42130 and contains only GitGraph support beyond that branch.
  • Mermaid orientations are preserved while terminal output intentionally uses a vertical layout.
  • cherry-pick is explicitly rejected for now.

Testing

  • bun run test in packages/merman: 324 passed
  • bun run typecheck in packages/merman
  • Full 39-package push-hook typecheck
  • GitGraph family is byte-for-byte synchronized with OpenTUI

@kitlangton
kitlangton changed the base branch from merman-timeline to v2 August 12, 2026 23:55
@kitlangton
kitlangton enabled auto-merge (squash) August 12, 2026 23:58
@kitlangton
kitlangton merged commit 9b805c1 into v2 Aug 13, 2026
6 of 8 checks passed
@kitlangton
kitlangton deleted the merman-gitgraph branch August 13, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant