{% from "_partials.html" import status_pill, fresh_label, source_pill %} {# Partial swapped into #docs-table by hx-get="/docs/partial". Context is exactly {rows, filtered, sources_meta} — do not reference page-only vars (qpath/status/sort/limit/total) here: on an htmx swap they don't exist. The status distribution below is computed over the CURRENT view (rows), so it honestly answers "what's in front of me right now" without new backend data. #} {% if rows %} {% set shown = rows | length %} {% set n_canonical = rows | selectattr('status', 'equalto', 'canonical') | list | length %} {% set n_plan = rows | selectattr('status', 'equalto', 'plan') | list | length %} {% set n_stale = rows | selectattr('status', 'equalto', 'stale') | list | length %} {% set n_duplicate = rows | selectattr('status', 'equalto', 'duplicate') | list | length %}
canonical {{ n_canonical }} plan {{ n_plan }} stale {{ n_stale }} duplicate {{ n_duplicate }}
{% for r in rows %} {#- freshness tier drives the dot colour: <7d ok · <30d aging · else stale-cold -#} {% set tier = 'fresh' if r.age_days < 7 else ('aging' if r.age_days < 30 else 'cold') %} {% endfor %}
Indexed documents — {{ "{:,}".format(filtered) }} match the current filters, {{ shown }} shown.
source path title status age tokens
{{ source_pill(r.source_id) }} {% if r.source_id == 'trovex' %} {{ r.path[:12] }}… {% else %} {{ r.path }} {% endif %} {{ r.title }} {{ status_pill(r.status) }} {{ fresh_label(r.age_days) }} {{ "{:,}".format(r.tokens_est) }}
{% else %}
no docs match these filters
loosen the path filter, or clear status & source to see the full corpus
{% endif %}