TenantAtlas/resources/views/filament/widgets/workspace/workspace-recent-operations.blade.php
ahmido 3c3daae405 feat: normalize operator outcome taxonomy (#186)
## Summary
- introduce a shared operator outcome taxonomy with semantic axes, severity bands, and next-action policy
- apply the taxonomy to operations, evidence/review completeness, baseline semantics, and restore semantics
- harden badge rendering, tenant-safe filtering/search behavior, and operator-facing summary/notification wording
- add the spec kit artifacts, reference documentation, and regression coverage for diagnostic-vs-primary state handling

## Testing
- focused Pest coverage for taxonomy registry and badge guardrails
- operations presentation and notification tests
- evidence, baseline, restore, and tenant-scope regression tests

## Notes
- Livewire v4.0+ compliance is preserved in the existing Filament v5 stack
- panel provider registration remains unchanged in bootstrap/providers.php
- no new globally searchable resource was added; adopted resources remain tenant-safe and out of global search where required
- no new destructive action family was introduced; existing actions keep their current authorization and confirmation behavior
- no new frontend asset strategy was introduced; existing deploy flow with filament:assets remains unchanged

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #186
2026-03-22 12:13:34 +00:00

68 lines
3.4 KiB
PHP

<x-filament::section heading="Recent operations">
@if ($operations === [])
<div class="flex h-full flex-col justify-between gap-4">
<div class="space-y-2">
<p class="text-sm font-medium text-gray-950 dark:text-white">
{{ $emptyState['title'] ?? 'No recent operations yet' }}
</p>
<p class="text-sm leading-6 text-gray-600 dark:text-gray-300">
{{ $emptyState['body'] ?? 'Workspace-wide activity will show up here once syncs, evaluations, or restores start running.' }}
</p>
</div>
@if (filled($emptyState['action_url'] ?? null))
<div>
<x-filament::link :href="$emptyState['action_url']" size="sm">
{{ $emptyState['action_label'] ?? 'Open operations' }}
</x-filament::link>
</div>
@endif
</div>
@else
<div class="space-y-3">
@foreach ($operations as $operation)
<a
href="{{ $operation['url'] }}"
class="block rounded-xl border border-gray-200 bg-gray-50 p-4 transition hover:border-gray-300 hover:bg-white dark:border-white/10 dark:bg-white/5 dark:hover:border-white/20 dark:hover:bg-white/10"
>
<div class="flex items-start justify-between gap-3">
<div class="min-w-0 space-y-2">
<div class="flex flex-wrap items-center gap-2">
<div class="text-sm font-semibold text-gray-950 dark:text-white">
{{ $operation['title'] }}
</div>
@if (filled($operation['tenant_label'] ?? null))
<span class="inline-flex items-center rounded-full border border-gray-200 bg-white px-2 py-0.5 text-xs font-medium text-gray-600 dark:border-white/10 dark:bg-white/10 dark:text-gray-300">
{{ $operation['tenant_label'] }}
</span>
@endif
</div>
<div class="flex flex-wrap items-center gap-2">
<x-filament::badge :color="$operation['status_color']" size="sm">
{{ $operation['status_label'] }}
</x-filament::badge>
<x-filament::badge :color="$operation['outcome_color']" size="sm">
{{ $operation['outcome_label'] }}
</x-filament::badge>
</div>
@if (filled($operation['guidance'] ?? null))
<p class="text-xs leading-5 text-gray-600 dark:text-gray-300">
{{ $operation['guidance'] }}
</p>
@endif
</div>
<div class="shrink-0 text-xs text-gray-500 dark:text-gray-400">
{{ $operation['started_at'] }}
</div>
</div>
</a>
@endforeach
</div>
@endif
</x-filament::section>