From cf82c853cf64479c6ac559353f461c88792f1814 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Mar 2026 16:15:56 +0000 Subject: [PATCH] [fix](trx-frontend-http): stabilize signal strength field width and BW overlay positioning Increase sig-strength-display min-width to 7.5rem so the field no longer resizes when the value switches between two-digit and three-digit numbers. Reposition the fast BW overlay immediately when bandwidth changes arrive via SSE, and force-display on bookmark apply so freq+bw render atomically instead of the BW bars wiggling from a stale intermediate state. https://claude.ai/code/session_01R2XBFEBL8CrsTx5inu25MA Signed-off-by: Claude --- .../trx-frontend/trx-frontend-http/assets/web/app.js | 2 ++ .../trx-frontend-http/assets/web/plugins/bookmarks.js | 3 ++- .../trx-frontend/trx-frontend-http/assets/web/style.css | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) 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 e7e3524..f043566 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 @@ -2969,6 +2969,8 @@ function render(update) { currentBandwidthHz = update.filter.bandwidth_hz; window.currentBandwidthHz = currentBandwidthHz; syncBandwidthInput(currentBandwidthHz); + // Reposition BW overlay immediately so freq+bw render together. + positionFastOverlay(lastFreqHz, currentBandwidthHz); if (window.refreshCwTonePicker) { window.refreshCwTonePicker(); } diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js index 766a56d..7bd3e18 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js @@ -388,7 +388,8 @@ async function bmApply(bm) { ++_freqOptimisticSeq; _freqOptimisticHz = bm.freq_hz; } - applyLocalTunedFrequency(bm.freq_hz); + // Force display so the BW overlay is repositioned even when freq is unchanged. + applyLocalTunedFrequency(bm.freq_hz, true); } if (typeof scheduleSpectrumDraw === "function" && typeof lastSpectrumData !== "undefined" && lastSpectrumData) { scheduleSpectrumDraw(); 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 32a10fb..9539c10 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 @@ -629,7 +629,7 @@ button:disabled { opacity: 0.6; cursor: not-allowed; } flex-shrink: 0; } .sig-strength-display { - min-width: 5.2rem; + min-width: 7.5rem; height: 3.35rem; padding: 0 0.7rem; border: 1px solid var(--border-light);