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 <noreply@paperclip.ing>
This commit is contained in:
scotttongandPaperclip committed 2026-10-28 10:21:23 -07:00
1 parent 22f69c3042
commit 6dd52b6d3d
2 files changed
+7 -1

No files matched your search

@@ -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);
});
});
@@ -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();