From 9af27323143fd8253e2fc934532722a5033d59db Mon Sep 17 00:00:00 2001 From: Gregory Salaun Date: Wed, 5 Aug 2026 14:26:34 +0200 Subject: [PATCH] fix(cluster): WORKED chip filters worked-call only, not the entity status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The WORKED filter also matched the entity status 'worked' (entity/band/mode already worked, shown as a plain "—"), so selecting WORKED still listed spots of calls never worked. Match the 'worked' key only via worked_call (the blue WKD-CALL flag); a worked call still shows under NEW BAND / NEW SLOT. --- frontend/src/App.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index c528157..02fb6fa 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -4490,11 +4490,14 @@ export default function App() { const k = spotStatusKey(s.dx_call, s.band ?? '', s.comment ?? '', s.freq_hz); 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) + // WORKED means "I've worked THIS callsign" — the blue WKD-CALL flag — + // NOT the entity status 'worked' (entity/band/mode already worked, which + // the grid shows as a plain "—"). So the 'worked' key is matched ONLY via + // worked_call below; exclude the entity status 'worked' from the generic + // match, or every "already-worked-entity" spot would slip through. A + // worked call still matches its own entity status too (new-band/new-slot), + // so it stays visible under those chips. + const matches = (st !== 'worked' && clusterStatusFilter.has(st)) || (!!e?.worked_call && clusterStatusFilter.has('worked')) || (!!e?.new_pota && clusterStatusFilter.has('new-pota')) || (!!e?.new_county && clusterStatusFilter.has('new-county'))