{# ── HTMX partial: search results ── Swapped into #search-results when the search query changes. Variables: q, items, next_cursor, project_key, project, kind_color(), kind_label(), status_color(), status_label() #} {% if not q %} {# ── Empty query hint ── #}

{{ t("search.no_query") }}

{% elif not items %} {# ── No results ── #}

{{ t("search.no_results_prefix") }} "{{ q }}" {{ t("search.no_results_suffix") }}

{% else %} {# ── Result cards ── #}
{% for item in items %} {% set kc = kind_color(item.kind) %} {% set sc = status_color(item.status) %}
{# Top row: kind badge + local_id #}
{{ kind_label(item.kind, project) }} {{ item.local_id }}
{# Title (clickable link to item detail) #} {{ item.title }} {# Body preview #} {% if item.body_preview %}

{{ item.body_preview[:200] }}

{% endif %} {# Bottom row: status badge + tags + updated time #}
{# Status badge #} {{ status_label(item.status, project) }} {# Tags #} {% for tag in item.tags %} {{ tag }} {% endfor %}
{# Updated time #} {{ item.updated_at[:16] | replace('T', ' ') }}
{% endfor %}
{# ── Pagination: load more ── #} {% if next_cursor %}
{% endif %} {% endif %}