markdown-tui-explorer 1.9.2

A terminal-based markdown file browser and viewer with search, syntax highlighting, and live reload
# Roadmap

Tracked list of planned features for `markdown-tui-explorer` (the TUI app)
and `mermaid-text` (the standalone library). Items here are
**considered** or **in progress**; shipped work moves to the relevant
crate's `CHANGELOG.md`.

When picking what to work on next: skim this file first. When agreeing
on a new feature, add it here. When shipping, remove the entry (and let
the CHANGELOG be the historical record).

---

## In progress

_Nothing actively in progress._

---

## Next up (ordered roughly by ROI)

### `classDef` + `:::className` shorthand — `mermaid-text`

Completes the color story from 0.4.0. Define a palette once
(`classDef cache fill:#234`), reuse across many states/edges
(`A:::cache, B:::cache`). Free upgrade for both flowcharts and state
diagrams. Wire into the existing `Graph::node_styles` /
`edge_styles` registries. ~1 day.

### Notes anchored to states — `mermaid-text`

`note left of X : text`, `note right of X : text`, `note over X : text`,
multi-line block form `note left of X / … / end note`. Render as a
small box connected to the target state by a dotted edge. The dotted
edge style + the A* router that handles arbitrary endpoints already
exist; this is mostly parser + edge synthesis. ~1 day.

### Sequence diagram polish — `mermaid-text`

Wire up the four parser TODOs that currently silently skip:
- `autonumber` directive — number messages 1, 2, 3, …
- `note over X` / `note left of X` / `note right of X` — render note
  boxes anchored to lifelines.
- `activate X` / `deactivate X` — draw activation bars on lifelines
  (vertical thick lines indicating active periods).
- Block statements (`loop`, `alt`, `opt`, `par`, `critical`, `break`,
  `rect`) — render labelled bracket boxes around groups of messages.

Each piece is contained but the pile is ~2-3 days total.

---

## Bigger ideas

### `pie` charts — `mermaid-text`

Smallest new diagram type. `pie title Pet Counts \n "Dogs" : 386 \n
"Cats" : 85`. Render as either a horizontal bar chart or labelled
slices. ~200 LOC.

### Concurrent regions `--``mermaid-text`

State-diagram `state X { region1; --; region2 }` for orthogonal
sub-state-machines. Needs a new layout primitive ("two layouts
side-by-side in one container"). The hardest item on this list —
deserves its own design pass. Multi-day.

### `erDiagram``mermaid-text`

Most-requested missing diagram type for documentation use. Entities
with attribute lists, relationship cardinalities (`||--o{`),
foreign-key arrows. Substantial — entity boxes have internal
structure (header + attribute rows), and the relationship notation
is its own mini-language. Multi-day.

### `gantt` / `journey` / `classDiagram``mermaid-text`

Each is its own decent chunk of work. Lower priority than the above
unless someone asks. Multi-day each.

---

## Quality / polish backlog

### Edge-routing improvements

Dense graphs (e.g. the circuit-breaker FSM with 5 states + 3
back-edges) still produce visually busy outputs because A* is
greedy and doesn't optimise for label space. Better routing would
benefit every diagram. Hard, mostly-invisible-when-it-works.

### Composite-edge attach-to-border (state diagrams)

Today `Composite --> X` is rewritten at parse time to point at the
composite's synthesised inner `[*]` end. Works, but the arrow lands
on the inner marker rather than the composite border. A renderer
extension that lets edges target subgraph IDs (currently silently
dropped — see `crates/mermaid-text/src/render/unicode.rs:477`)
would let the arrow attach to the border like Mermaid's own
renderer does. Medium effort, would need new edge-routing logic.

### Per-composite direction-aware fork/join orientation

`mermaid-text` 0.7.2 ships fork/join shapes resolved from the
top-level graph direction. A composite with `direction TB` inside
an LR top-level diagram gets the wrong orientation (LR's vertical
bars instead of TB's horizontal). Fix needs the parser to track
each fork/join's enclosing composite path and resolve orientation
from the relevant composite's direction (or fall back to the
top-level). Small change, low priority unless someone hits it.

### Wider fork/join bars

Real Mermaid renders fork/join bars as filled rectangles several
cells thick. v1 uses single-cell-thick `━` / `┃`. A real "filled
thick bar" would need a new primitive (multi-row block fills) and
edge-routing changes to attach edges along the bar's long edge
rather than its midpoint.

### `<<choice>>` rendering without label for unnamed choices

Mermaid hides labels for unnamed choices; we still render the
state ID inside the diamond. Detect "synthetic" / placeholder IDs
and skip the label, or accept an explicit empty-label hint.

---

## Done since 1.7.1 (recent history — see CHANGELOGs for detail)

- **0.7.2**: `<<choice>>` / `<<fork>>` / `<<join>>` shape modifiers
  for state diagrams (Diamond / direction-perpendicular Bar).
- **0.7.1**: edge-label collision avoidance (labels stop overwriting
  node interiors).
- **0.7.0**: state diagrams default to LR (was TB) for better text
  output.
- **0.6.0**: composite states `state X { … }` with recursive nesting,
  per-composite `[*]` scope, external-edge rewrite, back-edge
  perimeter connectors, orphan-marker GC.
- **0.5.0**: `stateDiagram` / `stateDiagram-v2` support.
- **0.4.0**: ANSI 24-bit color output (opt-in).
- **markdown-tui-explorer 1.8.1 / 1.8.2 / 1.9.0 / 1.9.1**: layout-height
  fix, scroll-inside-mermaid fix, transitive bumps for the above.