{% extends "base.html" %} {% block title %}Flow — Team Architecture{% endblock %} {# ── Macro definitions (must precede use) ──────────────────────────────── #} {% macro tier_for_status(status) -%} {%- if status == "running" %}tier-running {%- elif status == "waiting" %}tier-waiting {%- elif status == "error" %}tier-error {%- elif status == "idle" %}tier-idle {%- elif status == "stopped" %}tier-stopped {%- else %}tier-unknown {%- endif -%} {%- endmacro %} {% macro flow_node(node, depth) %} {% set has_children = node.children|length > 0 %} {% set is_collapsed = depth > 2 %}
{% if has_children %} {% else %} {% endif %} {{ node.tool_icon }} {{ node.name }} {{ node.status }} {% if node.parent_id %}↳ {{ node.parent_id[:8] }}{% endif %}
{% if has_children %} {% endif %} {% endmacro %} {# ── Page content ─────────────────────────────────────────────────────── #} {% block content %}

Parent-child relationships between sessions, showing supervisor-worker topologies. Click any session to view its detail.

{% if nodes %}
{# Root nodes (sessions with no parent) rendered as top-level tree entries #} {% for root in roots %} {{ flow_node(root, 0) }} {% endfor %} {# Orphan nodes — root nodes that have no children and no parent context #} {% for node in nodes %} {% if not node.parent_id and node.children|length == 0 and node not in roots %}
{% endif %} {% endfor %}
{% else %}

No sessions found.

{% endif %} {% endblock %}