From 78d4fc8c7ab0b45524337e189c5b892797f1afb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20=C5=A0=C4=87eki=C4=87?= Date: Fri, 3 Jul 2026 13:28:26 +0200 Subject: [PATCH 1/4] fix(mobile): make agent approval cards scroll instead of overflowing the screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PermissionCard rendered patterns/metadata (often a full command) in plain Views with no height limit. As a pinned footer below the message list it could grow past the screen, pushing the Deny/Allow buttons off-screen with no way to scroll — approvals became impossible to act on. Wrap the card body in a ScrollView capped at max-h-96 (same pattern as QuestionCard) and let both cards shrink when the available height is smaller (e.g. keyboard open on small screens), keeping the action buttons pinned and reachable while the content scrolls. --- .../src/components/agents/permission-card.tsx | 54 ++++++++++--------- .../src/components/agents/question-card.tsx | 4 +- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/apps/mobile/src/components/agents/permission-card.tsx b/apps/mobile/src/components/agents/permission-card.tsx index dab191c136..74e43d83d2 100644 --- a/apps/mobile/src/components/agents/permission-card.tsx +++ b/apps/mobile/src/components/agents/permission-card.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { ActivityIndicator, View } from 'react-native'; +import { ActivityIndicator, ScrollView, View } from 'react-native'; import * as Haptics from 'expo-haptics'; import { Button } from '@/components/ui/button'; @@ -38,37 +38,39 @@ export function PermissionCard({ .join(' '); return ( - + Permission Required - - - Allow {permissionDisplay}? - + + + + Allow {permissionDisplay}? + - {patterns.length > 0 && ( - - Applies to: - {patterns.map((pattern, index) => ( - - • {pattern} - - ))} - - )} + {patterns.length > 0 && ( + + Applies to: + {patterns.map((pattern, index) => ( + + • {pattern} + + ))} + + )} - {metadata && Object.keys(metadata).length > 0 && ( - - {Object.entries(metadata).map(([key, value]) => ( - - {key}: {String(value)} - - ))} - - )} - + {metadata && Object.keys(metadata).length > 0 && ( + + {Object.entries(metadata).map(([key, value]) => ( + + {key}: {String(value)} + + ))} + + )} + +