{% extends "base.html" %} {% block title %}q-ai — Runs{% endblock %} {% block content %}
{% if not results_mode and not workflow_run %} {# Run history view — no active run #} {% include "partials/run_history.html" %} {% else %} Run History {% if results_mode and is_terminal %} {% include "partials/overview_header.html" %} {% else %} {% include "partials/status_bar.html" %}
{% if child_runs %} {% for child in child_runs %} {{ child.module }}: {{ child.status.name | format_status | lower }} {% endfor %} {% endif %}
{% endif %}
{% if results_mode and workflow_modules %}
{% for mod in workflow_modules %} {% endfor %}
{% for mod in workflow_modules %}
{% if mod == 'audit' and mod in child_by_module %} {% include "partials/audit_results_tab.html" %} {% elif mod == 'inject' and mod in child_by_module %} {% include "partials/inject_results_tab.html" %} {% elif mod == 'proxy' and mod in child_by_module %} {% include "partials/proxy_results_tab.html" %} {% elif mod == 'ipi' and mod in child_by_module %} {% set ipi_guidance = child_guidance.get("ipi") if child_guidance is defined else None %} {% if ipi_guidance is none and child_by_module.get("ipi") %} {% set no_guidance_available = true %} {% endif %} {% include "partials/ipi_tab.html" %} {% elif mod == 'cxp' and mod in child_by_module %} {% set cxp_guidance = child_guidance.get("cxp") if child_guidance is defined else None %} {% set cxp_run_id = child_by_module["cxp"].id %} {% if cxp_guidance is none and child_by_module.get("cxp") %} {% set no_guidance_available = true %} {% endif %} {% include "partials/cxp_tab.html" %} {% elif mod in child_by_module %}

Results view for {{ mod }} coming soon.

{% else %}

Module did not execute in this run.

{% endif %}
{% endfor %}
{% elif results_mode and is_report_run and report_html %} {# Generate report workflow — render report markdown as HTML #}
{{ report_html | safe }}
{% elif results_mode %} {# Results mode but no module tabs (e.g. generate_report workflow) #}

This workflow has no module results to display.

{% if child_by_module %}
{% for mod, child in child_by_module.items() %}
{{ mod }} {{ child.status.name | format_status | lower }}
{% endfor %}
{% endif %}
{% endif %}
{% endif %}
{% endblock %}