From 4f34fd419d334c70d930ec6adaef35240641364c Mon Sep 17 00:00:00 2001 From: PeterChrz Date: Mon, 5 Oct 2026 00:47:04 -0400 Subject: [PATCH] feat: suite filter narrows visible suite rows within each band When a suite filter is active, the per-band view now shows only the selected suite rows instead of all suites in the band. Category total strips (Devlogic/Sysops) are hidden during suite filtering since they aggregate over all suites and would be misleading for cross-band comparison. Clearing the suite filter restores all suite rows and totals. --- .../views/livewire/summary/index.blade.php | 16 +++- tests/Feature/SessionSummaryTest.php | 76 +++++++++++++++++++ 2 files changed, 88 insertions(+), 4 deletions(-) diff --git a/resources/views/livewire/summary/index.blade.php b/resources/views/livewire/summary/index.blade.php index 77844e8..3467b75 100644 --- a/resources/views/livewire/summary/index.blade.php +++ b/resources/views/livewire/summary/index.blade.php @@ -247,11 +247,16 @@ class="cursor-pointer" @php $devlogicSuites = ['softbench', 'prosebench', 'psychbench', 'depthsweep']; $sysopsSuites = ['infrabench', 'scenariobench']; - $devlogicRows = $session->suites->filter(fn ($r) => in_array($r->suite, $devlogicSuites)); - $sysopsRows = $session->suites->filter(fn ($r) => in_array($r->suite, $sysopsSuites)); + $suiteFilterActive = ! empty($this->filters['suite']); + $visibleSuites = $suiteFilterActive + ? $session->suites->filter(fn ($r) => in_array($r->suite, $this->filters['suite'], true)) + : $session->suites; + $devlogicRows = $visibleSuites->filter(fn ($r) => in_array($r->suite, $devlogicSuites)); + $sysopsRows = $visibleSuites->filter(fn ($r) => in_array($r->suite, $sysopsSuites)); @endphp {{-- Devlogic section: total strip + column headers + suite rows --}} - @if ($devlogicRows->isNotEmpty() && $session->band->devlogic_tps !== null) + @if ($devlogicRows->isNotEmpty() && ($suiteFilterActive || $session->band->devlogic_tps !== null)) + @unless ($suiteFilterActive)
{{ __('Devlogic total') }} @@ -267,6 +272,7 @@ class="cursor-pointer" ✘ {{ $session->band->devlogic_failed }}
+ @endunless @endif {{-- Sysops section: total strip + column headers + suite rows --}} - @if ($sysopsRows->isNotEmpty() && $session->band->sysops_tps !== null) + @if ($sysopsRows->isNotEmpty() && ($suiteFilterActive || $session->band->sysops_tps !== null)) + @unless ($suiteFilterActive)
{{ __('Sysops total') }} @@ -324,6 +331,7 @@ class="flex flex-wrap items-center gap-x-4 gap-y-1 px-4 py-2.5 hover:bg-zinc-50 ✘ {{ $session->band->sysops_failed }}
+ @endunless