{# T12: header banner -- target URL, intent_text, starter_template, abbreviated clarifying Q&A, flow_confirm summary. Replaces the v0.1.0 title.html + meta_grid.html stack. Inline styles because styles.css is byte-pinned to the mockup (see tests.unit.test_static_styles); we reuse the existing CSS variables so both light + dark themes render the same markup. #} {# Friendly labels for the 7 starter templates. ``custom`` is the default; everything else maps to a single-word badge. #} {% set _template_labels = { 'products': 'Product listings', 'stocks': 'Stock prices', 'realestate': 'Real-estate listings', 'jobs': 'Job postings', 'reviews': 'Reviews', 'news': 'News articles', 'custom': 'Custom intent', } %} {% set _template_label = _template_labels.get(report.starter_template, report.starter_template or 'Custom intent') %}

Scan report for {{ report.target_domain }}

{{ report.target_url }} {% set req_count = report.capture_metadata.get('request_count') if report.capture_metadata else None %}  ·  captured {{ report.created_at }} {% if req_count is not none %}  ·  {{ req_count }} requests {% endif %}
Template
{{ _template_label }}
Intent
{% if report.skipped_filter %} {# T13: user explicitly opted into the v0.1.x-style generic report on the post-capture confirmation step. Show a neutral marker instead of the original (now-irrelevant) intent text. #} Generic scan — no intent filtering applied. {% elif report.intent_text %} {{ report.intent_text }} {% else %} No intent recorded for this scan. {% endif %}
{% if report.flow_confirm_result and report.flow_confirm_result.get('flow_summary') %}
Flow
{{ report.flow_confirm_result.get('flow_summary') }}
{% endif %}
{# Per-phase scan timings: surfaced as a compact strip so users see capture / validation / scrub+upload / total wall-clock at a glance. The strip is hidden when the blob does not carry scan_timings (pre-fix-#4 captures). The em-dash sentinel handles JSONB round-trip oddities (string / list / dict values). #} {% set timings = report.scan_timings or {} %} {% if timings | length > 0 %} {% set capture_secs = timings.get('capture_seconds') %} {% set scrub_upload_secs = timings.get('scrub_upload_seconds') %} {% set total_secs = timings.get('total_seconds') %} {% if 'validation_seconds' in timings and timings['validation_seconds'] is none %} {% set validation_label = 'skipped' %} {% else %} {% set validation_label = timings.get('validation_seconds') | format_duration %} {% endif %}
Capture duration: {{ capture_secs | format_duration }}
Validation: {{ validation_label }}
Scrub + upload: {{ scrub_upload_secs | format_duration }}
Total wall-clock: {{ total_secs | format_duration }}
{% endif %} {% if report.clarifying_qa %}
Show clarifying Q&A ({{ report.clarifying_qa | length }})
    {% for entry in report.clarifying_qa %}
  1. {{ entry.get('question', '') }}
    {{ entry.get('answer', '') }}
  2. {% endfor %}
{% endif %}