diff --git a/changelog.json b/changelog.json index 74c10db..e4ae2d5 100644 --- a/changelog.json +++ b/changelog.json @@ -2,8 +2,12 @@ { "version": "0.25.0", "date": "", - "en": [], - "fr": [] + "en": [ + "Cluster: \"Hide worked\" no longer hides a spot that is a new prefix, county, grid or park in an entity already worked." + ], + "fr": [ + "Cluster : « Masquer les contactés » ne masque plus un spot qui est un nouveau préfixe, comté, carré ou parc dans une contrée déjà faite." + ] }, { "version": "0.24.9", diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 872fd07..e228e2a 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -90,7 +90,7 @@ import { ExportFieldsDialog } from '@/components/ExportFieldsDialog'; import { ShutdownProgress } from '@/components/ShutdownProgress'; import { ClusterGrid } from '@/components/ClusterGrid'; import { cleanSpotter, inferSpotMode, spotModeCategory, spotStatusKey } from '@/lib/spot'; -import { applySpotDisplay, readSpotDisplayOptions, SPOT_DISPLAY_OPTIONS_EXPOSED } from '@/lib/spotDisplay'; +import { applySpotDisplay, readSpotDisplayOptions, spotIsWorked, SPOT_DISPLAY_OPTIONS_EXPOSED } from '@/lib/spotDisplay'; import { GetRowColors } from '../wailsjs/go/main/App'; import { WorkedBeforeGrid } from '@/components/WorkedBeforeGrid'; import { NetControlPanel } from '@/components/NetControlPanel'; @@ -4780,7 +4780,16 @@ export default function App() { const k = spotStatusKey(s.dx_call, s.band ?? '', s.comment ?? '', s.freq_hz); const e = spotStatus[k]; if (!e) return false; - if (e.worked_call || e.status === 'worked') return false; + // A spot that is NEW for something is not "worked", whatever the entity + // says. The extra markers are orthogonal to the entity status — the same + // rule the band map already states — so a new prefix, county, grid or + // park in an entity worked years ago is exactly what an operator is + // hunting, and hiding it is the opposite of what was asked. + // + // Reported on BH2SWB and 4X9AA: both flagged NEW PFX, neither ever + // worked, both vanished the moment "hide worked" went on. + const isNew = !!(e.new_pota || e.new_county || e.new_pfx || e.new_grid); + if (!isNew && (e.worked_call || e.status === 'worked')) return false; } return true; } diff --git a/frontend/src/lib/spotDisplay.ts b/frontend/src/lib/spotDisplay.ts index c44426d..2c5f003 100644 --- a/frontend/src/lib/spotDisplay.ts +++ b/frontend/src/lib/spotDisplay.ts @@ -74,3 +74,16 @@ export function applySpotDisplay(s: T, o: SpotDisplayOptions): } return e; } + +// spotIsWorked answers "does this spot bring me nothing?", which is what the +// "hide worked" filter is really asking. +// +// The extra markers are ORTHOGONAL to the entity status — a spot can be a worked +// entity AND a new park, prefix, county or grid — so they win. Without that, a +// new prefix in an entity worked years ago vanished the moment the filter went +// on, which is the opposite of what an operator hunting prefixes wants. +export function spotIsWorked(e: Entry): boolean { + if (!e) return false; + if (e.new_pota || e.new_county || e.new_pfx || e.new_grid) return false; + return !!e.worked_call || e.status === 'worked'; +}