diff --git a/packages/cli/src/ui/AppContainer.tsx b/packages/cli/src/ui/AppContainer.tsx index 84b51e5f2de..89edd5308ae 100644 --- a/packages/cli/src/ui/AppContainer.tsx +++ b/packages/cli/src/ui/AppContainer.tsx @@ -1137,11 +1137,9 @@ Logging in with Google... Restarting Gemini CLI to continue. useLayoutEffect(() => { if (mainControlsRef.current) { const fullFooterMeasurement = measureElement(mainControlsRef.current); - if ( - fullFooterMeasurement.height > 0 && - fullFooterMeasurement.height !== controlsHeight - ) { - setControlsHeight(fullFooterMeasurement.height); + const roundedHeight = Math.round(fullFooterMeasurement.height); + if (roundedHeight > 0 && roundedHeight !== controlsHeight) { + setControlsHeight(roundedHeight); } } }, [buffer, terminalWidth, terminalHeight, controlsHeight]); diff --git a/packages/cli/src/ui/components/shared/MaxSizedBox.tsx b/packages/cli/src/ui/components/shared/MaxSizedBox.tsx index 85ad4509ff6..fef1e11bd5e 100644 --- a/packages/cli/src/ui/components/shared/MaxSizedBox.tsx +++ b/packages/cli/src/ui/components/shared/MaxSizedBox.tsx @@ -52,7 +52,7 @@ export const MaxSizedBox: React.FC = ({ const observer = new ResizeObserver((entries) => { const entry = entries[0]; if (entry) { - setContentHeight(entry.contentRect.height); + setContentHeight(Math.round(entry.contentRect.height)); } }); observer.observe(node);