{# Plan tab tag summary strip. Inputs: plan_view (uses plan_view.tag_summaries and plan_view.selected_tag). Each tile is a clickable filter; clicking the "All" tile clears the filter. #} {% set selected = plan_view.selected_tag %} {% set palette = ['#3b82f6','#10b981','#f59e0b','#ef4444','#8b5cf6','#06b6d4','#f97316','#84cc16'] %}
All ({{ plan_view.planned_rows_total }}) {% for s in plan_view.tag_summaries %} {% set is_untagged = (s.tag == 'untagged') %} {% set idx = (s.tag|length + (s.tag[0]|ord if s.tag|length > 0 else 0)) % 8 %} {% set is_selected = (selected == s.tag) %} {% if not is_untagged %} {% endif %} {{ s.tag }} {{ s.target_count }} {% if s.pct_filled is not none %} {% set pct = s.pct_filled|float %} {% if pct >= 100 %}{% set bar_color = 'var(--color-pos)' %} {% elif pct >= 50 %}{% set bar_color = 'var(--color-warn)' %} {% else %}{% set bar_color = 'var(--color-neg)' %}{% endif %} {% endif %} {% if s.gap_to_fill_dollar > 0 %} +${{ "%.0f"|format(s.gap_to_fill_dollar|float) }} {% endif %} {% endfor %}