@@ -30,27 +30,39 @@ export function SideMenuSection({
3030 } , [ isCollapsed , onCollapseToggle ] ) ;
3131
3232 return (
33- < div >
34- < motion . div
35- className = "flex cursor-pointer items-center gap-1 overflow-hidden rounded-sm py-1 pl-1.5 text-text-dimmed transition hover:bg-charcoal-750 hover:text-text-bright"
36- onClick = { handleToggle }
37- initial = { false }
38- animate = { {
39- height : isSideMenuCollapsed ? 0 : "auto" ,
40- opacity : isSideMenuCollapsed ? 0 : 1 ,
41- marginBottom : isSideMenuCollapsed ? 0 : undefined ,
42- } }
43- transition = { { duration : 0.15 , ease : "easeOut" } }
44- >
45- < h2 className = "text-xs whitespace-nowrap" > { title } </ h2 >
33+ < div className = "overflow-hidden" >
34+ { /* Header container - stays in DOM to preserve height */ }
35+ < div className = "relative" >
36+ { /* Header - fades out when sidebar is collapsed */ }
4637 < motion . div
47- initial = { isCollapsed }
48- animate = { { rotate : isCollapsed ? - 90 : 0 } }
49- transition = { { duration : 0.2 } }
38+ className = "flex cursor-pointer items-center gap-1 overflow-hidden rounded-sm py-1 pl-1.5 text-text-dimmed transition hover:bg-charcoal-750 hover:text-text-bright"
39+ onClick = { isSideMenuCollapsed ? undefined : handleToggle }
40+ style = { { cursor : isSideMenuCollapsed ? "default" : "pointer" } }
41+ initial = { false }
42+ animate = { {
43+ opacity : isSideMenuCollapsed ? 0 : 1 ,
44+ } }
45+ transition = { { duration : 0.15 , ease : "easeOut" } }
5046 >
51- < ToggleArrowIcon className = "size-2" />
47+ < h2 className = "text-xs whitespace-nowrap" > { title } </ h2 >
48+ < motion . div
49+ initial = { isCollapsed }
50+ animate = { { rotate : isCollapsed ? - 90 : 0 } }
51+ transition = { { duration : 0.2 } }
52+ >
53+ < ToggleArrowIcon className = "size-2" />
54+ </ motion . div >
5255 </ motion . div >
53- </ motion . div >
56+ { /* Divider - absolutely positioned, visible when sidebar is collapsed */ }
57+ < motion . div
58+ className = "absolute left-2 right-2 top-1 w-full h-px bg-grid-bright"
59+ initial = { false }
60+ animate = { {
61+ opacity : isSideMenuCollapsed ? 1 : 0 ,
62+ } }
63+ transition = { { duration : 0.15 , ease : "easeOut" } }
64+ />
65+ </ div >
5466 < AnimatePresence initial = { false } >
5567 < motion . div
5668 initial = { isCollapsed ? "collapsed" : "expanded" }
@@ -73,6 +85,7 @@ export function SideMenuSection({
7385 style = { { overflow : "hidden" } }
7486 >
7587 < motion . div
88+ className = "space-y-px"
7689 variants = { {
7790 expanded : {
7891 translateY : 0 ,
0 commit comments