Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(chat): unify expand and drag-to-max rendering (MUL-2653) (#3235)
Naiyuan Qingc5b4c45e41bc
diff --git a/packages/views/chat/components/chat-window.tsx b/packages/views/chat/components/chat-window.tsxindex 266f46b30e..9c7c31d302 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 && <ChatResizeHandles onDragStart={startDrag} />}+ <ChatResizeHandles onDragStart={startDrag} />{/* Header — ⊕ new + session dropdown | window tools */}<div className="flex items-center justify-between border-b px-4 py-2.5 gap-2"><div className="flex items-center gap-1 min-w-0">