{% 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 %}
| 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) }} |