diff --git a/CHANGELOG.md b/CHANGELOG.md index d7b6129..220a328 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) (pre-1.0: minor bumps may include breaking changes to the sim's behavior). +## [0.20.2] - 2026-07-07 + +### Fixed +- `aci-sim graph`: the single-row legend (role swatches + link-type samples) + clipped off the right edge on narrow diagrams (few nodes) — the SVG width + now accounts for the legend's minimum width. + +### Docs +- README: regenerated the embedded topology diagram with the v0.20 renderer + (solid ISN uplinks, link-type legend, physical-links table with /31 + point-to-point ISN addressing) + caption updated. + ## [0.20.1] - 2026-07-07 ### Docs diff --git a/README.md b/README.md index e2742cc..4d0e3f3 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,8 @@ from a single `topology.yaml`. *A 2-site, 15-node fabric rendered by `aci-sim graph` — spines (blue), leaves/border-leaves (green), controllers (amber), and the inter-site ISN -cloud (slate). See §5's `aci-sim graph` for how to generate your own.* +cloud (slate) — solid orange ISN uplinks, plus a physical-links table with +the /31 point-to-point ISN addressing. See §5's `aci-sim graph` for how to generate your own.* ### 60-second quickstart diff --git a/aci_sim/graph.py b/aci_sim/graph.py index da409c3..dda7237 100644 --- a/aci_sim/graph.py +++ b/aci_sim/graph.py @@ -368,6 +368,11 @@ def _svg_body(graph: Graph, topo: Topology) -> tuple[str, int, int]: max_x = max_y = 0.0 width = int(max_x - min_x + 2 * MARGIN) + # A narrow diagram (few nodes) must still fit the single-row legend + # (role swatches at 150px pitch + three link-type samples at 130px) — + # otherwise the ISN-uplink/vPC legend entries clip off the right edge. + _roles_n = len([r for r in LEGEND_ORDER if any(n.role == r for n in graph.nodes)]) + width = max(width, int(2 * MARGIN + _roles_n * 150 + 20 + 3 * 130)) height = int(max_y - min_y + 2 * MARGIN + TITLE_H + LEGEND_H) # Shift everything so the drawing starts at (MARGIN, MARGIN + TITLE_H). diff --git a/docs/images/topology.png b/docs/images/topology.png index 8261958..e8ab977 100644 Binary files a/docs/images/topology.png and b/docs/images/topology.png differ diff --git a/pyproject.toml b/pyproject.toml index 2e8a20b..57e27b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "aci-sim" -version = "0.20.1" +version = "0.20.2" description = "Faithful REST simulator of a 2-site Cisco ACI fabric (per-site APIC + ND/NDO)" readme = "README.md" license = "PolyForm-Noncommercial-1.0.0"