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.
This commit is contained in:
@@ -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 }) {
|
||||
|
||||
Reference in New Issue
Block a user