@php $lastRun = $this->lastRun(); $lastRunStatusSpec = $lastRun ? \App\Support\Badges\BadgeRenderer::spec(\App\Support\Badges\BadgeDomain::OperationRunStatus, (string) $lastRun->status) : null; $lastRunOutcomeSpec = $lastRun && (string) $lastRun->status === 'completed' ? \App\Support\Badges\BadgeRenderer::spec(\App\Support\Badges\BadgeDomain::OperationRunOutcome, (string) $lastRun->outcome) : null; @endphp
{{-- Operator warning banner --}}

Operator warning

Runbooks can modify customer data across tenants. Always run preflight first, and ensure you have the correct scope selected.

{{-- Runbook card: Rebuild Findings Lifecycle --}} Rebuild Findings Lifecycle Backfills legacy findings lifecycle fields, SLA due dates, and consolidates drift duplicate findings. {{ $this->scopeLabel() }}
{{-- Last run metadata --}} @if ($lastRun)
Last run {{ $lastRun->created_at?->diffForHumans() ?? '—' }} @if ($lastRunStatusSpec) {{ $lastRunStatusSpec->label }} @endif @if ($lastRunOutcomeSpec) {{ $lastRunOutcomeSpec->label }} @endif @if ($lastRun->initiator_name) by {{ $lastRun->initiator_name }} @endif
@endif {{-- Preflight results --}} @if (is_array($this->preflight))

Affected

{{ number_format((int) ($this->preflight['affected_count'] ?? 0)) }}

Total scanned

{{ number_format((int) ($this->preflight['total_count'] ?? 0)) }}

Estimated tenants

{{ is_numeric($this->preflight['estimated_tenants'] ?? null) ? number_format((int) $this->preflight['estimated_tenants']) : '—' }}

@if ((int) ($this->preflight['affected_count'] ?? 0) <= 0)
Nothing to do for the current scope.
@endif @else {{-- Preflight CTA --}}
Run Preflight to see how many findings would change for the selected scope.
@endif