{% from "_macros.html" import icon, ref, due_badge, stuck_badge, snooze_day_form %} {% from "_bulk.html" import bulk_check %} {% set health_labels = {"problem": "Problem", "your_move": "Your move", "review": "To review", "in_transit": "In transit", "working": "Working", "at_rest": "At rest", "idle": "Idle", "dormant": "Dormant"} %} {% set status_labels = {"on_track": "On track", "at_risk": "At risk", "blocked": "Blocked", "paused": "Paused", "done": "Done", "quiet": "Quiet"} %} {% set status_tones = {"on_track": "success", "at_risk": "warning", "blocked": "danger", "paused": "neutral", "done": "info", "quiet": "neutral"} %} {% macro status_chip(status) -%} {%- if status -%} {{ status_labels[status.value] }}{% if status.overridden %} {% endif %} {%- endif -%} {%- endmacro %} {% macro health_dot(health) -%} {%- endmacro %} {% macro pin_form(p, next, hotkey=None) -%}
{%- endmacro %} {% macro project_row(p) -%}
  • {{ health_dot(p.health) }} {% set folder = (p.path or "").rstrip("/").split("/")[-1] %} {{ p.name }}{% if folder and folder != p.name %} {{ folder }}/{% endif %} {{ p.counts_line or health_labels[p.health] }}{% if p.to_merge %} · {{ p.to_merge }} to merge{% endif %} {%- if p.oldest_open %}oldest open {{ p.oldest_open | ago }} · {% endif %}active {{ p.last_activity | ago }} {{ pin_form(p, "/projects") }}
  • {%- endmacro %} {% macro status_buttons(base, query="since=7d") -%} Download status {%- endmacro %} {% macro label_chips(labels, base="") -%} {%- for label in labels %}{{ label }}{% endfor -%} {%- endmacro %} {% macro note_count_badge(count) -%} {%- if count %}{{ count }} note{{ "" if count == 1 else "s" }}{% endif -%} {%- endmacro %} {% macro filter_bar(action, filters, labels, statuses, hidden={}, clear_query="") -%}
    {%- for name, value in hidden.items() if value %}{% endfor %} {%- if filters.active %}Clear{% endif %}
    {%- endmacro %} {% macro work_row(i, tone, next, show_project=False, ranking=False) -%}
  • {{ bulk_check(i.id) }} {{ i.state }}
    {{ ref(i.id) }}{{ i.title }} {% if show_project %}{{ i.project_name }}{% endif %} {{ i.owner | capitalize }} {{ due_badge(i.due_on) }}{{ stuck_badge(i.stuck) }} {{ label_chips(i.labels, next) }}{{ note_count_badge(i.note_count) }} {% if i.summary and i.summary != i.title %}
    {{ i.summary }}
    {% endif %} {% if i.effort_text %}
    Took {{ i.effort_text }}
    {% endif %} {% if i.kind == "decision" and i.recommendation and i.state == "Decide" %}
    {% endif %}
    {% set open_row = i.state not in ("Done", "Partly done", "Cancelled") %}
    {% if i.kind == "action" and i.state == "Do it" %}
    {% endif %} {% if i.session_id %}{{ icon("terminal") }}Watch{% endif %} {% if i.kind == "task" and i.state == "Ready" and not i.dispatched %}
    {% endif %} {% if i.since %}{{ i.since | ago }}{% endif %} {% if open_row %} {% endif %}
  • {%- endmacro %} {# A row's … with Cancel: closes an open item without opening it, back on next. #} {% macro close_menu(item_id, next) -%} {%- endmacro %}