diff --git a/resources/views/livewire/summary/index.blade.php b/resources/views/livewire/summary/index.blade.php index 3467b75..e6419a1 100644 --- a/resources/views/livewire/summary/index.blade.php +++ b/resources/views/livewire/summary/index.blade.php @@ -18,9 +18,18 @@ 'suite' => [], ]; + /** @var array session_summary_id => expanded */ + public array $expanded = []; + public function updatedFilters(): void { $this->resetPage(); + $this->expanded = []; + } + + public function toggleExpand(int $sessionId): void + { + $this->expanded[$sessionId] = ! ($this->expanded[$sessionId] ?? false); } public function resetFilters(): void @@ -173,7 +182,7 @@ public function suites(): array
{{ __('FestBench - Benchmarks') }} - {{ __('GPU, model, suite scores — click a suite line for per-task detail.') }} + {{ __('GPU, model, suite scores — click a total to expand benchmark rows.') }}
{{ __('All task rows') }}
@@ -223,6 +232,7 @@ class="cursor-pointer" @if ($this->sessions->count() > 0)
@foreach ($this->sessions as $session) + @php $isExpanded = $this->expanded[$session->band->id] ?? false; @endphp
@@ -253,11 +263,17 @@ class="cursor-pointer" : $session->suites; $devlogicRows = $visibleSuites->filter(fn ($r) => in_array($r->suite, $devlogicSuites)); $sysopsRows = $visibleSuites->filter(fn ($r) => in_array($r->suite, $sysopsSuites)); + $hasDevlogic = $devlogicRows->isNotEmpty() && ($suiteFilterActive || $session->band->devlogic_tps !== null); + $hasSysops = $sysopsRows->isNotEmpty() && ($suiteFilterActive || $session->band->sysops_tps !== null); @endphp - {{-- Devlogic section: total strip + column headers + suite rows --}} - @if ($devlogicRows->isNotEmpty() && ($suiteFilterActive || $session->band->devlogic_tps !== null)) + {{-- Devlogic section: total strip (click to expand) + suite rows (when expanded) --}} + @if ($hasDevlogic) @unless ($suiteFilterActive) -
+
+ @endunless + @if ($isExpanded || $suiteFilterActive) + @endif @endif - {{-- Sysops section: total strip + column headers + suite rows --}} - @if ($sysopsRows->isNotEmpty() && ($suiteFilterActive || $session->band->sysops_tps !== null)) + {{-- Sysops section: total strip (click to expand) + suite rows (when expanded) --}} + @if ($hasSysops) @unless ($suiteFilterActive) -
+
+ @endunless + @if ($isExpanded || $suiteFilterActive) + @endif @endif @endforeach