{{ __('Platform') }}
{{ __('API errors') }} {{ __('Caught third-party API failures the platform absorbed. Redacted at capture — never shown outside Super Admin.') }}
{{-- Summary band: total / errors / last seen --}}
{{ __('Total captured') }}
{{ $summary['total'] }}
{{ __('Failure rows') }}
{{ $summary['errors'] }}
{{ __('Last captured') }}
@if($summary['last_at']) {{ \Illuminate\Support\Carbon::parse($summary['last_at'])->diffForHumans() }} @else {{ __('—') }} @endif
{{-- Manual probe card. Lets the super-admin fire a fresh carrier lookup on demand — useful when the persisted shipment cache's 4-hour cooldown would otherwise short-circuit a self-help-driven refresh, or when chasing a specific tracking number without setting up a real customer session. Flushes both cache layers before the call so the lookup is guaranteed live. The result lands in the rows table below tagged with `flow_step_key = super_admin_probe`. --}} {{-- Probe card colour spec pinned to the canonical sky impact-notice bar from CLAUDE.md: `border-sky-200 bg-sky-50 text-sky-900 dark:border-sky-700/60 dark:bg-sky-900/30 dark:text-sky-100` — keep these tokens in lock-step with the Super Admin defaults edit pages or contrast will drift. --}}
{{ __('Run a manual lookup') }}

{{ __('Mind the carrier rate limits — each click hits the live API and burns one of your daily call budget.') }}

{{-- Landmark-only today. Royal Mail / future couriers wire in here AND inside `ApiErrors::runProbe()`'s match arm. --}} {{ __('Landmark') }}
@error('probeTrackingNumber')

{{ $message }}

@enderror
{{ __('Probe now') }} {{ __('Probing…') }}
{{-- Filters --}}
{{ __('Errors only') }} {{ __('All captured rows') }}
{{ __('All providers') }} @foreach($availableProviders as $providerOption) {{ ucwords(str_replace('_', ' ', $providerOption)) }} @endforeach
{{ __('All event types') }} @foreach($availableEvents as $eventOption) {{ $eventOption }} @endforeach
{{-- List --}}
@if($rows->total() === 0)

{{ __('Nothing to investigate') }}

{{ __('No API failures match the current filters.') }}

@else @foreach($rows as $row) @endforeach
{{ __('When') }} {{ __('Event') }} {{ __('Status') }} {{ __('Tracking #') }} {{ __('Reason') }} {{ __('Inspect') }}
{{ $row->occurred_at?->format('Y-m-d H:i:s') }}
{{ $row->occurred_at?->diffForHumans() }}
{{ $row->event_type }}
@if($row->provider)
{{ ucwords(str_replace('_', ' ', $row->provider)) }}
@endif
{{ $row->statusLabel() }} @if($row->response_status)
HTTP {{ $row->response_status }}
@endif
{{ $row->tracking_number ?: '—' }}
{{ $row->error_message ?: '—' }}
{{ __('Open') }}
@endif
{{ $rows->onEachSide(1)->links() }}
{{-- Inspector panel --}} @if($selectedRow)
{{ __('Inspecting row') }} #{{ $selectedRow->id }}
{{ $selectedRow->event_type }}
{{ __('Close') }}
{{ __('Final status') }}
{{ $selectedRow->statusLabel() }}
{{ __('Provider') }}
{{ $selectedRow->provider ?: '—' }}
{{ __('HTTP status') }}
{{ $selectedRow->response_status ?: '—' }}
{{ __('HTTP method') }}
{{ $selectedRow->http_method ?: '—' }}
{{ __('Endpoint') }}
{{ $selectedRow->endpoint ?: '—' }}
{{ __('Tracking number') }}
{{ $selectedRow->tracking_number ?: '—' }}
{{ __('Integration') }}
@if($selectedRow->integration_kind) {{ $selectedRow->integration_kind }}{{ $selectedRow->integration_id ? ' #'.$selectedRow->integration_id : '' }} @else — @endif
{{ __('Account / Store') }}
{{ $selectedRow->account_id ? 'account #'.$selectedRow->account_id : 'account —' }} / {{ $selectedRow->store_id ? 'store #'.$selectedRow->store_id : 'store —' }}
{{ __('Order / Shipment') }}
{{ $selectedRow->order_id ? 'order #'.$selectedRow->order_id : 'order —' }} / {{ $selectedRow->shipment_id ? 'shipment #'.$selectedRow->shipment_id : 'shipment —' }}
{{ __('Operator-safe message') }}
{{ $selectedRow->error_message ?: '—' }}
@if($selectedRow->error_class)
{{ __('Exception class') }}
{{ $selectedRow->error_class }}
@endif @if($selectedRow->parsed_result)
{{ __('Parsed result snapshot') }}
{{ json_encode($selectedRow->parsed_result, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
@endif
{{ __('Request body (redacted)') }}
{{ $selectedRow->request_body ?? '—' }}
{{ __('Response body (verbatim, capped at 64 KB)') }}
{{ $selectedRow->response_body ?? '—' }}
@endif