From cf79df110a7256875dd815c9f5550057bdf493aa Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Mar 2026 20:58:40 +0000 Subject: [PATCH] [fix](trx-frontend-http): map filter affects statistics, tooltips show receiver rig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Statistics panels (longest paths, strongest/weakest signals) now respect all active map filters — source type, rig selector, band, search, and history. Locator tooltips display which rig received each decoded frame. https://claude.ai/code/session_01LT7zBnb2kQiYpeTuWNXHsT Signed-off-by: Claude --- .../trx-frontend-http/assets/web/app.js | 21 ++++++++++++++++++- .../trx-frontend-http/assets/web/style.css | 6 ++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js index 9a2bbea..ffd7c69 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js @@ -6877,6 +6877,10 @@ function buildDecodeLocatorTooltipHtml(grid, entry, type) { Number.isFinite(detail?.dt_s) ? `dt ${Number(detail.dt_s).toFixed(2)}` : null, escapeMapHtml(freq), ].filter(Boolean).join(" · "); + const rxLabel = _receiverLabel(detail?.remote); + const rxHtml = rxLabel + ? `
${escapeMapHtml(rxLabel)}
` + : ""; const message = detail?.message ? `
${escapeMapHtml(String(detail.message))}
` : ""; @@ -6886,6 +6890,7 @@ function buildDecodeLocatorTooltipHtml(grid, entry, type) { `${escapeMapHtml(formatDecodeLocatorTime(Number(detail?.ts_ms)))}` + `` + (meta ? `
${meta}
` : "") + + rxHtml + message + ``; }) @@ -6977,6 +6982,15 @@ function _receiverLabel(rigId) { return name; } +function _locatorEntryVisibleOnMap(entry) { + return entry?.marker && aprsMap && aprsMap.hasLayer(entry.marker); +} + +function _detailPassesRigFilter(detail) { + if (!mapRigFilter) return true; + return detail?.remote === mapRigFilter; +} + function renderMapQsoSummary() { const listEl = document.getElementById("map-qso-summary-list"); if (!listEl) return; @@ -6984,7 +6998,8 @@ function renderMapQsoSummary() { const entries = Array.from(decodeContactPaths.values()) .filter((entry) => entry && Number.isFinite(entry.distanceKm) - && decodeContactPathMatchesCurrentMap(entry)) + && decodeContactPathMatchesCurrentMap(entry) + && _detailPassesRigFilter(entry)) .sort((a, b) => { const distanceDelta = Number(b.distanceKm) - Number(a.distanceKm); if (Math.abs(distanceDelta) > 0.001) return distanceDelta; @@ -7094,9 +7109,11 @@ function renderMapSignalSummary() { const bestByStation = new Map(); for (const entry of locatorMarkers.values()) { if (!entry || (entry.sourceType !== "ft8" && entry.sourceType !== "ft4" && entry.sourceType !== "ft2" && entry.sourceType !== "wspr")) continue; + if (!_locatorEntryVisibleOnMap(entry)) continue; if (!(entry.stationDetails instanceof Map)) continue; for (const detail of entry.stationDetails.values()) { if (!Number.isFinite(detail?.snr_db)) continue; + if (!_detailPassesRigFilter(detail)) continue; const station = String(detail?.source || detail?.station || "").trim().toUpperCase(); if (!station) continue; const snrDb = Number(detail.snr_db); @@ -7217,9 +7234,11 @@ function renderMapWeakSignalSummary() { const worstByStation = new Map(); for (const entry of locatorMarkers.values()) { if (!entry || (entry.sourceType !== "ft8" && entry.sourceType !== "ft4" && entry.sourceType !== "ft2" && entry.sourceType !== "wspr")) continue; + if (!_locatorEntryVisibleOnMap(entry)) continue; if (!(entry.stationDetails instanceof Map)) continue; for (const detail of entry.stationDetails.values()) { if (!Number.isFinite(detail?.snr_db)) continue; + if (!_detailPassesRigFilter(detail)) continue; const station = String(detail?.source || detail?.station || "").trim().toUpperCase(); if (!station) continue; const snrDb = Number(detail.snr_db); diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/style.css b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/style.css index 9539c10..119dae6 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/style.css +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/style.css @@ -2311,6 +2311,12 @@ body.map-fake-fullscreen-active { font-size: 0.74rem; color: var(--text-muted); } +.decode-locator-tip-rx { + margin-top: 0.12rem; + font-size: 0.72rem; + color: var(--accent-yellow); + opacity: 0.85; +} .decode-locator-tip-note { margin-top: 0.2rem; font-size: 0.76rem;