{# Command Center per-report card-back fragment (spec §5). Injected into `.wf-back` by command-center.js (Task 4) — NOT a full page. A tabbed back: a `.wf-tabs` segmented control switches the "Report" / "Triage" / "AI" / "Advanced" field groups. Tab-switch / Save / Save&Run / Reset wiring is in command-center.js; this template provides stable hooks (data-tab / data-tabpanel, cardcfg-* ids/classes). Context provided by the GET /api/cc/card-config route: recipe — display name (e.g. "CVE Impact") nonce — CSRF nonce show_* — field-visibility flags from compute_prerun_fields([recipe]) eff — effective values (override merged over global state) [.get] is_ov(key) — callable: True if `key` is currently a per-card override glob_val(key) — callable: the global value (for the "Settings: " hint) `is_ov(key)` / `glob_val(key)` are callables so each overridable field can mark whether it is currently an override (data-override="1") or inheriting from Settings (data-override="0" + a muted hint). Field-visibility (report-config-card-gating): every field is gated on the `show_*` flag for the recipe(s) that actually consume it. The Advanced tab always carries the universal cache_ttl + overwrite, so it is never empty; the Report tab CAN be empty (e.g. CRA / Workflow Summary) — its button is hidden via `show_report_tab` and command-center.js activates the first visible tab on render (the hardcoded Report `aria-selected` below is the no-gating default). HANDOFF (Task-4 JS) — back-face a11y: this fragment is injected into the `.wf-back` overlay, which (when the card is NOT flipped) is only visually hidden via backface-visibility — its inputs/buttons remain in the a11y tree and tab order. Task-4 JS MUST mark the back `inert` (or `aria-hidden` + remove it from the tab order) while the front is showing, and move focus into the back on flip. Do NOT implement that here; just don't lose the note. #} {# Report tab is non-empty iff at least one of its gated fields shows. #} {% set show_report_tab = show_finding_types or show_period or show_current_version_only or show_license or show_open_only or show_baseline_date or show_detailed or show_component or show_cve or show_version_fields %}
{{ recipe }}
{# Inline error banner (validation: requires_cve with empty cve_filter). #} {# Segmented tab control — command-center.js wires the switching AND, on render, activates the first tab whose panel has fields (the Report tab can be gated away entirely). Switching tabs toggles BOTH the `.wf-tab[aria-selected]` on the buttons AND the matching `.wf-cfg-panel` `.active` / `[hidden]` on the panels below. #}
{% if show_report_tab %}{% endif %} {% if show_triage %}{% endif %} {% if show_ai %}{% endif %}
{# ── Report tab ─────────────────────────────────────────────── #}
{% if show_finding_types %} {# finding types — ft_cb checkbox group + hidden finding_types. #} {% set current_ft = eff.get('finding_types', 'cve') %}
{% endif %} {% if show_period %}
{% if not is_ov('period') %}Settings: {{ glob_val('period') }}{% endif %}
to
Set both to use a custom range (overrides Period).
{% endif %} {% if show_current_version_only %}
{% endif %} {% if show_license %}
{% endif %} {% if show_open_only %}
{% endif %} {% if show_baseline_date %}
{% endif %} {% if show_detailed %}
{% endif %} {% if show_component %}
Contains match — partial names work {# B11 #24: dropped the redundant "Recommended for Component Impact / Component Remediation" hint — those recipes set requires_component (B4), so the field is already marked Required below; recommending the primary input on its own card read as circular. #} {% if requires_component %} Required to run this report {% endif %}
{% endif %} {% if show_cve %}
{% if requires_cve %}Required to run this report{% endif %}
{% endif %} {% if show_version_fields %} {# Comparison mode toggle: "All versions" (discovery — both pair inputs empty) vs "Specific pair" (baseline+current set). A UX layer over the engine's empty-vs-set-pair semantics; its initial state derives from whether a saved pair exists, so it round-trips through override storage with NO extra persisted field (the toggle has no name=). command-center .js wires the show/hide + clear via #cardcfg-vc-all. #} {% set _vc_pair = eff.get('baseline_version') and eff.get('current_version') %}
On: compare every version of the scoped project (latest vs previous) — the pickers below stay inactive. Off: pick a specific baseline + current pair (works across projects too). {# B11 #19a: the pair pickers stay VISIBLE (dimmed + inert) when All-versions is on, so they're discoverable; the JS toggle flips vc-pair-inert + inert. Server renders the initial inert state (was `hidden`). #}
{% endif %} {% if not show_report_tab %}

No report-specific options for this report — see the Advanced tab.

{% endif %}
{# ── Triage tab ─────────────────────────────────────────────── #} {% if show_triage %} {% endif %} {# ── AI tab ─────────────────────────────────────────────────── #} {% if show_ai %} {% endif %} {# ── Advanced tab (never empty — cache_ttl + overwrite are universal) ── #} {# ── Footer (pinned) — command-center.js wires the buttons. ──── #}