diff --git a/packages/views/chat/components/chat-window.tsx b/packages/views/chat/components/chat-window.tsx index 266f46b30..9c7c31d30 100644 --- a/packages/views/chat/components/chat-window.tsx +++ b/packages/views/chat/components/chat-window.tsx @@ -442,11 +442,8 @@ export function ChatWindow() { const isVisible = isOpen && (isExpanded || boundsReady); - const containerClass = isExpanded - ? "absolute inset-3 z-50 flex flex-col rounded-xl ring-1 ring-foreground/10 bg-sidebar shadow-2xl overflow-hidden" - : "absolute bottom-2 right-2 z-50 flex flex-col rounded-xl ring-1 ring-foreground/10 bg-sidebar shadow-2xl overflow-hidden"; + const containerClass = "absolute bottom-2 right-2 z-50 flex flex-col rounded-xl ring-1 ring-foreground/10 bg-sidebar shadow-2xl overflow-hidden"; const containerStyle: React.CSSProperties = { - ...(!isExpanded ? { width: renderWidth, height: renderHeight } : {}), transformOrigin: "bottom right", pointerEvents: isOpen ? "auto" : "none", }; @@ -456,21 +453,21 @@ export function ChatWindow() { ref={windowRef} className={containerClass} style={containerStyle} - layout="position" - initial={{ opacity: 0, scale: 0.95 }} + initial={{ opacity: 0, scale: 0.95, width: renderWidth, height: renderHeight }} animate={{ opacity: isVisible ? 1 : 0, scale: isVisible ? 1 : 0.95, + width: renderWidth, + height: renderHeight, }} transition={{ - layout: isDragging - ? { duration: 0 } - : { type: "spring", duration: 0.3, bounce: 0 }, + width: isDragging ? { duration: 0 } : { type: "spring", duration: 0.3, bounce: 0 }, + height: isDragging ? { duration: 0 } : { type: "spring", duration: 0.3, bounce: 0 }, opacity: { duration: 0.15 }, scale: { type: "spring", duration: 0.2, bounce: 0 }, }} > - {!isExpanded && } + {/* Header — ⊕ new + session dropdown | window tools */}