{% extends "base.html" %} {% import "_links.html" as links with context %} {% block title %}Knowledge Graph — Cairn Dashboard{% endblock %} {% block view_title %}Knowledge Graph{% endblock %} {% block content %}

Knowledge graph

Ingested documents as nodes, their stored relationships as directed edges — one edge per indexed row, so a supersede pair reads as the two-way link ("supersedes" on the newer doc, "superseded-by" on the older) the related CLI and the detail panels report. Inferred links render dashed; extracted and derived links solid.

{% if graph.nodes %} {#- Legend as filter (the /graph pattern): kind + relation chips toggle whole edge groups via client-side DataSet updates — a filter change never reloads or refetches. Hidden until filled; the script renders the chips from the same data the canvas drew, so they cannot drift. -#}

{{ graph.metadata.node_count }} docs — {{ graph.metadata.edge_count }} of {{ graph.metadata.edge_count }} edges shown

{#- Overlay controls float over the canvas's bottom-left; the canvas script wires the data-graph-action buttons to vis zoom/fit. -#}
{#- Inspect panel: a node click fetches the doc's summary fragment from /knowledge/graph/inspect into this panel (the canvas owns the click, the server owns the markup). Hidden when nothing is selected so the canvas keeps the full width. -#}
{#- A selected store rides the page for the inspect fetch, the same #graph-data data-store seam /graph uses. -#} {% else %}

No knowledge documents — ingest some first: cairn knowledge ingest.

{% endif %}
{% endblock %} {% block scripts %} {% if graph.nodes %} {% endif %} {% endblock %}