## Summary - replace the baseline snapshot detail page with a structured summary-first rendering flow - add a presenter plus renderer registry with RBAC, compliance, and fallback renderers - add grouped policy-type browsing, fidelity and gap badges, and workspace authorization coverage - add Feature 130 spec, plan, contract, research, quickstart, and completed task artifacts ## Testing - focused Pest coverage was added for structured rendering, fallback behavior, degraded states, authorization, presenter logic, renderer resolution, and badge mapping - I did not rerun the full validation suite in this final PR step ## Notes - base branch: `dev` - feature branch: `130-structured-snapshot-rendering` Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #158
37 lines
1.6 KiB
PHP
37 lines
1.6 KiB
PHP
@php
|
|
$technical = $getState() ?? [];
|
|
$summaryPayload = is_array($technical['summaryPayload'] ?? null) ? $technical['summaryPayload'] : [];
|
|
$groupPayloads = is_array($technical['groupPayloads'] ?? null) ? $technical['groupPayloads'] : [];
|
|
@endphp
|
|
|
|
<div class="space-y-4">
|
|
<div class="text-sm text-gray-600 dark:text-gray-300">
|
|
Technical payloads are secondary on purpose. Use them for debugging capture fidelity and renderer fallbacks.
|
|
</div>
|
|
|
|
<x-filament::section heading="Snapshot summary payload" collapsible :collapsed="true">
|
|
@include('filament.partials.json-viewer', ['value' => $summaryPayload])
|
|
</x-filament::section>
|
|
|
|
@if ($groupPayloads !== [])
|
|
<div class="space-y-3">
|
|
@foreach ($groupPayloads as $group)
|
|
@php
|
|
$label = $group['label'] ?? 'Policy type';
|
|
$payload = is_array($group['payload'] ?? null) ? $group['payload'] : [];
|
|
@endphp
|
|
|
|
<x-filament::section :heading="$label" collapsible :collapsed="true">
|
|
@if (! empty($group['renderingError']))
|
|
<div class="mb-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-200">
|
|
{{ $group['renderingError'] }}
|
|
</div>
|
|
@endif
|
|
|
|
@include('filament.partials.json-viewer', ['value' => $payload])
|
|
</x-filament::section>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|