{{-- Auto-refresh while comparison is running --}} @if ($state === 'comparing')
@endif @php $hasCoverageWarnings = in_array(($coverageStatus ?? null), ['warning', 'unproven'], true); $evidenceGapsCountValue = (int) ($evidenceGapsCount ?? 0); $hasEvidenceGaps = $evidenceGapsCountValue > 0; $hasWarnings = $hasCoverageWarnings || $hasEvidenceGaps; $evidenceGapsSummary = null; $evidenceGapsTooltip = null; if ($hasEvidenceGaps && is_array($evidenceGapsTopReasons ?? null) && $evidenceGapsTopReasons !== []) { $parts = []; foreach (array_slice($evidenceGapsTopReasons, 0, 5, true) as $reason => $count) { if (! is_string($reason) || $reason === '' || ! is_numeric($count)) { continue; } $parts[] = $reason.' ('.((int) $count).')'; } if ($parts !== []) { $evidenceGapsSummary = implode(', ', $parts); $evidenceGapsTooltip = 'Top gaps: '.$evidenceGapsSummary; } } @endphp {{-- Row 1: Stats Overview --}} @if (in_array($state, ['ready', 'idle', 'comparing', 'failed']))
{{-- Stat: Assigned Baseline --}}
Assigned Baseline
{{ $profileName ?? '—' }}
@if ($snapshotId) Snapshot #{{ $snapshotId }} @endif @if (filled($coverageStatus)) Coverage: {{ $coverageStatus === 'ok' ? 'OK' : 'Warnings' }} @endif @if (filled($fidelity)) Fidelity: {{ Str::title($fidelity) }} @endif @if ($hasEvidenceGaps) Evidence gaps: {{ $evidenceGapsCountValue }} @endif
@if ($hasEvidenceGaps && filled($evidenceGapsSummary))
Top gaps: {{ $evidenceGapsSummary }}
@endif
{{-- Stat: Total Findings --}}
Total Findings
@if ($state === 'failed')
Error
@else
{{ $findingsCount ?? 0 }}
@endif @if ($state === 'comparing')
Comparing…
@elseif (($findingsCount ?? 0) === 0 && $state === 'ready' && ! $hasWarnings) All clear @elseif ($state === 'ready' && $hasCoverageWarnings) Coverage warnings @elseif ($state === 'ready' && $hasEvidenceGaps) Evidence gaps @endif
{{-- Stat: Last Compared --}}
Last Compared
{{ $lastComparedAt ?? 'Never' }}
@if ($this->getRunUrl()) View run @endif
@endif {{-- Coverage warnings banner --}} @if ($state === 'ready' && $hasCoverageWarnings)
Comparison completed with warnings
@if (($coverageStatus ?? null) === 'unproven') Coverage proof was missing or unreadable for the last comparison run, so findings were suppressed for safety. @else Findings were skipped for {{ (int) ($uncoveredTypesCount ?? 0) }} policy {{ Str::plural('type', (int) ($uncoveredTypesCount ?? 0)) }} due to incomplete coverage. @endif @if (! empty($uncoveredTypes))
Uncovered: {{ implode(', ', array_slice($uncoveredTypes, 0, 6)) }}@if (count($uncoveredTypes) > 6)…@endif
@endif
@if ($this->getRunUrl())
View run
@endif
@endif {{-- Failed run banner --}} @if ($state === 'failed')
Comparison Failed
{{ $failureReason ?? 'The last baseline comparison failed. Review the run details or retry.' }}
@if ($this->getRunUrl()) View failed run @endif
@endif {{-- Critical drift banner --}} @if ($state === 'ready' && ($severityCounts['high'] ?? 0) > 0)
Critical Drift Detected
The current tenant state deviates from baseline {{ $profileName }}. {{ $severityCounts['high'] }} high-severity {{ Str::plural('finding', $severityCounts['high']) }} require immediate attention.
@endif {{-- State: No tenant / no assignment / no snapshot --}} @if (in_array($state, ['no_tenant', 'no_assignment', 'no_snapshot']))
@if ($state === 'no_tenant')
No Tenant Selected
@elseif ($state === 'no_assignment')
No Baseline Assigned
@elseif ($state === 'no_snapshot')
No Snapshot Available
@endif
{{ $message }}
@endif {{-- Severity breakdown + actions --}} @if ($state === 'ready' && ($findingsCount ?? 0) > 0) {{ $findingsCount }} {{ Str::plural('Finding', $findingsCount) }} The tenant configuration drifted from the baseline profile.
@if (($severityCounts['high'] ?? 0) > 0) {{ $severityCounts['high'] }} High @endif @if (($severityCounts['medium'] ?? 0) > 0) {{ $severityCounts['medium'] }} Medium @endif @if (($severityCounts['low'] ?? 0) > 0) {{ $severityCounts['low'] }} Low @endif
@if ($this->getFindingsUrl()) View all findings @endif @if ($this->getRunUrl()) Review last run @endif
@endif {{-- Ready: no drift --}} @if ($state === 'ready' && ($findingsCount ?? 0) === 0 && ! $hasCoverageWarnings)
No Drift Detected
The tenant configuration matches the baseline profile. Everything looks good.
@if ($this->getRunUrl()) Review last run @endif
@endif {{-- Ready: warnings, no findings --}} @if ($state === 'ready' && ($findingsCount ?? 0) === 0 && $hasCoverageWarnings)
Coverage Warnings
The last comparison completed with warnings and produced no drift findings. Run Inventory Sync again to establish full coverage before interpreting results.
@if ($this->getRunUrl()) Review last run @endif
@endif {{-- Idle state --}} @if ($state === 'idle')
Ready to Compare
{{ $message }}
@endif