Skip to content

Mermaid diagram rendering + file-finder fix (v0.1.5) - #7

Merged
dsaad68 merged 8 commits into
mainfrom
mermaid
Jun 22, 2026
Merged

Mermaid diagram rendering + file-finder fix (v0.1.5)#7
dsaad68 merged 8 commits into
mainfrom
mermaid

Conversation

@dsaad68

@dsaad68 dsaad68 commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

Adds native Mermaid diagram rendering, fixes a file-finder bug, and bumps the version to 0.1.5. Merged on top of main (v0.1.4), preserving the inline-edit/cursor feature.

Added — Mermaid diagrams

  • ```mermaid fenced blocks now render as ASCII/Unicode art instead of plain source: flowcharts (graph/flowchart TD/LR with labeled, chained & grouped edges, subgraph, classDef) and sequenceDiagram.
  • Implemented as a self-contained native Swift port of mermaid-ascii (MIT) in a new MermaidRenderer module — no external binary. Unsupported diagram types / parse errors fall back to the highlighted code block.
  • Configurable via mermaid (on/off) and mermaid-charset (unicode/ascii).
  • Robustness fixes from review: malformed lines fall back instead of rendering bogus nodes; CRLF handling; operators inside […]/"…" labels aren't treated as syntax; classDef spaced-style parsing; display-width-safe sequence rendering.

Changed

  • Fenced code blocks (and mermaid cards) now render as a complete box (top rule + left/right borders + floor), spanning the full text column.

Fixed — file finder

  • Typing a filter containing q/Q/c no longer quits the app (and j/k/g/G no longer move the selection instead of typing). Filtering is now modal: press / to focus the search box, where every printable key types; list/navigation keys work outside it.
  • Ctrl-C is no longer mis-decoded as a literal c (it is delivered as SIGINT).

Docs / tooling

  • README intro now mentions Mermaid rendering; Credits note it is inspired by and ported from mermaid-ascii.
  • CHANGELOG [0.1.5] section added above [0.1.4].
  • just linux-build recipe: build + test in a Swift 6.2 container.

Testing

  • macOS: just check green — SwiftFormat + SwiftLint (strict) clean, all tests pass (incl. 99 byte-exact mermaid-ascii goldens).
  • Linux (Docker swift:6.2, aarch64): builds and swift test --parallel passes. (The serial XCTest runner hangs on a no-TTY ppoll — a pre-existing swift-corelibs-xctest quirk unrelated to this change — so the recipe uses --parallel.)

🤖 Generated with Claude Code

dsaad68 and others added 8 commits June 22, 2026 09:02
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolve conflicts preserving both main's inline-edit/cursor feature and the
mermaid renderer + file-finder fixes:
- Version: 0.1.5
- PagerInput / Terminal+Keys: keep main's edit/cursor/Ctrl-S handling; finder
  Ctrl-C-vs-"c" fix retained (0x03 -> .other)
- KeyParserTests: keep both the Ctrl-C and Shift-arrow/Ctrl-S decoder tests
- CHANGELOG: new [0.1.5] section (mermaid + complete-box + finder fix) above [0.1.4]
- README: intro now mentions Mermaid rendering; Credits note it is inspired by
  and ported from mermaid-ascii
- justfile: add `linux-build` (Swift 6.2 container build+test)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The serial swift-corelibs-xctest runner blocks on a ppoll when stdin is not a
TTY (non-interactive container), so `swift test` never completes under Docker.
The parallel runner spawns a process per test and is unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dsaad68
dsaad68 merged commit 37c7677 into main Jun 22, 2026
3 checks passed
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