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

{{ doc.title }}

{% if doc.family %}{{ doc.family }} {% endif %} {{ doc.status }} {% for tag in doc.tags %}{{ tag }} {% endfor %}

{{ doc.html | safe }}
{#- Supersede chain: ordered oldest -> newest (the derived index's causal order); each member links its detail page, the hop shows the relation to the NEXT member with the direction arrow, and the viewed doc is marked current. A chain of one renders no widget. -#} {% if doc.chain | length > 1 %}

Supersede chain

    {% for member in doc.chain %}
  1. {{ member.title }} {{ member.concept_id }} {% if member.relation %} {{ member.relation }} {% endif %}
  2. {% endfor %}
{% endif %} {#- Relationship panel: every stored neighbor row, grouped under its relation, each row labeled with its kind (extracted / inferred / derived) — the same tuples `cairn knowledge related` prints. -#}

Relationships

{% if doc.related_groups %} {% for group in doc.related_groups %}

{{ group.relation }}

    {% for n in group.rows %}
  • {{ n.title }} {{ n.kind }} {{ n.direction }}
  • {% endfor %}
{% endfor %} {% else %}

No relationships — this document has no stored links to other documents. Declared relates_to frontmatter, supersede markers, and shared tags or modules index as relationships on the next rebuild.

{% endif %}
{#- Linked code: the doc's stored refs with resolution status; symbol refs deep-link into the graph view. -#}

Linked code

{% if doc.refs %} {% else %}

No linked code references stored for this document.

{% endif %}
{#- Ingest provenance: source repo + path (staged manifest row first, the concept's recorded resource as fallback) and the staged manifest reference. Store-added docs state they have none. -#}

Ingest provenance

{% if doc.provenance.staged %}
Source repo
{{ doc.provenance.repo or "—" }}
Source path
{% if doc.provenance.source_path %}{{ doc.provenance.source_path }}{% else %}—{% endif %}
Channel
{{ doc.provenance.doc_source or "—" }}
Staged manifest
{% if doc.provenance.manifest.exists %} {{ doc.provenance.manifest.path }} {%- if doc.provenance.manifest.row %} — row {{ doc.provenance.manifest.row.concept_id }}{% if doc.provenance.manifest.row.staged_path %} (staged {{ doc.provenance.manifest.row.staged_path }}){% endif %} {%- else %} — no row for this document {%- endif %} {% elif doc.provenance.manifest.path %} no staged manifest at {{ doc.provenance.manifest.path }} {% else %} not available {% endif %}
{% else %}

No ingest provenance — this document was added directly to the store.

{% endif %}
{% endblock %}