{# Fragments several areas share. Presentation only — no macro here decides anything, and none takes a value that is not already on a payload. #} {% macro failed(panel) %} {# A panel whose operation failed, rendered where it sits so the rest of the page still says what it knows. The error's type, message and hint are the same three fields every other surface reports; nothing is softened and nothing is invented. #}

{{ panel.op }} failed

{% if panel.error %}

{{ panel.error.type }}

{{ panel.error.message }}

{% if panel.error.hint %}

{{ panel.error.hint }}

{% endif %} {% endif %}
{% endmacro %} {% macro counts(table) %} {# A `by_*` counter table, in the payload's own order. #} {% endmacro %} {% macro trail(parts) %} {% if parts %}{{ parts | join(' › ') }}{% endif %} {% endmacro %} {% macro citation(item) %} {# One citation of an owner's conversation: full, because the reader holds a key for this workspace and could have retrieved the passage themselves. The anonymous projection is a different type rendered by `shared.html`, and it is produced in storage rather than here. #}
  • [{{ item.slot }}] {# The owner may follow the citation to the passage it came from; a guest may not, and the anonymous view has no document id on it to build such a link from. That difference is structural rather than a branch in this macro. #} {{ item.title }} {{ trail(item.heading_path) }} {{ item.verification }} {% if item.quote %}
    {{ item.quote }}
    {% endif %}
  • {% endmacro %} {% macro state(value) %} {{ value }} {% endmacro %} {% macro empty(message) %}

    {{ message }}

    {% endmacro %} {% macro knowledge(record) %} {# What a structured memory rests on. Nothing for a document that is not one. Every value is rendered as text, **including the locator**. It is restricted to http and https before it is stored, so a link would be safe — but an address that is never an `href` has no sink to get wrong, and the same is true of the quote, which is somebody else's message. The word is "attested", not "verified": these are the sources the memory's author recorded, and nothing here was opened or checked. `verified` is what an answer citation's quotation is when it resolves against the text it cites, and the two must not be readable as one. #} {% if record %}
    {% if record.unavailable_reason %}

    This memory declares a record that could not be used. {{ record.unavailable_reason }}

    {% else %}

    {{ record.knowledge_type }} {{ record.evidence_status }} {{ record.evidence | length }} source(s) attested · newest said {{ (record.newest_said_at or '')[:10] }}

    {% if record.relationships %}

    {% for link in record.relationships %}{{ link.relation }} {{ link.target }}{% if not loop.last %} · {% endif %}{% endfor %}

    {% endif %} {% endif %}
    {% endif %} {% endmacro %}