From 6dd52b6d3d44d26a42c26d75b1938ba7903bb8cd Mon Sep 17 00:00:00 2001 From: scotttong Date: Wed, 28 Oct 2026 10:21:23 -0700 Subject: [PATCH] fix: reopen hidden desktop decision history Reveal the existing history panel on repeated clicks without losing responsive history behavior. Cover hiding and reopening the already-open tab. Co-Authored-By: Paperclip --- ui/src/components/coordinator/CoordinatorNeedsYou.test.tsx | 6 ++++++ ui/src/components/coordinator/CoordinatorNeedsYou.tsx | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/src/components/coordinator/CoordinatorNeedsYou.test.tsx b/ui/src/components/coordinator/CoordinatorNeedsYou.test.tsx index 70333b27c76..89cca25382e 100644 --- a/ui/src/components/coordinator/CoordinatorNeedsYou.test.tsx +++ b/ui/src/components/coordinator/CoordinatorNeedsYou.test.tsx @@ -209,5 +209,11 @@ describe("Coordinator Needs You", () => { await click("Decision history"); expect(fixture.openPanel).toHaveBeenCalled(); expect(fixture.setPanelVisible).toHaveBeenCalledWith(true); + // The shared desktop hide control changes visibility without closing + // this tab. Clicking history again must reveal the already-open tab. + fixture.setPanelVisible(false); + fixture.setPanelVisible.mockClear(); + await click("Decision history"); + expect(fixture.setPanelVisible).toHaveBeenCalledWith(true); }); }); diff --git a/ui/src/components/coordinator/CoordinatorNeedsYou.tsx b/ui/src/components/coordinator/CoordinatorNeedsYou.tsx index 8cb56c1bb24..58f7857a635 100644 --- a/ui/src/components/coordinator/CoordinatorNeedsYou.tsx +++ b/ui/src/components/coordinator/CoordinatorNeedsYou.tsx @@ -149,7 +149,7 @@ export function CoordinatorNeedsYou() { ]).entries()], [pendingItems, recentItems]); const filtersActive = Boolean(query.trim() || agentFilter || projectFilter); const closeHistory = useCallback(() => { setHistoryOpen(false); closePanel(); }, [closePanel]); - const showHistory = () => setHistoryOpen(true); + const showHistory = () => { setHistoryOpen(true); if (!isMobile) setPanelVisible(true); }; useEffect(() => { setBreadcrumbs([{ label: "Needs You" }]); }, [setBreadcrumbs]); useEffect(() => { setSettling([]); setHistoryOpen(false); setNow(Date.now()); closePanel();