@endforeach
{{-- Tracked against what the roster asked for. The denominator is every
active employee, not only those who turned up — otherwise a day where
half the team never started reads as a flattering 100%. --}}
{{ $hm($today['active_sec']) }}
Tracked today
@if ($today['pct_of_target'] !== null)
{{ $today['pct_of_target'] }}% of {{ $hm($today['expected_sec']) }} rostered
@endif
{{-- ── 3. Needs a look ─────────────────────────────────────────────────
The part of this page worth opening. Each bucket answers a question
someone would otherwise go hunting for, and each is capped — forty
names is a report, not a signal. --}}
Needs a look
@if ($attention['clear'])
Nothing to flag
No late starts, overtime, low activity or silent agents today.
@else
@php
$buckets = [
['key' => 'late', 'total' => 'late_total', 'icon' => 'ti-clock-exclamation', 'colour' => 'orange',
'title' => 'Not started', 'hint' => 'their shift has begun with nothing tracked'],
['key' => 'silent', 'total' => 'silent_total', 'icon' => 'ti-plug-connected-x', 'colour' => 'red',
'title' => 'Agent silent', 'hint' => 'was tracking, then the data stopped'],
['key' => 'low', 'total' => 'low_total', 'icon' => 'ti-activity-heartbeat', 'colour' => 'yellow',
'title' => 'Low input activity', 'hint' => 'a long session with little keyboard or mouse'],
['key' => 'overtime', 'total' => 'overtime_total', 'icon' => 'ti-flame', 'colour' => 'green',
'title' => 'Over the rostered day', 'hint' => 'active beyond what the shift asked for'],
];
@endphp
@foreach ($buckets as $b)
@continue (empty($attention[$b['key']]))
{{-- A dash rather than 0%: before 1.15.0 the agent didn't
sample input, and "not measured" is not "idle". --}}
@if ($act === null)
No input measurement yet today — desktops on 1.15.0 or newer report it.
@endif
Idle{{ $hm($today['idle_sec']) }}
Rostered{{ $hm($today['expected_sec']) }}
Screenshots{{ number_format($today['shots']) }}
{{-- Is the monitoring itself healthy? A fleet quietly running an
old build is the sort of thing nobody notices until a fix
appears not to have shipped. --}}
{{-- The activity share is drawn INSIDE the day's bar rather
than beside it: it is a proportion of that day's time,
and a second bar would invite reading it as a total. --}}