From d4e4c2c7d281c88567d856d45189d4b5e415681c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sun, 16 Aug 2026 00:11:27 +0200 Subject: [PATCH] Show the full resolved command and variables on the run detail page The command lived in a narrow truncate'd grid cell, so anything but a short invocation was unreadable. It now gets its own scrollable code block, plus a breakdown of each variable (using the script's configured labels when available) and the value it resolved to for that run. Co-Authored-By: Claude Sonnet 5 --- app/src/app/(app)/runs/[runId]/page.tsx | 56 ++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 6 deletions(-) diff --git a/app/src/app/(app)/runs/[runId]/page.tsx b/app/src/app/(app)/runs/[runId]/page.tsx index dfd8312..9c4a421 100644 --- a/app/src/app/(app)/runs/[runId]/page.tsx +++ b/app/src/app/(app)/runs/[runId]/page.tsx @@ -5,6 +5,7 @@ import { eq } from "drizzle-orm"; import { notFound } from "next/navigation"; import { getDb } from "@/lib/db/client"; import { runs } from "@/lib/db/schema"; +import { getScript } from "@/lib/config/load"; import { readLogTail } from "@/lib/runner/log-file"; import { RunTerminal } from "@/components/runs/run-terminal"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; @@ -13,6 +14,13 @@ interface RunDetailPageProps { params: Promise<{ runId: string }>; } +function formatVariableValue(value: unknown): string { + if (value === undefined || value === null || value === "") return "—"; + if (Array.isArray(value)) return value.length ? value.join(", ") : "—"; + if (typeof value === "boolean") return value ? "true" : "false"; + return String(value); +} + export async function generateMetadata({ params, }: RunDetailPageProps): Promise { @@ -35,12 +43,25 @@ export default async function RunDetailPage({ params }: RunDetailPageProps) { run.logFilePath, ); + const script = getScript(run.scriptId); + const variableEntries = script + ? script.variables.map((variable) => ({ + key: variable.name, + label: variable.label ?? variable.name, + value: run.variables[variable.name], + })) + : Object.entries(run.variables).map(([key, value]) => ({ + key, + label: key, + value, + })); + return (
{run.scriptName} -
+
Triggered by
{run.triggeredBy}
@@ -51,17 +72,40 @@ export default async function RunDetailPage({ params }: RunDetailPageProps) { {run.startedAt ? new Date(run.startedAt).toLocaleString() : "-"}
-
-
Command
-
{run.resolvedCommand}
-
Run ID
{run.id}
- + +
+ + Command + +
+              {run.resolvedCommand}
+            
+
+ + {variableEntries.length > 0 && ( +
+ + Variables + +
+ {variableEntries.map(({ key, label, value }) => ( +
+
{label}
+
+ {formatVariableValue(value)} +
+
+ ))} +
+
+ )} +