evidence · {{ t.evidence }}
{% endif %}{# Shared render macros. State language + cards reuse mgf-brand-web instrument
classes (.status-chip, .level-badge, .pill, .detail-block, .empty); the small
app-specific bits (.tstate task-state chip, .derived-tag) live in app.css. #}
{# Sync-state chip — the brand state-chip; CHECKING/SYNCING swap the dot for a spinner. #}
{%- macro sync_chip(state) -%}
{%- if state in ('CHECKING', 'SYNCING') %}{% else %}{% endif -%}
{{ state }}
{%- endmacro -%}
{# The violet "derived" tag — web-inferred, never a project-reported fact (spec §5.2). #}
{%- macro derived() -%}
derived
{%- endmacro -%}
{# Task / stage workflow-state chip (done, in_progress, next, blocked, …). #}
{%- macro tstate(state) -%}
{{ state|replace('_', ' ') }}
{%- endmacro -%}
{# A work-unit card (In progress / Decisions). `age` is derived (now − started_at). #}
{%- macro task_card(t, age=None) -%}
evidence · {{ t.evidence }}
{{ view.title }}
{{ view.reason }}
{{ sync_chip(view.state) }}{% if view.action %} {{ view.action }}{% endif %}
{% if view.errors %}{{ title }}
{{ reason }}