diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx index d7b46eea0abc0..976035f48979f 100644 --- a/apps/web/src/components/chat/ChatComposer.tsx +++ b/apps/web/src/components/chat/ChatComposer.tsx @@ -3742,6 +3742,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) data-chat-composer-footer-compact={isComposerFooterCompact ? "true" : "false"} className={cn( "flex min-w-0 flex-nowrap items-center justify-between gap-2 overflow-visible px-3 pb-3 sm:px-4 sm:pb-4", + !isComposerResting && "redesign:pb-2 redesign:sm:pb-2", pendingUserInputs.length > 0 && "pt-2", isComposerFooterCompact ? "gap-1.5" : "gap-2 sm:gap-0", showMobilePendingAnswerActions && "hidden sm:flex", diff --git a/apps/web/src/components/chat/useComposerRestingTransition.ts b/apps/web/src/components/chat/useComposerRestingTransition.ts index 64b18b6778019..0da421db9aace 100644 --- a/apps/web/src/components/chat/useComposerRestingTransition.ts +++ b/apps/web/src/components/chat/useComposerRestingTransition.ts @@ -172,7 +172,8 @@ export function useComposerRestingTransition( const nextActionTop = action?.getBoundingClientRect().top ?? null; const nextControlsRect = controls?.getBoundingClientRect() ?? null; const nextControlsTop = nextControlsRect?.top ?? null; - const footerBottom = footer ? nextRect.bottom - footer.getBoundingClientRect().bottom : 1; + const nextFooterRect = footer?.getBoundingClientRect(); + const footerBottom = nextFooterRect ? nextRect.bottom - nextFooterRect.bottom : 1; const previousHeight = interruptedHeight ?? previousHeightRef.current; const targetChanged = interruptedTargetHeight === null || Math.abs(interruptedTargetHeight - nextHeight) >= 0.5; @@ -213,11 +214,11 @@ export function useComposerRestingTransition( pinnedOverlayRef.current = overlay; } - if (footer) { + if (footer && nextFooterRect) { footer.style.position = "absolute"; footer.style.top = "auto"; footer.style.bottom = `${String(footerBottom)}px`; - footer.style.height = "3rem"; + footer.style.height = `${nextFooterRect.height}px`; if (nextIsCollapsed) { footer.style.left = "auto"; footer.style.right = "1px";