{# One meeting's review surface: its transcript, the artifacts and their provenance, the three agent tasks with their drafts, and the meeting's accepted minutes. Loaded into `#detail` by htmx (its link lives in `_detail.html`), so every control here targets `#detail` and re-renders this fragment in place — the same single-page shell the rest of the console uses. The action forms are plain posts to the service-backed routes; a refused launch renders the service's own message in the `error` block rather than an error status htmx would refuse to swap. #}
← {{ project.name }}

{{ meeting.title }}

{{ meeting.status }} {% if minutes_artifact %}{{ tr("minutes") }}{% endif %}
{{ meeting.project_slug }}/{{ meeting.slug }} {% if meeting.workspace_path %} · {{ meeting.workspace_path }}{% endif %}
{% if error %}{% endif %}

{{ tr("Transcript") }}

{% if transcript %}
{{ transcript.source }} · {{ tr("{count} segments", count=transcript.total) }} · {{ tr("showing {first}–{last}", first=transcript.offset + 1, last=transcript.offset + transcript.returned) }}
{{ transcript.text }}
{% if transcript.prev is not none %} {% endif %} {% if transcript.next is not none %} {% endif %}
{% else %}
{{ transcript_error }}
{% endif %}

{{ tr("Artifacts") }}

{% if artifacts %} {% for artifact in artifacts %} {% endfor %}
{{ tr("Kind") }} {{ tr("Path") }} {{ tr("Provenance") }} {{ tr("SHA-256") }} {{ tr("Created") }}
{{ artifact.kind }} {{ artifact.path }}
{{ artifact.produced_by }}
{% if artifact.run_id %}
{{ tr("run {id}", id=artifact.run_id) }}
{% endif %}
{{ artifact.review_state }}
{{ artifact.sha256_short }} {{ artifact.created_at }}
{% else %}
{{ tr("No artifacts yet. Run the pipeline to produce a transcript and record.") }}
{% endif %}

{{ tr("Agent tasks") }}

{% if not agent_ready %}
{{ tr("No agent is configured. Set CR_AGENT_ENDPOINT to an OpenAI-compatible endpoint, or an [agent.commands] template for a task kind, then reload.") }}
{% endif %}
{{ tr("A launch produces a draft. Nothing is applied until you accept it; accepting is what promotes it.") }}
{% if drafts %} {% for draft in drafts %}
{{ draft.review_state }} {{ draft.kind }} {{ draft.provenance.runner }}{% if draft.provenance.model %} · {{ draft.provenance.model }}{% endif %} · {{ draft.provenance.started_at }} {{ tr("context") }} {{ draft.context_hash_short }} {{ tr("prompt") }} {{ draft.prompt_hash_short }}
{% if draft.kind == 'glossary_collection' %} {% if draft.value['terms'] %} {% for term in draft.value['terms'] %} {% endfor %}
{{ tr("Term") }}{{ tr("Reading") }}{{ tr("Aliases") }}{{ tr("Definition") }}{{ tr("Evidence") }}
{{ term['term'] }} {{ term['reading'] or "" }} {{ (term['aliases'] or []) | join(", ") }} {{ term['definition'] or "" }} {{ term['evidence'] or "" }}
{% else %}
{{ tr("The draft proposed no terms.") }}
{% endif %} {% elif draft.kind == 'transcript_check' %} {% if draft.value['changes'] %} {% for change in draft.value['changes'] %} {% endfor %}
{{ tr("Before") }}{{ tr("After") }}{{ tr("Reason") }}
{{ change['before'] }} {{ change['after'] }} {{ change['reason'] or "" }}
{% else %}
{{ tr("The draft corrected nothing.") }}
{% endif %}
{{ tr("Corrected revision") }}
{{ draft.value['revision'] }}
{% elif draft.kind == 'minutes' %}
{{ draft.value['meeting'] }} · {{ draft.value['project'] }}
{{ tr("Attendees") }}: {{ (draft.value['attendees'] or []) | join(", ") }}
{% if draft.value['decisions'] %}
{{ tr("Decisions") }}
{% endif %} {% if draft.value['actions'] %}
{{ tr("Actions") }}
{% endif %}
{{ draft.value['body'] }}
{% endif %} {% if draft.review_state == 'draft' %}
{% endif %} {% if draft.promotion %}
{{ tr("accepted") }} {{ draft.promotion['at'] }} {% if draft.kind == 'glossary_collection' %}
{{ tr("{added} term(s) added as candidates; {skipped} already in the glossary.", added=draft.promotion['summary']['added'] | length, skipped=draft.promotion['summary']['skipped'] | length) }}
{% elif draft.kind == 'transcript_check' %}
{{ tr("{count} correction(s) recorded as a new revision.", count=draft.promotion['summary']['changes']) }}
{{ draft.promotion['summary']['revision_path'] }}
{% elif draft.kind == 'minutes' %}
{{ tr("Minutes recorded for this meeting.") }}
{{ draft.promotion['summary']['path'] }}
{% endif %}
{% endif %}
{% endfor %} {% else %}
{{ tr("No agent drafts yet.") }}
{% endif %}

{{ tr("Minutes") }}

{% if minutes_text %}
{{ tr("accepted") }} {{ minutes_artifact.created_at }}
{{ minutes_text }}
{% else %}
{{ tr("No accepted minutes yet. Accept a minutes draft above.") }}
{% endif %}