From fc02ae2b562a3c608b41302d84d69b29415b927c Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 19 Oct 2026 21:36:15 +0200 Subject: build-log: show the last attempt's log, not always build.log slackrepo writes one log per command (build, rebuild, update, remove). A failed update left build.log from an older successful build, so the viewer showed a success next to a failed result. The helper (0.4.1) now returns the newest command log and its name, which the viewer shows in the title and header. Co-Authored-By: Claude Opus 5.5 --- sb_builder/results.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sb_builder/results.py') diff --git a/sb_builder/results.py b/sb_builder/results.py index 30a3adc..1fc6b9a 100644 --- a/sb_builder/results.py +++ b/sb_builder/results.py @@ -44,16 +44,17 @@ class LogViewer(QDialog): def __init__(self, path, log, parent=None): super().__init__(parent) - self.setWindowTitle(f"{path}: build log") + name = log.get("name", "build.log") + self.setWindowTitle(f"{path}: {name}") self.resize(1000, 700) self.text = QPlainTextEdit(readOnly=True) self.text.setFont(QFontDatabase.systemFont(QFontDatabase.SystemFont.FixedFont)) parts = [] # resource.log first: the end of build.log, where it failed, stays last if log["resource"]: parts.append("──── resource.log ────\n" + ANSI.sub("", log["resource"]) + "\n") - parts.append("──── build.log ────\n") + parts.append(f"──── {name} ────\n") if log["truncated"]: - parts.append("[... start of build.log truncated, showing its end ...]\n") + parts.append(f"[... start of {name} truncated, showing its end ...]\n") parts.append(ANSI.sub("", log["build"])) self.text.setPlainText("".join(parts)) self.text.moveCursor(QTextCursor.MoveOperation.End) -- cgit v1.2.3