Skip to content

Tighten TALA hierarchy spacing and stabilize branches and labels - #3025

Merged
alixander merged 6 commits into
masterfrom
fix/tala-hierarchy-readability
Nov 24, 2026
Merged

alixander merged 6 commits into
masterfrom
fix/tala-hierarchy-readability

Conversation

@alixander

@alixander alixander commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Human


AI

TALA now tries a tighter hierarchy using the winning seed, then compares the completed routes. It preserves padding inside containers, removes the outer row allowance in the compact candidate, and can shorten an unlabeled rank boundary crossed by one edge segment. A smaller candidate must improve the layout score and preserve the crossing, obstruction, node-overlap and text-occlusion metrics. A shared departure and a crossing inside two segments are counted separately.

After routing, interchangeable branches receive existing node positions and their attached paths in declaration order. The coordinates of the selected routes are preserved, including routes elsewhere in the graph. An isolated, unlabeled fan on two ranks also orders its existing port slots to keep arrows from crossing as they leave the hub. A directed split and rejoin can use three ranks when its own scope explicitly requests a direction. When greedy label placement leaves a collision, TALA can reposition a pair of automatic edge labels within the existing work budget.

Same D2 input Before After
Four parallel branches Three 120 px sibling gaps, 744 × 336 px Three 60 px gaps, 564 × 336 px
Symmetric three-team tree Two parents 15 px off center All parents centered
Six-stage chain Five 90 px rank gaps Five 60 px gaps
Add a ninth sibling 19 existing pairs reverse, one route crossing Existing order preserved, zero route crossings
Three parallel multiline labels One label overlaps the source by 34 × 31 px Clear in all four directions
Labelled two-by-two graph, rightward Two pairs of labels overlap Zero overlaps
Rightward service map 1293 × 534 px, zero crossings 1263 × 362 px, zero crossings

Across 140 generated DAGs, 74 drawings shrank and 66 retained their area. Median drawing area fell 10.3%. Strict segment intersections fell from 143 to 138, with no individual increase. Two inputs added a bend. In the 38-example controlled set, 30 shrank and eight retained their area. A separate 900-input comparison isolated the compact trial. It introduced no measured interior crossings or label, node, or route obstructions relative to the incumbent. One rendered width grew by one pixel despite smaller internal bounds.

Compaction costs up to one additional layout attempt. On a 70-node split and rejoin, the default three-seed CLI run took about 1.69 s versus 1.45 s locally. The candidate added two crossings, so TALA retained the wider layout. A 70-stage chain shortened from 9,850 to 7,780 px.

The second commit refreshes the TALA snapshots for seven repository fixtures. In the single-seed nested-grid fixture, a narrower grid causes the surrounding general layout to place another container differently, lengthening one connector from 130 to 263 px. The disconnected rich-text fixture still has an overlap between its code and plain-text labels.

During final review, placing equivalent branches before routing introduced extra crossings when a legend, edge label, or adjacent workflow changed the router’s choices. A comparison of 648 fans, split-and-rejoin workflows and embedded DAGs with master found no additional strict crossings, visible overlaps, or routes through unrelated nodes after the fix. With and without the final sibling reassignment, all 648 diagrams produced identical sets of oriented route points, rendered SVG connection paths and node boxes. Six additional diagrams preserved authored styling, IDs, constraints and attachment at both ends of all 108 edges.

An automatic split and rejoin can fit the initial size estimate and still exceed TALA’s 30,000 px limit during placement. When this happens, the engine retries ordinary placement with the same seed. All 52 diagrams in a near-limit comparison compiled, including wide and tall workflows and workflows inside containers. An explicitly requested hierarchy continues to enforce the size limit.

  • sent from alixander's Codex

@alixander
alixander merged commit d4aaefb into master Nov 24, 2026
16 checks passed
@alixander
alixander deleted the fix/tala-hierarchy-readability branch November 24, 2026 16:21
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