fix(ui): align Latest Run header and render summary as markdown
Move the "Latest Run" / "View details" header row outside the bordered card so it aligns flush with other section headers (e.g. Recent Issues). Render the run summary using MarkdownBody with max-height truncation instead of plain text. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@ import { adapterLabels, roleLabels } from "../components/agent-config-primitives
|
|||||||
import { getUIAdapter, buildTranscript } from "../adapters";
|
import { getUIAdapter, buildTranscript } from "../adapters";
|
||||||
import type { TranscriptEntry } from "../adapters";
|
import type { TranscriptEntry } from "../adapters";
|
||||||
import { StatusBadge } from "../components/StatusBadge";
|
import { StatusBadge } from "../components/StatusBadge";
|
||||||
|
import { MarkdownBody } from "../components/MarkdownBody";
|
||||||
import { CopyText } from "../components/CopyText";
|
import { CopyText } from "../components/CopyText";
|
||||||
import { EntityRow } from "../components/EntityRow";
|
import { EntityRow } from "../components/EntityRow";
|
||||||
import { Identity } from "../components/Identity";
|
import { Identity } from "../components/Identity";
|
||||||
@@ -620,10 +621,7 @@ function LatestRunCard({ runs, agentId }: { runs: HeartbeatRun[]; agentId: strin
|
|||||||
: run.error ?? "";
|
: run.error ?? "";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn(
|
<div className="space-y-3">
|
||||||
"border rounded-lg p-4 space-y-3",
|
|
||||||
isLive ? "border-cyan-500/30 shadow-[0_0_12px_rgba(6,182,212,0.08)]" : "border-border"
|
|
||||||
)}>
|
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
{isLive && (
|
{isLive && (
|
||||||
@@ -642,6 +640,10 @@ function LatestRunCard({ runs, agentId }: { runs: HeartbeatRun[]; agentId: strin
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className={cn(
|
||||||
|
"border rounded-lg p-4 space-y-2",
|
||||||
|
isLive ? "border-cyan-500/30 shadow-[0_0_12px_rgba(6,182,212,0.08)]" : "border-border"
|
||||||
|
)}>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<StatusIcon className={cn("h-3.5 w-3.5", statusInfo.color, run.status === "running" && "animate-spin")} />
|
<StatusIcon className={cn("h-3.5 w-3.5", statusInfo.color, run.status === "running" && "animate-spin")} />
|
||||||
<StatusBadge status={run.status} />
|
<StatusBadge status={run.status} />
|
||||||
@@ -659,9 +661,11 @@ function LatestRunCard({ runs, agentId }: { runs: HeartbeatRun[]; agentId: strin
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{summary && (
|
{summary && (
|
||||||
<p className="text-xs text-muted-foreground truncate">{summary}</p>
|
<div className="overflow-hidden max-h-16">
|
||||||
|
<MarkdownBody className="[&>*:first-child]:mt-0 [&>*:last-child]:mb-0">{summary}</MarkdownBody>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user