Add agent runs tab to detail page

This commit is contained in:
Dotta
2026-03-10 21:06:15 -05:00
parent 183d71eb7c
commit d3ac8722be

View File

@@ -311,7 +311,12 @@ export function AgentDetail() {
} }
return; return;
} }
const canonicalTab = activeView === "configuration" ? "configuration" : "dashboard"; const canonicalTab =
activeView === "configuration"
? "configuration"
: activeView === "runs"
? "runs"
: "dashboard";
if (routeAgentRef !== canonicalAgentRef || urlTab !== canonicalTab) { if (routeAgentRef !== canonicalAgentRef || urlTab !== canonicalTab) {
navigate(`/agents/${canonicalAgentRef}/${canonicalTab}`, { replace: true }); navigate(`/agents/${canonicalAgentRef}/${canonicalTab}`, { replace: true });
return; return;
@@ -558,15 +563,16 @@ export function AgentDetail() {
{!urlRunId && ( {!urlRunId && (
<Tabs <Tabs
value={activeView === "configuration" ? "configuration" : "dashboard"} value={activeView}
onValueChange={(value) => navigate(`/agents/${canonicalAgentRef}/${value}`)} onValueChange={(value) => navigate(`/agents/${canonicalAgentRef}/${value}`)}
> >
<PageTabBar <PageTabBar
items={[ items={[
{ value: "dashboard", label: "Dashboard" }, { value: "dashboard", label: "Dashboard" },
{ value: "configuration", label: "Configuration" }, { value: "configuration", label: "Configuration" },
{ value: "runs", label: "Runs" },
]} ]}
value={activeView === "configuration" ? "configuration" : "dashboard"} value={activeView}
onValueChange={(value) => navigate(`/agents/${canonicalAgentRef}/${value}`)} onValueChange={(value) => navigate(`/agents/${canonicalAgentRef}/${value}`)}
/> />
</Tabs> </Tabs>