mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-29 12:59:13 +01:00
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:
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");
|
await click("Decision history");
|
||||||
expect(fixture.openPanel).toHaveBeenCalled();
|
expect(fixture.openPanel).toHaveBeenCalled();
|
||||||
expect(fixture.setPanelVisible).toHaveBeenCalledWith(true);
|
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]);
|
]).entries()], [pendingItems, recentItems]);
|
||||||
const filtersActive = Boolean(query.trim() || agentFilter || projectFilter);
|
const filtersActive = Boolean(query.trim() || agentFilter || projectFilter);
|
||||||
const closeHistory = useCallback(() => { setHistoryOpen(false); closePanel(); }, [closePanel]);
|
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(() => { setBreadcrumbs([{ label: "Needs You" }]); }, [setBreadcrumbs]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setSettling([]); setHistoryOpen(false); setNow(Date.now()); closePanel();
|
setSettling([]); setHistoryOpen(false); setNow(Date.now()); closePanel();
|
||||||
|
|||||||
Reference in new issue
Block a user