From bd11bb476374882ba5351819f9e8e6adbeae9cdf Mon Sep 17 00:00:00 2001 From: rouggy Date: Thu, 18 Jun 2026 13:03:13 +0200 Subject: [PATCH] fix: bug where worked filter did not work in cluster --- frontend/src/App.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 99e3975..de64fa1 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -2316,8 +2316,14 @@ export default function App() { } if (clusterStatusFilter.size > 0) { const k = spotStatusKey(s.dx_call, s.band ?? '', s.comment ?? '', s.freq_hz); - const st = spotStatus[k]?.status || ''; - if (!clusterStatusFilter.has(st as SpotStatusKey)) return false; + const e = spotStatus[k]; + const st = (e?.status || '') as SpotStatusKey; + // A previously-worked call counts as WORKED for filtering even when its + // entity status is still new-band/new-slot (the grid flags it WKD CALL), + // matching the "Hide worked" toggle. Additive: it still matches its own + // entity status too, so it stays visible under NEW BAND / NEW SLOT. + const matches = clusterStatusFilter.has(st) || (!!e?.worked_call && clusterStatusFilter.has('worked')); + if (!matches) return false; } if (clusterHideWorked) { const k = spotStatusKey(s.dx_call, s.band ?? '', s.comment ?? '', s.freq_hz);