Skip to content

PSK Band Activity map overlay shows stale counts on quiet bands #1138

Description

@accius

Follow-up from #1136 (the dockable panel variant is NOT affected).

Symptom: the Band Activity Leaflet overlay only recomputes its per-band counts inside processSpots — i.e. when a new SSE batch arrives. On a quiet band (or overnight), spots that age past the retention window stay counted in the overlay until the next batch happens to arrive, so the bars overstate activity exactly when activity is lowest.

Why the dockable panel doesn't have this: PSKReporterBandActivityPanel recomputes from txReports/rxReports in a useMemo, and the hook's existing 30-second pruning interval refreshes that state — so docked counts self-expire.

Suggested fix (~5 lines): re-dispatch the psk-band-activity-changed CustomEvent from the pruning interval that already exists at src/hooks/usePSKReporter.js:197, so the overlay gets fresh counts on the same 30s cadence that expires the reports. While in there, consider extracting the band-count logic shared by the hook dispatch (usePSKReporter.js:99-112) and the panel memo into one helper — it currently exists twice and can drift.

Also nearby (optional, same file family): the insertBefore(contentTarget, container.querySelector('.psk-band-footer')) fallback in src/plugins/layers/usePSKReporterBandActivity.js:123 would throw if ever reached (after addMinimizeToggle wraps children, .psk-band-footer is no longer a direct child of container). Currently unreachable — worth fixing or removing while touching the overlay.

Attempted by @lbatalha in #1136 review round; moved here so the feature didn't stall on it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions