diff --git a/src/components/ClaudeCodeSession.tsx b/src/components/ClaudeCodeSession.tsx index f0f164f21..97d176373 100644 --- a/src/components/ClaudeCodeSession.tsx +++ b/src/components/ClaudeCodeSession.tsx @@ -141,6 +141,8 @@ export const ClaudeCodeSession: React.FC = ({ const unlistenRefs = useRef([]); const hasActiveSessionRef = useRef(false); const floatingPromptRef = useRef(null); + const floatingPromptBarRef = useRef(null); + const [floatingPromptBarHeight, setFloatingPromptBarHeight] = useState(0); const queuedPromptsRef = useRef>([]); const isMountedRef = useRef(true); const isListeningRef = useRef(false); @@ -1218,12 +1220,27 @@ export const ClaudeCodeSession: React.FC = ({ }; }, [effectiveSession, projectPath]); + // Keep the message list's bottom padding in sync with the floating prompt + // bar's real height so the last message never ends up hidden behind it. + useEffect(() => { + const barEl = floatingPromptBarRef.current; + if (!barEl) return; + + const updateHeight = () => setFloatingPromptBarHeight(barEl.offsetHeight); + updateHeight(); + + const observer = new ResizeObserver(updateHeight); + observer.observe(barEl); + return () => observer.disconnect(); + }, []); + const messagesList = (
= ({ )} -
+