From 1dfcdf223e0223769f2d7bdf0d53c1201b498356 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 3 Oct 2026 17:31:32 -0700 Subject: [PATCH] feat(lens): keep the live run ambient until View run is clicked The drawer no longer opens on Run or when entering a running investigation. LiveRun takes reviews as a prop so it can move to a dedicated reviews endpoint. --- .../detail/InvestigationDetail.tsx | 2 +- .../lens/investigations/live/LiveRun.tsx | 37 +++++++++++-------- .../lens/investigations/live/LiveStrip.tsx | 21 ++++++----- .../lens/investigations/live/useLivePanels.ts | 13 ------- 4 files changed, 33 insertions(+), 40 deletions(-) diff --git a/ui/litellm-dashboard/src/components/lens/investigations/detail/InvestigationDetail.tsx b/ui/litellm-dashboard/src/components/lens/investigations/detail/InvestigationDetail.tsx index 2c4f37fcf6f..1a9d2297593 100644 --- a/ui/litellm-dashboard/src/components/lens/investigations/detail/InvestigationDetail.tsx +++ b/ui/litellm-dashboard/src/components/lens/investigations/detail/InvestigationDetail.tsx @@ -105,7 +105,7 @@ export function InvestigationDetail({ onCancel={readOnly ? undefined : () => void update((api) => api.cancelRun(lens.id))} /> )} - {live && } + {live && } {runNow && ( (null); - const playback = useReviewPlayback(job.reviews, live); - const model = analysisModel([...job.reviews.map((r) => r.model), ...modelsUsed(job.steps), job.settings.model]); - const { review: focused, following } = focusedReview(job.reviews, pinned, playback.current); - const issues = issueCount(job); + const playback = useReviewPlayback(reviews, live); + const withReviews = { ...job, reviews: [...reviews] }; + const model = analysisModel([...reviews.map((r) => r.model), ...modelsUsed(job.steps), job.settings.model]); + const { review: focused, following } = focusedReview(reviews, pinned, playback.current); + const issues = issueCount(withReviews); const reviewed = live ? shownCount(job.reviewed, playback) : job.reviewed; + const decided = decidedReviews(playback, playback.phase.verdict); + const pin = (review: Review) => setPinned(review === playback.current ? null : reviewKey(review)); const open = (review?: Review) => { - setPinned(review && review !== playback.current ? reviewKey(review) : null); + if (review) pin(review); setDrawerOpen(true); }; return ( <> - {stripOpen && ( + {stripOpen ? ( setStripOpen(false)} /> - )} - {!stripOpen && ( + ) : ( @@ -80,7 +81,7 @@ export function LiveStrip({ return (
@@ -107,10 +108,10 @@ export function LiveStrip({ )}
-
-