## 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
3.8 KiB
3.8 KiB
Quickstart: Structured Snapshot Rendering & Type-Agnostic Item Browser
Feature: 130-structured-snapshot-rendering | Date: 2026-03-09
Scope
This feature upgrades the workspace-scoped baseline snapshot detail view by:
- replacing raw JSON as the primary snapshot detail UX,
- introducing a normalized summary-first presentation model,
- rendering all captured policy types through a grouped item browser,
- keeping groups collapsed by default,
- preserving richer RBAC detail as an enrichment layer,
- adding initial structured rendering for
deviceCompliancePolicy, - keeping raw technical payload secondary and collapsed.
Implementation order
- Create the normalized snapshot rendering primitives under
app/Services/Baselines/SnapshotRendering. - Implement the page-level presenter and type-renderer registry with fallback resolution.
- Extract current
intuneRoleDefinitionmapping into a dedicated renderer. - Add initial
deviceCompliancePolicystructured rendering. - Introduce centralized fidelity and gap badge semantics.
- Rebuild the
BaselineSnapshotResourcedetail infolist around metadata, summary, groups, and technical disclosure. - Update existing snapshot visibility tests to the new layout and add focused presenter and fallback coverage.
- Run focused Sail-based tests.
- Run Pint on dirty files.
Reference files
- app/Filament/Resources/BaselineSnapshotResource.php
- app/Filament/Resources/BaselineSnapshotResource/Pages/ViewBaselineSnapshot.php
- app/Models/BaselineSnapshot.php
- app/Models/BaselineSnapshotItem.php
- app/Support/Badges/BadgeCatalog.php
- app/Support/Badges/BadgeRenderer.php
- resources/views/filament/infolists/entries/snapshot-json.blade.php
- resources/views/filament/infolists/entries/settings-catalog-grouped.blade.php
- resources/views/filament/infolists/entries/restore-results.blade.php
- tests/Feature/Filament/BaselineSnapshotFidelityVisibilityTest.php
- tests/Feature/Guards/FilamentTableStandardsGuardTest.php
Suggested validation commands
vendor/bin/sail artisan test --compact tests/Feature/Filament/BaselineSnapshotFidelityVisibilityTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/BaselineSnapshotStructuredRenderingTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/BaselineSnapshotFallbackRenderingTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/BaselineSnapshotAuthorizationTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/BaselineSnapshotDegradedStateTest.php
vendor/bin/sail artisan test --compact tests/Unit/Baselines/SnapshotRendering
vendor/bin/sail bin pint --dirty --format agent
Expected outcome
- Snapshot detail opens with a structured summary instead of raw JSON.
- Every captured policy type is visible in both the summary and grouped browser.
- Unsupported or newly added types render through the fallback contract instead of disappearing.
intuneRoleDefinitionremains rich but is no longer the only first-class inspectable type.deviceCompliancePolicyappears as a first-class structured group.- Fidelity and gap states are explicit and centralized.