fix(logs): fix terminal colors and payload rendering

This commit is contained in:
2026-06-14 12:43:09 -07:00
parent 95f54260c1
commit 7e67e480bb
2 changed files with 107 additions and 104 deletions

View File

@@ -44,11 +44,12 @@ export default function LogsPage() {
}),
});
const d = await r.json();
setLogs(
typeof d.result === "string"
? d.result
: JSON.stringify(d.result ?? d.error, null, 2),
);
let parsed = "";
try {
parsed = JSON.parse(d.result).logs;
} catch {}
setLogs(parsed || d.result || "No logs returned.");
} catch {
setLogs("Failed to load logs. Is the container running?");
} finally {