From 44ecc6416d10ae71b321c6d90590a09301f57dc2 Mon Sep 17 00:00:00 2001 From: Story Crater Bot <19826264+Riotpiaole@users.noreply.github.com> Date: Tue, 1 Sep 2026 11:25:09 -0700 Subject: [PATCH] fix: move resize handle to top-left corner (anchored bottom-right) --- components/InteractiveTerminal.tsx | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/components/InteractiveTerminal.tsx b/components/InteractiveTerminal.tsx index 9cd6bc1..b47abd9 100644 --- a/components/InteractiveTerminal.tsx +++ b/components/InteractiveTerminal.tsx @@ -112,7 +112,7 @@ export function InteractiveTerminal() { if (isOpen) inputRef.current?.focus() }, [isOpen]) - // Handle terminal resize + // Handle terminal resize (drag top-left, anchored bottom-right) useEffect(() => { const handleMouseMove = (e: MouseEvent) => { if (!isResizing) return @@ -120,8 +120,8 @@ export function InteractiveTerminal() { if (!container) return const rect = container.getBoundingClientRect() - const newWidth = Math.max(320, e.clientX - rect.left) - const newHeight = Math.max(300, e.clientY - rect.top) + const newWidth = Math.max(320, rect.right - e.clientX) + const newHeight = Math.max(300, rect.bottom - e.clientY) setWidth(newWidth) setHeight(newHeight) @@ -338,18 +338,23 @@ export function InteractiveTerminal() { - {/* Resize handle */} + {/* Resize handle — top-left corner */}