Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
Use form clientWidth for composer compact footer checks
Julius Marminge993b57851217
diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsxindex 3a0b616cd..4ce3398aa 100644--- a/apps/web/src/components/ChatView.tsx+++ b/apps/web/src/components/ChatView.tsx@@ -1904,10 +1904,11 @@ export default function ChatView({ threadId }: ChatViewProps) {useLayoutEffect(() => {const composerForm = composerFormRef.current;if (!composerForm) return;+ const measureComposerFormWidth = () => composerForm.clientWidth;composerFormHeightRef.current = composerForm.getBoundingClientRect().height;setIsComposerFooterCompact(- shouldUseCompactComposerFooter(composerForm.clientWidth, {+ shouldUseCompactComposerFooter(measureComposerFormWidth(), {hasWideActions: composerFooterHasWideActions,}),);@@ -1917,7 +1918,7 @@ export default function ChatView({ threadId }: ChatViewProps) {const [entry] = entries;if (!entry) return;- const nextCompact = shouldUseCompactComposerFooter(entry.contentRect.width, {+ const nextCompact = shouldUseCompactComposerFooter(measureComposerFormWidth(), {hasWideActions: composerFooterHasWideActions,});setIsComposerFooterCompact((previous) => (previous === nextCompact ? previous : nextCompact));