{% set active_page = "quality" %}
{% extends "base.html" %}
{% block title %}Quality{% endblock %}
{% block content %}
<div class="page-header animate-in">
    <div class="page-title">Quality Report</div>
    <div class="page-subtitle">Static analysis -- no LLM, no test execution</div>
</div>

<div class="mb-6 animate-in delay-1">
    <select name="repo"
        hx-get="/htmx/quality"
        hx-target="#quality-content"
        hx-swap="innerHTML"
        hx-trigger="change"
        hx-include="this">
        <option value="">Select a repository...</option>
        {% for r in repos %}
        <option value="{{ r }}" {% if r == selected_repo %}selected{% endif %}>{{ r }}</option>
        {% endfor %}
    </select>
    <span class="htmx-indicator" style="margin-left:8px"><span class="spinner"></span></span>
</div>

<div id="quality-content" class="animate-in delay-2">
    {% if selected_repo %}
        {% include "partials/quality_report.html" %}
    {% else %}
        <div class="empty-state">
            <div style="font-size:28px;margin-bottom:12px;opacity:0.3">&#9670;</div>
            Select a repository to generate its quality report
        </div>
    {% endif %}
</div>
{% endblock %}
