{# R7 · HISTORY center view (live). A reverse-chronological timeline of the selected project's recent activity (who · what · when), with a recent-decisions rail alongside. Mirrors the prototype run-history screen's look (design/screens/history.html — page head, grouped run rows, status chips) but rebuilt as a CENTER view over REAL Cortex data: the noisy /history tool-call JSON is summarized server-side (reusing the agent-detail `_summarize_history_row` helper), and the rail shows recent decisions/lessons from /search. Context (built in main._history_view): `selected` : project record (header hex/name) `selected_key` : project key `hist_timeline` : [{kind, kind_label, label, detail, when, agent, role}] newest-first (reverse-chronological) `hist_count` : timeline row count `hist_agents` : distinct agent names seen in the window `hist_agent_count`: count of distinct agents `hist_decisions` : [{text, source, category}] recent decisions/lessons `hist_decision_count`: count NOTE: this is a read-only activity feed. The prototype's rich span-tree / gantt trace replay is a later increment — TODO(trace-replay) below. #} {% if selected %}
{# ---------- page head ---------- #}
Activity history
{{ selected.display_name or selected.project_key }} {{ hist_count }} recent events {% if hist_agent_count %} {{ hist_agent_count }} agents {% endif %}
live · /history
{# ---------- two-pane: timeline (left) + recent decisions (right) ---------- #}
{# ===== TIMELINE ===== #}
{% if hist_timeline %}
    {% for row in hist_timeline %}
  1. {{ row.agent }} {{ row.kind_label }} {% if row.when %}{{ row.when }}{% endif %} {{ row.label }} {% if row.detail %}{{ row.detail }}{% endif %}
  2. {% endfor %}
{% else %}
No recent activity

Nothing in the live /history window for this project yet. Activity appears here as agents log decisions and run tools.

{% endif %}
{# ===== RECENT DECISIONS RAIL ===== #}
{% else %}

Select a project to view its activity history.

{% endif %}