[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 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-03-27 16:15:56 +00:00
committed by Stan Grams
parent 434a7f899d
commit cf82c853cf
3 changed files with 5 additions and 2 deletions
@@ -2969,6 +2969,8 @@ function render(update) {
currentBandwidthHz = update.filter.bandwidth_hz; currentBandwidthHz = update.filter.bandwidth_hz;
window.currentBandwidthHz = currentBandwidthHz; window.currentBandwidthHz = currentBandwidthHz;
syncBandwidthInput(currentBandwidthHz); syncBandwidthInput(currentBandwidthHz);
// Reposition BW overlay immediately so freq+bw render together.
positionFastOverlay(lastFreqHz, currentBandwidthHz);
if (window.refreshCwTonePicker) { if (window.refreshCwTonePicker) {
window.refreshCwTonePicker(); window.refreshCwTonePicker();
} }
@@ -388,7 +388,8 @@ async function bmApply(bm) {
++_freqOptimisticSeq; ++_freqOptimisticSeq;
_freqOptimisticHz = bm.freq_hz; _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) { if (typeof scheduleSpectrumDraw === "function" && typeof lastSpectrumData !== "undefined" && lastSpectrumData) {
scheduleSpectrumDraw(); scheduleSpectrumDraw();
@@ -629,7 +629,7 @@ button:disabled { opacity: 0.6; cursor: not-allowed; }
flex-shrink: 0; flex-shrink: 0;
} }
.sig-strength-display { .sig-strength-display {
min-width: 5.2rem; min-width: 7.5rem;
height: 3.35rem; height: 3.35rem;
padding: 0 0.7rem; padding: 0 0.7rem;
border: 1px solid var(--border-light); border: 1px solid var(--border-light);