From 2c05090b1ad7a66969e2de0813a3fcc006478c2f Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 3 Oct 2026 18:19:40 -0700 Subject: [PATCH] refactor(lens): name the run now handler in investigations view --- .../lens/investigations/InvestigationsView.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ui/litellm-dashboard/src/components/lens/investigations/InvestigationsView.tsx b/ui/litellm-dashboard/src/components/lens/investigations/InvestigationsView.tsx index 7b1babb5333..79946b8cfd5 100644 --- a/ui/litellm-dashboard/src/components/lens/investigations/InvestigationsView.tsx +++ b/ui/litellm-dashboard/src/components/lens/investigations/InvestigationsView.tsx @@ -25,7 +25,7 @@ import { WorkerDialog } from "../setup/worker/WorkerDialog"; import { useAnalysisKeyInfo } from "../setup/worker/AnalysisKeyDetails"; import { InvestigationList } from "./InvestigationList"; import { HeaderActions } from "../HeaderActions"; -import { RunNowDialog } from "./detail/RunNowDialog"; +import { RunNowDialog, type RunWindow } from "./detail/RunNowDialog"; import { findFinding, findingAgents, findingKey, sampledExecutions } from "../model/inbox"; import { WatchAllBanner } from "./WatchAllBanner"; import { MonitoringDialog } from "../setup/MonitoringDialog"; @@ -139,6 +139,11 @@ export function InvestigationsView({ refresh(); }; const openFinding = (owner: Lens, picked: Finding) => setIssueKey(findingKey(owner, picked)); + const runNow = async (id: string, request: RunWindow) => { + await update((api) => api.startRun(id, request)); + closeDialog(); + selectLens(id); + }; const closeFinding = () => { setFindingId(null); setIssueKey(null); @@ -278,11 +283,7 @@ export function InvestigationsView({ agents={Array.isArray(agents.data) ? agents.data : []} busy={busy} onClose={closeDialog} - onRun={async (request) => { - await update((api) => api.startRun(targetLens.id, request)); - closeDialog(); - selectLens(targetLens.id); - }} + onRun={(request) => runNow(targetLens.id, request)} /> )} {workerSetup && (