Side menu fold
The Lifecycle
Transitions Explained
The sidebar is expanded by default. The desktop toggle or shortcut folds it, and choosing a rail section expands it. CollapseSidebar remembers whether the menu was open on arrival, folds it if needed and restores it on unmount.
What Cannot Happen
A page reached with the sidebar already closed does not schedule restoration. The restoring page does not track later manual preferences: if it originally folded an open menu, unmount sets it open again.
Concurrency and Timing
The sidebar writes a cookie on open-state changes, but the shell does not read it to initialize the next load. Each tab holds its own fold. Mobile navigation uses a separate open state within SidebarProvider.