From f0ab3e315baf2416cafd4d757bfb79ba15202a1c Mon Sep 17 00:00:00 2001 From: 0xjjjjjj <0xjjjjjj@users.noreply.github.com> Date: Sat, 7 Mar 2026 20:19:39 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20address=20Copilot=20review=20=E2=80=94?= =?UTF-8?q?=20z-index,=20Escape=20key,=20signed-out=20UX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Raise header to z-50 so toggle button stays clickable above backdrop - Use document keydown listener for Escape instead of onKeyDown on backdrop - Only render hamburger toggle when signed in - Make SignedOutPanel col-span responsive (col-span-1 on mobile) Co-Authored-By: Claude Opus 4.6 --- .../src/components/auth/SignedOutPanel.tsx | 2 +- .../components/templates/DashboardShell.tsx | 35 ++++++++++++------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/auth/SignedOutPanel.tsx b/frontend/src/components/auth/SignedOutPanel.tsx index e1c92264..f3912cfc 100644 --- a/frontend/src/components/auth/SignedOutPanel.tsx +++ b/frontend/src/components/auth/SignedOutPanel.tsx @@ -20,7 +20,7 @@ export function SignedOutPanel({ buttonTestId, }: SignedOutPanelProps) { return ( -
+

{message}

setSidebarOpen((v) => !v), []); + // Dismiss sidebar on Escape + useEffect(() => { + if (!sidebarOpen) return; + const onKey = (e: KeyboardEvent) => { + if (e.key === "Escape") setSidebarOpen(false); + }; + document.addEventListener("keydown", onKey); + return () => document.removeEventListener("keydown", onKey); + }, [sidebarOpen]); + return (
-
+
- + {isSignedIn ? ( + + ) : null}
@@ -120,10 +132,7 @@ export function DashboardShell({ children }: { children: ReactNode }) {
e.key === "Escape" && toggleSidebar()} - role="button" - tabIndex={-1} - aria-label="Close navigation" + aria-hidden="true" /> ) : null}