diff --git a/vibn-frontend/app/[workspace]/project/[projectId]/(home)/logs/page.tsx b/vibn-frontend/app/[workspace]/project/[projectId]/(home)/logs/page.tsx index bf948697..43e85efe 100644 --- a/vibn-frontend/app/[workspace]/project/[projectId]/(home)/logs/page.tsx +++ b/vibn-frontend/app/[workspace]/project/[projectId]/(home)/logs/page.tsx @@ -81,6 +81,7 @@ export default function LogsPage() { name: string; }) => { setLogsLoading(true); + setLogs(null); // Clear previous logs immediately so user sees it loading try { let action = "apps.logs"; let payloadParams: Record = { uuid: item.id, lines: 100 }; diff --git a/vibn-frontend/app/api/mcp/route.ts b/vibn-frontend/app/api/mcp/route.ts index 1cc182ea..20498662 100644 --- a/vibn-frontend/app/api/mcp/route.ts +++ b/vibn-frontend/app/api/mcp/route.ts @@ -5294,7 +5294,8 @@ async function toolDatabasesLogs( const lines = Number.isFinite(linesRaw) ? linesRaw : 200; try { - const cmd = `cid=$(docker ps -a --filter name=${uuid} --format '{{.Names}}' | head -1); if [ -z "$cid" ]; then echo "NO_CONTAINER"; exit 0; fi; docker logs --tail ${lines} "$cid" 2>&1`; + // We add --timestamps (or -t) to get timestamps at the start of each row + const cmd = `cid=$(docker ps -a --filter name=${uuid} --format '{{.Names}}' | head -1); if [ -z "$cid" ]; then echo "NO_CONTAINER"; exit 0; fi; docker logs --timestamps --tail ${lines} "$cid" 2>&1`; const res = await runOnCoolifyHost(cmd, { timeoutMs: 15_000 }); if (res.code !== 0) {