{# One pending request as a tile: who, what, how urgent, and the two or three answers most likely to be right. Everything a decision could turn on is one tap away, never more. Rendered on page load and again over the websocket, so it must not touch `request` or `flash`. #} {% set level = hazard_level(req.detail) %}{% set flagged = hazard_blocks(level) %} {% set ops = operations(req.detail) %}
{{ req.agent.name }} {% if level %}{{ 'destructive' if flagged else 'flagged' }} · {{ level }}{% endif %} {% if req.semantic and req.semantic.status == 'ok' %}Jev · {{ req.semantic.verdict }}{% elif req.semantic %}Jev · no verdict{% endif %} {% if req.expires_at %} · expires {{ req.expires_at.strftime('%H:%M') }}{% endif %}
{% if ops %}{% set lines = operation_line(ops[0][1]).split('\n') %} {# Never shortened: the tile carries approve buttons, so what it shows has to be all of it. A pathological command scrolls inside the tile rather than pushing those buttons off the screen. #}
{{ lines[0] }}
{% for extra in lines[1:] %}
{{ extra.strip() }}
{% endfor %} {% if ops|length > 1 %}
and {{ ops|length - 1 }} more operation{{ '' if ops|length == 2 else 's' }} in this request
{% endif %} {% else %}
{% for p in req.patterns[:2] %}{{ p }}{{ ' ' }}{% endfor %}{% if req.patterns|length > 2 %}+{{ req.patterns|length - 2 }} more{% endif %}
{% endif %} {% if req.reason %}
“{{ req.reason }}”
{% endif %}
{% include "_hazards.html" %} {% if req.semantic %}
Jev
{% include "_semantic.html" %}
{% endif %}
Permission scopes
{% include "_patterns.html" %}
{% if ops %}
Operation{{ '' if ops|length == 1 else 's' }}
{% for pats, op in ops %}{% with constraints=op %}{% include "_constraints.html" %}{% endwith %}{% endfor %}
{% endif %}
session {{ (req.session_id or 'none')[:24] }} · {{ req.id }}
{% with next='/ui', in_detail=true %}{% include "_decide.html" %}{% endwith %}
{% if flagged %} Destructive · open to read the flags {% else %} Open for other durations, broader scope, or a deny reason {% endif %}