{# Shared render macros. The state/absence vocabulary comes from the kit's template pack (mgf/macros.html — M1 P4.2, the copy-paste that lived here pre-0.4); these thin wrappers keep fed-web's historical call sites (m.sync_chip / m.derived / m.tstate / m.absence / m.empty_inline) and bind the fed-web-specific defaults. task_card stays: it is app domain. #} {% import "mgf/macros.html" as kit %} {# Sync-state chip — the brand state-chip; CHECKING/SYNCING swap the dot for a spinner. #} {%- macro sync_chip(state) -%}{{ kit.sync_chip(state) }}{%- endmacro -%} {# The violet "derived" tag — web-inferred, never a project-reported fact (spec §5.2). #} {%- macro derived() -%}{{ kit.derived_tag('mgf-fed-web') }}{%- endmacro -%} {# Task / stage workflow-state chip (done, in_progress, next, blocked, …). #} {%- macro tstate(state) -%}{{ kit.tstate(state) }}{%- endmacro -%} {# A work-unit card (In progress / Decisions). `age` is derived (now − started_at). #} {%- macro task_card(t, age=None) -%}
{{ t.id }} {{ t.title }} {% if t.owner %}{{ t.owner }}{% endif %}
{{ tstate(t.state) }} {% if t.impact %}impact {{ t.impact }}{% endif %} {% if t.effort %}effort {{ t.effort }}{% endif %} {% if t.eta %}eta {{ t.eta }}{% endif %} {% if t.stage %}{{ t.stage }}{% endif %} {% if age %}started {{ age }} ago{{ derived() }} {% elif t.state == 'in_progress' %}age not reported{% endif %}
{% if t.reason %}
⚠ why
{{ t.reason }}
{% endif %} {% if t.evidence %}

evidence · {{ t.evidence }}

{% endif %}
{%- endmacro -%} {# Honest-absence block — every absence is an explicit state + reason (spec §1.6). #} {%- macro absence(view) -%} {{- kit.absence(view.state, view.title, view.reason, action=view.action, errors=view.errors) -}} {%- endmacro -%} {# An inline "nothing here" empty card (data present but the slice is empty). #} {%- macro empty_inline(title, reason) -%}{{ kit.empty_state(title, reason) }}{%- endmacro -%}