Notifications

@if(Auth::user()->unreadNotifications->count() > 0)
@csrf Mark All as Read
@endif
@if(session('status'))
{{ session('status') }}
@endif @if($notifications->isEmpty())
No notifications yet.
@else
@foreach($notifications as $notification) @php $data = $notification->data; $isUnread = $notification->read_at === null; $typeLabel = match($data['type'] ?? '') { 'new_issue' => 'New Issue', 'regression' => 'Regression', 'spike' => 'Spike', default => 'Notification', }; $typeColor = match($data['type'] ?? '') { 'new_issue' => 'bg-blue-100 text-blue-800', 'regression' => 'bg-orange-100 text-orange-800', 'spike' => 'bg-red-100 text-red-800', default => 'bg-gray-100 text-gray-600', }; @endphp
@if($isUnread) @else @endif
{{ $typeLabel }} {{ $data['project_name'] ?? '' }} {{ $notification->created_at->diffForHumans() }}

{{ $data['issue_title'] ?? '' }}

@if(($data['type'] ?? '') === 'spike')

{{ $data['event_count'] ?? 0 }} events in {{ $data['window_minutes'] ?? 0 }}m

@endif
@endforeach
{{ $notifications->links() }}
@endif