@@ -55,31 +55,13 @@ const SidebarContainer: React.FC<SidebarContainerProps> = ({
5555 : wide
5656 ? "min(1200px, calc(100vw - 400px))"
5757 : "300px" ;
58- console . log ( "[SidebarContainer] width calc:" , { isCollapsed, customWidth, wide, computedWidth : width } ) ;
59-
60- // Track previous width to detect tab switches vs resize drags
61- // Tab switches: large width jumps (e.g., 400→976) - no animation wanted
62- // Resize drags: small incremental changes - smooth animation wanted
63- const prevWidthRef = React . useRef < string > ( width ) ;
64- const widthDelta = Math . abs (
65- parseInt ( width ) - parseInt ( prevWidthRef . current )
66- ) ;
67- // Consider it a "tab switch" if width changes by more than 50px in one render
68- const isTabSwitch = ! isNaN ( widthDelta ) && widthDelta > 50 ;
69-
70- React . useEffect ( ( ) => {
71- prevWidthRef . current = width ;
72- } , [ width ] ) ;
73-
74- // Only animate during resize (small incremental changes), not tab switches
75- const shouldAnimate = ! isResizing && ! isTabSwitch ;
76- console . log ( "[SidebarContainer] animation:" , { width, prevWidth : prevWidthRef . current , widthDelta, isTabSwitch, shouldAnimate } ) ;
7758
7859 return (
7960 < div
8061 className = { cn (
8162 "bg-sidebar border-l border-border-light flex flex-col overflow-hidden flex-shrink-0" ,
82- shouldAnimate && "transition-[width] duration-200" ,
63+ // Animate width changes (tab switches, collapse/expand) - disable during drag resize
64+ ! isResizing && "transition-[width] duration-200" ,
8365 // Mobile: full width
8466 "max-md:border-l-0 max-md:border-t max-md:border-border-light max-md:w-full max-md:relative max-md:max-h-[50vh]"
8567 ) }
@@ -228,13 +210,6 @@ const RightSidebarComponent: React.FC<RightSidebarProps> = ({
228210 // Use isCollapsed prop instead of returning null to keep DOM present for CSS transitions
229211 const isCollapsed = isHidden ;
230212 const wide = selectedTab === "review" && ! width ;
231- console . log ( "[RightSidebar] render:" , {
232- selectedTab,
233- width,
234- wide,
235- isCollapsed,
236- isHidden,
237- } ) ;
238213
239214 return (
240215 < SidebarContainer
0 commit comments