From b23f05966f364d1d087402f9c08d21012e009f96 Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Fri, 6 Mar 2026 22:33:02 +0100 Subject: [PATCH] [fix](trx-frontend-http): show CW bar line as it decodes, not after flush Prepend the in-progress line to the bar render so characters appear immediately rather than waiting for a newline or 5s gap. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Stan Grams --- .../trx-frontend/trx-frontend-http/assets/web/plugins/cw.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/cw.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/cw.js index 477d443..54f46e7 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/cw.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/cw.js @@ -69,7 +69,9 @@ function updateCwBar() { const isCw = mode === "CW" || mode === "CWR"; const cutoffMs = Date.now() - CW_BAR_WINDOW_MS; const recent = cwBarHistory.filter((l) => l.tsMs >= cutoffMs); - if (!isCw || recent.length === 0) { + // Prepend the in-progress line so characters appear immediately + const liveLines = cwBarCurrentLine && cwBarCurrentLine.text ? [cwBarCurrentLine, ...recent] : recent; + if (!isCw || liveLines.length === 0) { cwBarOverlay.style.display = "none"; return; } @@ -82,7 +84,7 @@ function updateCwBar() { ' aria-label="Clear CW overlay">Clear' + 'Last 15 minutes' + ''; - for (const line of recent.slice(0, 8)) { + for (const line of liveLines.slice(0, 8)) { const ts = line.ts ? `${line.ts}` : ""; const meta = [ line.wpm ? `${line.wpm} WPM` : null,