Render the CLI blueprint view as main graph + composite definitions #38

Closed
opened 2026-06-07 22:04:39 +02:00 by Brummel · 0 comments
Owner

The CLI blueprint view (render_blueprint in crates/aura-cli/src/graph.rs)
currently draws composites as ascii-dag subgraph cluster boxes with their
interiors expanded inline, one level deep — nested composites hit an
unimplemented! at graph.rs:75.

Two problems with the box model:

  • ascii-dag 0.9.1's subgraph level-centering rounds with /2, shifting
    sibling boxes by ~1 column; wide sibling labels then overlap
    ([SimpleMovingAverage(length)[SimpleMovingAverage(length)]). The garble is
    width/parity-sensitive and has no config or padding dodge that survives
    unequal-width siblings. The flat (non-subgraph) layout is collision-free at
    all widths. Bare-type labels only avoid it because aura's type names are
    short. Verified by reproduction 2026-06-07.
  • Expanding every composite inline does not scale: a large strategy, or a
    composite reused N times, produces a wall of nodes.

New model (Option 3b — "program with subroutines"):

  • Main graph: the harness wiring (sources + top-level items), each composite
    rendered as a single opaque node [name], flat layout (no subgraph boxes).
  • Definitions / where section: each distinct composite type rendered once
    as its own flat sub-graph, interior leaves expanded, nested composites again
    opaque with their own definitions (recursive).

Benefits: blueprint size tracks top-level wiring, not inlined node count, so
real strategies stay displayable; each composite type's body is rendered once
regardless of reuse; nested composites become natural (removes the
unimplemented!); the flat-only layout sidesteps the ascii-dag cluster bug.

Scope: render_blueprint only. render_compilat (flat, fully-inlined, C23)
stays unchanged. Interactive enter/focus navigation is the playground
counterpart, tracked separately in #37 — out of scope here.

Open spec-level details (naheliegende defaults, not forks): composite-type
dedup key = the name (a debug symbol; assumes same name ⇒ same structure);
opaque-node ports = input roles + one output, edges by slot, shown in a
definition as ⟨in:k⟩ / ⟨out⟩ markers.

The CLI blueprint view (`render_blueprint` in crates/aura-cli/src/graph.rs) currently draws composites as ascii-dag subgraph cluster boxes with their interiors expanded inline, one level deep — nested composites hit an `unimplemented!` at graph.rs:75. Two problems with the box model: - ascii-dag 0.9.1's subgraph level-centering rounds with `/2`, shifting sibling boxes by ~1 column; wide sibling labels then overlap (`[SimpleMovingAverage(length)[SimpleMovingAverage(length)]`). The garble is width/parity-sensitive and has no config or padding dodge that survives unequal-width siblings. The flat (non-subgraph) layout is collision-free at all widths. Bare-type labels only avoid it because aura's type names are short. Verified by reproduction 2026-06-07. - Expanding every composite inline does not scale: a large strategy, or a composite reused N times, produces a wall of nodes. New model (Option 3b — "program with subroutines"): - Main graph: the harness wiring (sources + top-level items), each composite rendered as a single opaque node `[name]`, flat layout (no subgraph boxes). - Definitions / `where` section: each *distinct* composite type rendered once as its own flat sub-graph, interior leaves expanded, nested composites again opaque with their own definitions (recursive). Benefits: blueprint size tracks top-level wiring, not inlined node count, so real strategies stay displayable; each composite type's body is rendered once regardless of reuse; nested composites become natural (removes the `unimplemented!`); the flat-only layout sidesteps the ascii-dag cluster bug. Scope: `render_blueprint` only. `render_compilat` (flat, fully-inlined, C23) stays unchanged. Interactive enter/focus navigation is the playground counterpart, tracked separately in #37 — out of scope here. Open spec-level details (naheliegende defaults, not forks): composite-type dedup key = the name (a debug symbol; assumes same name ⇒ same structure); opaque-node ports = input roles + one output, edges by slot, shown in a definition as `⟨in:k⟩` / `⟨out⟩` markers.
Brummel added the feature label 2026-06-07 22:04:39 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#38