From 31cab6efd249cffab0eff53b3ceb57c0ac3cbbee Mon Sep 17 00:00:00 2001 From: Dotta Date: Tue, 3 Mar 2026 12:07:01 -0600 Subject: [PATCH] ui: persist issue properties pane visibility in localStorage Store the open/closed state of the properties panel in localStorage so it persists across navigations, issues, and companies. Co-Authored-By: Claude Opus 4.6 --- ui/src/components/Layout.tsx | 6 ++-- ui/src/components/PropertiesPanel.tsx | 6 ++-- ui/src/context/PanelContext.tsx | 40 ++++++++++++++++++++++++++- 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/ui/src/components/Layout.tsx b/ui/src/components/Layout.tsx index 471d902b..9c272b64 100644 --- a/ui/src/components/Layout.tsx +++ b/ui/src/components/Layout.tsx @@ -29,7 +29,7 @@ import { Button } from "@/components/ui/button"; export function Layout() { const { sidebarOpen, setSidebarOpen, toggleSidebar, isMobile } = useSidebar(); const { openNewIssue, openOnboarding } = useDialog(); - const { panelContent, closePanel } = usePanel(); + const { togglePanelVisible } = usePanel(); const { companies, loading: companiesLoading, selectedCompanyId, setSelectedCompanyId } = useCompany(); const { theme, toggleTheme } = useTheme(); const { companyPrefix } = useParams<{ companyPrefix: string }>(); @@ -88,9 +88,7 @@ export function Layout() { setSelectedCompanyId, ]); - const togglePanel = useCallback(() => { - if (panelContent) closePanel(); - }, [panelContent, closePanel]); + const togglePanel = togglePanelVisible; // Cmd+1..9 to switch companies const switchCompany = useCallback( diff --git a/ui/src/components/PropertiesPanel.tsx b/ui/src/components/PropertiesPanel.tsx index bc0e9346..f6ff9b0c 100644 --- a/ui/src/components/PropertiesPanel.tsx +++ b/ui/src/components/PropertiesPanel.tsx @@ -4,15 +4,15 @@ import { Button } from "@/components/ui/button"; import { ScrollArea } from "@/components/ui/scroll-area"; export function PropertiesPanel() { - const { panelContent, closePanel } = usePanel(); + const { panelContent, panelVisible, setPanelVisible } = usePanel(); - if (!panelContent) return null; + if (!panelContent || !panelVisible) return null; return (