{{-- Auto-refresh while comparison is running --}} @if ($state === 'comparing')
@endif @php $duplicateNamePoliciesCountValue = (int) ($duplicateNamePoliciesCount ?? 0); $duplicateNameSubjectsCountValue = (int) ($duplicateNameSubjectsCount ?? 0); $explanation = is_array($operatorExplanation ?? null) ? $operatorExplanation : null; $reasonSemantics = is_array($reasonSemantics ?? null) ? $reasonSemantics : null; $summary = is_array($summaryAssessment ?? null) ? $summaryAssessment : null; $matrixNavigationContext = is_array($navigationContext ?? null) ? $navigationContext : null; $arrivedFromCompareMatrix = str_starts_with((string) ($matrixNavigationContext['source_surface'] ?? ''), 'baseline_compare_matrix'); $explanationCounts = collect(is_array($explanation['countDescriptors'] ?? null) ? $explanation['countDescriptors'] : []); $evaluationSpec = is_string($explanation['evaluationResult'] ?? null) ? \App\Support\Badges\BadgeCatalog::spec(\App\Support\Badges\BadgeDomain::OperatorExplanationEvaluationResult, $explanation['evaluationResult']) : null; $trustSpec = is_string($explanation['trustworthinessLevel'] ?? null) ? \App\Support\Badges\BadgeCatalog::spec(\App\Support\Badges\BadgeDomain::OperatorExplanationTrustworthiness, $explanation['trustworthinessLevel']) : null; $summaryLabel = match ($summary['stateFamily'] ?? null) { 'positive' => 'Aligned', 'caution' => 'Needs review', 'stale' => 'Refresh recommended', 'action_required' => 'Action required', 'in_progress' => 'In progress', default => 'Unavailable', }; $showCompareExplanation = $explanation !== null && $state !== 'no_assignment'; $baselineCompareStatusBadgeClasses = static fn (?string $tone): string => 'inline-flex items-center rounded-md border px-2 py-0.5 text-left text-xs font-medium leading-5 whitespace-normal break-words '.match ($tone) { 'danger' => 'border-danger-200 bg-danger-50 text-danger-700 dark:border-danger-800 dark:bg-danger-500/10 dark:text-danger-300', 'success' => 'border-success-200 bg-success-50 text-success-700 dark:border-success-800 dark:bg-success-500/10 dark:text-success-300', 'warning' => 'border-warning-200 bg-warning-50 text-warning-700 dark:border-warning-800 dark:bg-warning-500/10 dark:text-warning-300', 'info' => 'border-info-200 bg-info-50 text-info-700 dark:border-info-800 dark:bg-info-500/10 dark:text-info-300', 'primary' => 'border-primary-200 bg-primary-50 text-primary-700 dark:border-primary-800 dark:bg-primary-500/10 dark:text-primary-300', default => 'border-gray-200 bg-gray-50 text-gray-700 dark:border-white/10 dark:bg-white/5 dark:text-gray-200', }; @endphp

{{ $decisionCard['question'] ?? 'Which baseline drift requires action?' }}

{{ $decisionCard['status'] ?? 'Compare unavailable' }}
{{ $decisionCard['statusLabel'] ?? 'Status' }}
{{ $decisionCard['status'] ?? 'Compare unavailable' }}
{{ $decisionCard['reasonLabel'] ?? 'Reason' }}
{{ $decisionCard['reason'] ?? 'Compare state is unavailable.' }}
{{ $decisionCard['impactLabel'] ?? 'Impact' }}
{{ $decisionCard['impact'] ?? 'No governance decision should rely on this compare state yet.' }}
@if (! empty($decisionSummaryItems))
@foreach ($decisionSummaryItems as $item)
{{ $item['label'] }}
{{ $item['value'] }}

{{ $item['description'] }}

@endforeach
@endif
@if (! empty($compareReadinessFlow))
@include('filament.components.product-process-flow-horizontal', [ 'title' => 'Compare readiness flow', 'subtitle' => 'Baseline comparison needs an assigned baseline, linked snapshots, a compare run, and a decision output.', 'ariaLabel' => 'Compare readiness pipeline', 'steps' => $compareReadinessFlow, 'flowTestId' => 'baseline-compare-readiness-flow', 'stepTestId' => 'baseline-compare-readiness-step', 'connectorTestId' => 'baseline-compare-readiness-connector', 'badgeTestId' => 'baseline-compare-status-badge', 'statusBadgeClasses' => $baselineCompareStatusBadgeClasses, ])
Available inputs

Repo-backed inputs only.

@foreach ($availableCompareInputs as $input)
{{ $input['label'] }}
{{ $input['state'] }}

{{ $input['description'] }}

@endforeach
@if (! empty($assignmentUnlocks))
What this unlocks after assignment
    @foreach ($assignmentUnlocks as $unlock)
  • {{ $unlock }}
  • @endforeach
@endif
@endif @if (filled($openCompareMatrixUrl ?? null))
Launch the compare matrix with the currently known baseline profile and any carried subject focus from this environment landing.
Open compare matrix
@endif @if ($arrivedFromCompareMatrix)
Arrived from compare matrix @if ($matrixBaselineProfileId) Baseline profile #{{ (int) $matrixBaselineProfileId }} @endif @if (filled($matrixSubjectKey)) Subject {{ $matrixSubjectKey }} @endif
@endif @if ($duplicateNamePoliciesCountValue > 0) @endif @if ($showCompareExplanation)
@if ($summary) {{ $summaryLabel }} @endif @if ($evaluationSpec && $evaluationSpec->label !== 'Unknown') {{ $evaluationSpec->label }} @endif @if ($trustSpec && $trustSpec->label !== 'Unknown') {{ $trustSpec->label }} @endif
{{ $summary['headline'] ?? ($explanation['headline'] ?? 'Compare explanation') }}
@if (filled($summary['supportingMessage'] ?? null))

{{ $summary['supportingMessage'] }}

@endif @if (filled($explanation['reliabilityStatement'] ?? null))

{{ $explanation['reliabilityStatement'] }}

@endif @if (filled(data_get($explanation, 'dominantCause.explanation')))

{{ data_get($explanation, 'dominantCause.explanation') }}

@endif
@if ($reasonSemantics !== null)
Reason owner
{{ $reasonSemantics['owner_label'] ?? 'Platform core' }}
Platform reason family
{{ $reasonSemantics['family_label'] ?? 'Compatibility' }}
@endif
Execution outcome
{{ $explanation['executionOutcomeLabel'] ?? 'Completed' }}
Result trust
{{ $explanation['trustworthinessLabel'] ?? 'Needs review' }}
What to do next
{{ data_get($summary, 'nextAction.label') ?? data_get($explanation, 'nextAction.text', 'Review the latest compare run.') }}
@if (filled($explanation['coverageStatement'] ?? null))
Coverage: {{ $explanation['coverageStatement'] }}
@endif @if ($explanationCounts->isNotEmpty())
@foreach ($explanationCounts as $count) @continue(! is_array($count))
{{ $count['label'] ?? 'Count' }}
{{ (int) ($count['value'] ?? 0) }}
@if (filled($count['qualifier'] ?? null))
{{ $count['qualifier'] }}
@endif
@endforeach
@endif
@endif @if ($hasRbacRoleDefinitionSummary) {{ __('baseline-compare.rbac_summary_description') }}
{{ __('baseline-compare.rbac_summary_compared') }}: {{ (int) ($rbacRoleDefinitionSummary['total_compared'] ?? 0) }} {{ __('baseline-compare.rbac_summary_unchanged') }}: {{ (int) ($rbacRoleDefinitionSummary['unchanged'] ?? 0) }} {{ __('baseline-compare.rbac_summary_modified') }}: {{ (int) ($rbacRoleDefinitionSummary['modified'] ?? 0) }} {{ __('baseline-compare.rbac_summary_missing') }}: {{ (int) ($rbacRoleDefinitionSummary['missing'] ?? 0) }} {{ __('baseline-compare.rbac_summary_unexpected') }}: {{ (int) ($rbacRoleDefinitionSummary['unexpected'] ?? 0) }}
@endif {{-- Coverage warnings banner --}} @if ($state === 'ready' && $hasCoverageWarnings) @endif {{-- Failed run banner --}} @if ($state === 'failed') @endif {{-- Critical drift banner --}} @if ($state === 'ready' && ($severityCounts['high'] ?? 0) > 0) @endif @if ($hasEvidenceGapDetailSection) {{ __('baseline-compare.evidence_gap_details_description') }} @include('filament.infolists.entries.evidence-gap-subjects', [ 'summary' => $evidenceGapSummary, 'buckets' => $evidenceGapBuckets ?? [], 'searchId' => 'tenant-baseline-compare-gap-search', ]) @endif {{-- Severity breakdown + actions --}} @if ($state === 'ready' && ($findingsCount ?? 0) > 0) {{ $findingsCount }} {{ Str::plural('Finding', $findingsCount) }} {{ __('baseline-compare.findings_description') }}
@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()) {{ __('baseline-compare.button_view_findings') }} @endif @if ($this->getRunUrl()) {{ __('baseline-compare.button_review_last_run') }} @endif
@endif @if ($hasEvidenceGapDiagnostics) {{ __('baseline-compare.evidence_gap_diagnostics_description') }}
Diagnostics are available for support review and stay outside the default operator view.
@endif