From 6c47c27775c3992380a60fd60332e854f13f4789 Mon Sep 17 00:00:00 2001 From: Gregory Salaun Date: Tue, 4 Aug 2026 23:37:55 +0200 Subject: [PATCH] feat(logviewer): keep ~4x more history (1 MB tail) The viewer fetched only the last 256 KB (~1600 lines) of opslog.log. During a busy trace the oldest lines scrolled out of the window while the operator was still reading them. Raise the tail to 1 MB (~6500 lines); the backend already allows up to 4 MB. --- changelog.json | 6 ++++-- frontend/src/components/LogViewer.tsx | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/changelog.json b/changelog.json index 02cb063..5606ec6 100644 --- a/changelog.json +++ b/changelog.json @@ -3,10 +3,12 @@ "version": "0.23.5", "date": "", "en": [ - "CAT sharing (Hamlib rigctld): fixed a slow frequency drift in FT8. With a digital app (JTDX/WSJT-X) sharing OpsLog's rig in \"Fake It\" split, each transmit crept the dial down and never came back. The app follows the dial by polling, and our reply lagged the last tune by a poll cycle, so right after a transmission it read the still-shifted frequency, took it for a manual QSY and adopted it. Reads now echo the last commanded frequency until the rig confirms it — the dial holds. Applies to every backend, not just Kenwood." + "CAT sharing (Hamlib rigctld): fixed a slow frequency drift in FT8. With a digital app (JTDX/WSJT-X) sharing OpsLog's rig in \"Fake It\" split, each transmit crept the dial down and never came back. The app follows the dial by polling, and our reply lagged the last tune by a poll cycle, so right after a transmission it read the still-shifted frequency, took it for a manual QSY and adopted it. Reads now echo the last commanded frequency until the rig confirms it — the dial holds. Applies to every backend, not just Kenwood.", + "Log viewer: the window now keeps about four times more history (1 MB instead of 256 KB, ~6500 lines). During a busy trace the oldest lines used to scroll out of the buffer while you were still reading them; the larger window holds them." ], "fr": [ - "Partage CAT (rigctld Hamlib) : dérive lente de fréquence en FT8 corrigée. Avec une app numérique (JTDX/WSJT-X) partageant la radio d'OpsLog en split « Fake It », chaque passage en émission faisait descendre le VFO sans jamais revenir. L'app suit le VFO en l'interrogeant, et notre réponse était en retard d'un cycle sur la dernière syntonisation : juste après une émission elle lisait la fréquence encore décalée, la prenait pour un QSY manuel et l'adoptait. Les lectures renvoient désormais la dernière fréquence commandée jusqu'à confirmation de la radio — le VFO tient. Vaut pour tous les backends, pas seulement Kenwood." + "Partage CAT (rigctld Hamlib) : dérive lente de fréquence en FT8 corrigée. Avec une app numérique (JTDX/WSJT-X) partageant la radio d'OpsLog en split « Fake It », chaque passage en émission faisait descendre le VFO sans jamais revenir. L'app suit le VFO en l'interrogeant, et notre réponse était en retard d'un cycle sur la dernière syntonisation : juste après une émission elle lisait la fréquence encore décalée, la prenait pour un QSY manuel et l'adoptait. Les lectures renvoient désormais la dernière fréquence commandée jusqu'à confirmation de la radio — le VFO tient. Vaut pour tous les backends, pas seulement Kenwood.", + "Visionneuse de log : la fenêtre conserve environ quatre fois plus d'historique (1 Mo au lieu de 256 Ko, ~6500 lignes). Lors d'une trace chargée, les plus vieilles lignes défilaient hors du buffer pendant qu'on les lisait encore ; la fenêtre agrandie les garde." ] }, { diff --git a/frontend/src/components/LogViewer.tsx b/frontend/src/components/LogViewer.tsx index ab04d9c..1a22adb 100644 --- a/frontend/src/components/LogViewer.tsx +++ b/frontend/src/components/LogViewer.tsx @@ -21,7 +21,12 @@ import { TailLogFile, GetLogFilePath } from '../../wailsjs/go/main/App'; // 256 KB blob: with "cluster" or "acom" typed in, the window becomes exactly // the subsystem trace you would have grepped for. // • It polls only while open. A closed dialog costs nothing. -const TAIL_BYTES = 256 * 1024; +// 1 MB ≈ 6500 lines. The window is a sliding tail: once new lines push past it +// the oldest fall out of the fetched text entirely, so a small buffer dropped +// lines the operator was still reading during a busy trace (CAT/cluster/antenna +// polling). The backend caps this at 4 MB; 1 MB is a good balance against the +// per-poll payload while open. +const TAIL_BYTES = 1024 * 1024; const POLL_MS = 1000; export function LogViewer({ open, onOpenChange }: { open: boolean; onOpenChange: (v: boolean) => void }) {