fix: remove excessive bottom padding causing gap between status bar and controls
The animated keyboard style was adding FOOTER_HEIGHT + insets.bottom as padding, creating a massive gap. Removed footer height from padding calculation - keyboard padding only needs to account for keyboard height, not footer. Fixed by Codex. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import { AgentStreamView } from "@/components/agent-stream-view";
|
|||||||
import { AgentInputArea } from "@/components/agent-input-area";
|
import { AgentInputArea } from "@/components/agent-input-area";
|
||||||
import { AgentStatusBar } from "@/components/agent-status-bar";
|
import { AgentStatusBar } from "@/components/agent-status-bar";
|
||||||
import { useSession } from "@/contexts/session-context";
|
import { useSession } from "@/contexts/session-context";
|
||||||
import { FOOTER_HEIGHT, useFooterControls } from "@/contexts/footer-controls-context";
|
import { useFooterControls } from "@/contexts/footer-controls-context";
|
||||||
|
|
||||||
export default function AgentScreen() {
|
export default function AgentScreen() {
|
||||||
const { theme } = useUnistyles();
|
const { theme } = useUnistyles();
|
||||||
@@ -21,14 +21,13 @@ export default function AgentScreen() {
|
|||||||
|
|
||||||
// Keyboard animation
|
// Keyboard animation
|
||||||
const { height: keyboardHeight } = useReanimatedKeyboardAnimation();
|
const { height: keyboardHeight } = useReanimatedKeyboardAnimation();
|
||||||
const footerHeight = FOOTER_HEIGHT + insets.bottom;
|
|
||||||
const bottomInset = insets.bottom;
|
const bottomInset = insets.bottom;
|
||||||
const animatedKeyboardStyle = useAnimatedStyle(() => {
|
const animatedKeyboardStyle = useAnimatedStyle(() => {
|
||||||
"worklet";
|
"worklet";
|
||||||
const absoluteHeight = Math.abs(keyboardHeight.value);
|
const absoluteHeight = Math.abs(keyboardHeight.value);
|
||||||
const padding = Math.max(0, absoluteHeight - bottomInset);
|
const padding = Math.max(0, absoluteHeight - bottomInset);
|
||||||
return {
|
return {
|
||||||
paddingBottom: footerHeight + padding,
|
paddingBottom: padding,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user