{# ── S-115: workspace ERD review fragment (HTMX-swappable; no base.html). ── Renders the loaded workspace schema as a client-side Mermaid erDiagram, reusing the same class hooks / click handler as the snapshot view's schema.html (build_erd_mermaid + views/erd.py helpers supply the source). S-117 (Studio) hx-gets this into a panel — it must stay a fragment. #} {% if erd_mermaid %} {# Mermaid.js client-side rendering (CDN, no server-side image gen). #} {# SVG pan/zoom (loaded only when an ERD is present). #} {# Table-detail JSON blob (enables click-to-detail, no network round-trip). #} {# ERD diagram container #}
{{ erd_mermaid }}
Entity-relationship diagram of the schema loaded in this session (via connect or upload). Click a table node to see its column details.
{# Click-to-detail panel (hidden until a table is clicked). #} {# Client-side interactivity script (mirrors schema.html). #} {% else %}