From 15e3fccebd4261ff9e6fa29b1779fa07e096a393 Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Sun, 4 Oct 2026 21:26:03 +0000 Subject: [PATCH] Console: the app log's parsed tail is 400 KB so a stuck update's lines stay on the card (PC 1's 'installing' scrolled out of 60 KB in 30 min) Co-Authored-By: Claude Fable 5.1 --- relay/api/console.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/relay/api/console.mjs b/relay/api/console.mjs index 06275da40..85a7c7516 100644 --- a/relay/api/console.mjs +++ b/relay/api/console.mjs @@ -57,8 +57,10 @@ function parseNodeTail(tail) { } async function machines(sql) { // node logs get a longer tail: the connection-manager (peers) line is rare on a busy node + // the app log's tail is wide (400 KB, about three hours on a PC that logs every block) so a stuck update's lines do + // not scroll out of the card: on 4 October 2026 PC 1's "installing 0.3.4" left the 60 KB window after 30 minutes const rows = await sql(`SELECT DISTINCT ON (label) label, machine, run_id, received_at, left(lines, 300) AS head, - right(lines, CASE WHEN label LIKE 'nodelog-%' THEN 80000 WHEN label ~ '^(win|mac)-[0-9a-f]{8}$' THEN 60000 ELSE 20000 END) AS tail + right(lines, CASE WHEN label LIKE 'nodelog-%' THEN 80000 WHEN label ~ '^(win|mac)-[0-9a-f]{8}$' THEN 400000 ELSE 20000 END) AS tail FROM miner_logs WHERE received_at > now() - interval '36 hours' ORDER BY label, received_at DESC`); const groups = new Map(); for (const r of rows) {