{# Watching list, rendered as the active tab content. Expects `watch` and
`watch_reports` (bug_id → {report, investigation, is_stale}). #}
{% if not watch %}
No bugs being watched. Use watch-add to track replies on a needinfo.
{% else %}
{% for w in watch %}
{% set _detail = watch_reports[w.bug_id] %}
{% set _draft = _detail.draft if _detail else None %}
{{ w.bug_id }}
{% if _draft %}
{% if _draft.bug_component %}
·{{ _draft.bug_component }}
{% endif %}
{# Current Bugzilla severity/priority at archive time, mirroring the
card-head pills; missing/unknown values fall back to S? / P?. #}
{% set _ctx = _draft.bug_context %}
{% set _sev = (_ctx.current_severity if _ctx else '') %}
{% set _pri = (_ctx.current_priority if _ctx else '') %}
{% set _sev_class = _sev | level_class %}
{% set _pri_class = _pri | level_class %}
·{{ _sev if _sev_class != 'unknown' else 'S?' }}{{ _pri if _pri_class != 'unknown' else 'P?' }}
{% endif %}
{% if w.added_at %}{{ w.added_at[:10] }}{% endif %}
{% if is_stalled(w) %}stalled{% endif %}
{% if w.ni_targets %}{{ w.ni_targets|join(', ') }}{% endif %}
{% if w.title %}
{{ w.title }}
{% endif %}
{% if _detail and (_detail.report or _detail.investigation) %}
Details
{% if _detail.report %}
{% set ctx = _detail.report %}
{% include "_bug_report.html" %}
{% endif %}
{% if _draft %}
{% set draft = _draft %}
{% include "_applied_diff.html" %}
{% endif %}
{% if _detail.investigation %}
{% set investigation = _detail.investigation %}
{% set is_stale = _detail.is_stale %}
{% include "_investigation_findings.html" %}
{% endif %}