From ea407dee91e3958829f85d4db8be07ba8e4ea7d0 Mon Sep 17 00:00:00 2001 From: augusta Date: Sun, 18 Oct 2026 19:01:32 +0100 Subject: [PATCH 1/5] fix: turn the dashboard sidebar into a menu drawer on small screens (#544) Closes #544 Co-Authored-By: Claude Haiku 5.5 --- src/components/dashboard/DashboardShell.tsx | 41 +++++++++++++++++++-- src/components/dashboard/Sidebar.tsx | 5 ++- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/src/components/dashboard/DashboardShell.tsx b/src/components/dashboard/DashboardShell.tsx index 415a840..4397931 100644 --- a/src/components/dashboard/DashboardShell.tsx +++ b/src/components/dashboard/DashboardShell.tsx @@ -6,6 +6,8 @@ import { DashboardBackground } from "./DashboardBackground"; import { IdleLock } from "./IdleLock"; import { network } from "@/lib/network"; import type { User } from "@/lib/auth"; +import { useEffect, useState } from "react"; +import { usePathname } from "next/navigation"; /** Dashboard chrome: network banner, idle-warning banner, sidebar, topbar, content. */ export function DashboardShell({ @@ -21,6 +23,14 @@ export function DashboardShell({ blockNavigation?: (href: string) => boolean; children: React.ReactNode; }) { + const pathname = usePathname(); + const [menuOpen, setMenuOpen] = useState(false); + + // Close the mobile menu after navigating. + useEffect(() => { + setMenuOpen(false); + }, [pathname]); + return (
@@ -37,12 +47,35 @@ export function DashboardShell({ )}
- + + {menuOpen && ( + <> +