{# PER-PROJECT DRILL-IN (center detail view). The click-IN from the all-projects Dashboard — the Dashboard shows only COUNTS; this opens ONE project's full open-handoffs + tasks LISTS, which the Dashboard lacks. Reached via GET /projects/{key}/detail (concrete-resource pattern) from a dashboard card's 'details' affordance OR the col-2 Metrics 'details ›' link. The Dashboard itself is left as-is. A "Dashboard" back button returns the center to the cross-project fleet (same hx-get the agent-detail back button uses). On-demand pane — no background poll; a Refresh button re-reads. Context (built in main._project_detail_context): selected_key : project key pd_project_name : display name pd_repo_root : canonical working folder pd_handoffs : [{compound, summary, summary_full, from_agent, to_target, priority, status, claimed_by, created_at}] OPEN handoffs, urgent-major then newest-first pd_handoff_count : open-handoff count pd_tasks : [{title, assigned, status, priority, is_active}] active-first then priority desc pd_task_count : task count pd_active_tasks / pd_pending_handoffs / pd_events_24h : header vitals (/state) pd_unknown : True if the project key wasn't found (still renders) #}
{# ---------- page head ---------- #}
{{ pd_project_name }}
{{ selected_key }} {% if pd_repo_root %} {{ pd_repo_root }} {% endif %}
{% if pd_unknown %}
Project {{ selected_key }} wasn't found among active projects. It may be inactive or renamed.
{% endif %} {# ---------- header vitals strip (the /state counters) ---------- #}
{{ pd_handoff_count }} open handoffs
{{ pd_task_count }} tasks
{{ pd_active_tasks if pd_active_tasks is not none else "—" }} active
{{ pd_events_24h if pd_events_24h is not none else "—" }} events · 24h
{# ================= open handoffs ================= #}

Open handoffs

{{ pd_handoff_count }}
{% if pd_handoffs %}
    {% for h in pd_handoffs %}
  • {{ h.priority }} {{ h.status }}{% if h.claimed_by %} · {{ h.claimed_by }}{% endif %} {{ h.compound }}
    {{ h.summary }}
    from {{ h.from_agent }} to {{ h.to_target }} {% if h.created_at %} {{ h.created_at }} {% endif %}
  • {% endfor %}
{% else %}
No open handoffs

Nothing is waiting on {{ pd_project_name }} right now.

{% endif %}
{# ================= tasks ================= #}

Tasks

{{ pd_task_count }}
{% if pd_tasks %}
    {% for t in pd_tasks %}
  • {{ t.title }}
    {{ t.assigned }} {{ t.status }} {% if t.priority is not none %} P{{ t.priority }} {% endif %}
  • {% endfor %}
{% else %}
No tasks on the board

{{ pd_project_name }} has no board tasks right now.

{% endif %}

Drill-in of {{ pd_project_name }}'s live Cortex queue — open handoffs + board tasks. The all-projects Dashboard shows the cross-project counts; this is the click-in for the full lists. Read-only.