From ee9faf5b0136ae75b842d1dc72628afed317faaf Mon Sep 17 00:00:00 2001 From: Ahmed Darrazi Date: Fri, 20 Feb 2026 00:54:54 +0100 Subject: [PATCH] fix: declare action surface for baseline compare landing --- app/Filament/Pages/BaselineCompareLanding.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/Filament/Pages/BaselineCompareLanding.php b/app/Filament/Pages/BaselineCompareLanding.php index 8d2949f..7bde82e 100644 --- a/app/Filament/Pages/BaselineCompareLanding.php +++ b/app/Filament/Pages/BaselineCompareLanding.php @@ -14,6 +14,9 @@ use App\Services\Baselines\BaselineCompareService; use App\Support\Auth\Capabilities; use App\Support\OperationRunLinks; +use App\Support\Ui\ActionSurface\ActionSurfaceDeclaration; +use App\Support\Ui\ActionSurface\Enums\ActionSurfaceProfile; +use App\Support\Ui\ActionSurface\Enums\ActionSurfaceSlot; use BackedEnum; use Filament\Actions\Action; use Filament\Notifications\Notification; @@ -171,6 +174,17 @@ public function mount(): void $this->message = 'Baseline profile is assigned and has a snapshot. Run "Compare Now" to check for drift.'; } + public static function actionSurfaceDeclaration(): ActionSurfaceDeclaration + { + return ActionSurfaceDeclaration::forPage(ActionSurfaceProfile::ListOnlyReadOnly) + ->satisfy(ActionSurfaceSlot::ListHeader, 'Header action: Compare Now (confirmation modal, capability-gated).') + ->exempt(ActionSurfaceSlot::InspectAffordance, 'This is a tenant-scoped landing page, not a record inspect surface.') + ->exempt(ActionSurfaceSlot::ListRowMoreMenu, 'This page does not render table rows with secondary actions.') + ->exempt(ActionSurfaceSlot::ListBulkMoreGroup, 'This page has no bulk actions.') + ->satisfy(ActionSurfaceSlot::ListEmptyState, 'Page renders explicit empty states for missing tenant, missing assignment, and missing snapshot, with guidance messaging.') + ->exempt(ActionSurfaceSlot::DetailHeader, 'This page does not have a record detail header; it uses a page header action instead.'); + } + /** * @return array */