{# T-2114 (third sibling of T-2112, T-2113): The wrapping #ac-container DIV (review.html:592-598) declares hx-target="this" for its own 5s polling cycle. htmx INHERITS hx-target to descendants — so the explicit "Reload page" link below, AND every URL emitted by render_markdown_safe inside AC Steps/Expected/If-not text, would otherwise swap their boost-response INTO this small fragment area (cockpit-shell-stays-visible-above-and-bounces-back- in-5s — same bug class as T-2112 /approvals + T-2113 /cockpit). Wrapper-reset pattern (chosen over per-anchor triplet because markdown-rendered URLs would otherwise need to be patched at render_markdown_safe level — broader blast radius): a top-level reset div tells all descendants to swap into #content (the page shell). The polling DIV's hx-target="this" resolves on the polling DIV itself, not on this reset wrapper — so the polling cycle continues to target #ac-container correctly. One reset > N per-anchor overrides. If a future maintainer thinks this reset is redundant: read T-2112 RCA first. The first hx-boost'ed anchor inside the polling div that loses its override re-introduces the bounce-back. #}
Human ACs: {{ checked_count }}/{{ total_count }}
{% for ac in human_acs %}
{# T-2134 (T-2133 GO slice A): explicit hx-target="this" overrides the outer wrapper's hx-target="#content" (T-2114). Standalone review.html has no #content element; without this override, htmx fires htmx:targetError and ABORTS the POST before any of configRequest / beforeRequest, so CSRF never runs and the click silently no-ops. hx-swap="none" makes the actual target irrelevant for response handling — `this` (the form) always resolves and satisfies htmx's target-must-exist precondition. The two sibling forms below (inception decide, build complete) already declare their own hx-target; this restores that contract for ac-check. #}
{% if ac.confidence == 'review' %} Review {% elif ac.confidence == 'rubber-stamp' %} Rubber-stamp {% endif %} {{ ac.text }}
{% if not ac.checked and (ac.steps or ac.expected or ac.if_not) %}
{% if ac.steps %} Steps:
    {% for step in ac.steps %}
  1. {{ step | safe }}
  2. {% endfor %}
{% endif %} {% if ac.expected %} Expected: {{ ac.expected | safe }} {% endif %} {% if ac.if_not %}
If not: {{ ac.if_not | safe }}
{% endif %}
{% endif %}
{% endfor %} {% if not human_acs %}
No Human ACs for this task.
{% endif %} {% if decision_recorded %} {# T-1575: decision already recorded — surface it instead of re-prompting. Without this, the 5-second htmx poll on #ac-container wipes the success message and re-renders the GO/NO-GO/DEFER form, making it look like the decision didn't take. #}
{% set _dec_upper = (decision_value or '')|upper %} {% set _dec_color = '#10b981' if _dec_upper == 'GO' else ('#ef4444' if _dec_upper in ('NO-GO', 'NO_GO') else '#6b7280') %}
Decision recorded: {{ _dec_upper }}
{% elif task_completed %} {# T-2081 / T-2082 (L-441 sibling of T-1575): non-inception sibling guard. Without this, the 5-second poll on #ac-container wipes the POST-swap response and re-renders the Complete button for a task that has ALREADY been work-completed. Surface the completion state instead. #}
✓ Task completed. Reload page for fresh view.
{% elif all_checked and total_count > 0 %} {% if workflow_type == 'inception' %}

Record Decision

{# T-1575: pre-fill rationale from the agent's ## Recommendation block. The human acts on agent's recommendation — they should see and edit it, not re-type from scratch. Mirrors inception_detail.html's `rationale_hint` pattern. #} {% if verdict and verdict != '?' %}

Agent recommends {{ verdict }} — edit the rationale or pick a different decision.

{% endif %}
{% else %}
{% endif %} {% endif %}
{# T-2114: end of hx-target="#content" reset wrapper #}