From 86cb99cad89e897a0e34f3ea162a9c85d75698b5 Mon Sep 17 00:00:00 2001 From: Jinwoo-H Date: Wed, 29 Apr 2026 04:29:53 -0400 Subject: [PATCH] Improve mobile UI polish - BottomDrawer: shift drawer up when keyboard opens using Keyboard events, add ScrollView for content overflow - NewWorktreeModal: replace FlatList with plain map to avoid nested VirtualizedList error - Home: replace Server icon with Monitor, hide IP from cards (show in action sheet), add connection status subtitle, update hero copy - About: remove redundant link labels, use neutral text color for URLs Co-authored-by: Orca --- mobile/app/about.tsx | 7 ++- mobile/app/index.tsx | 47 ++++++++++---------- mobile/src/components/BottomDrawer.tsx | 51 +++++++++++++++++++--- mobile/src/components/NewWorktreeModal.tsx | 22 ++++------ 4 files changed, 83 insertions(+), 44 deletions(-) diff --git a/mobile/app/about.tsx b/mobile/app/about.tsx index 46454a2c3..088c6da21 100644 --- a/mobile/app/about.tsx +++ b/mobile/app/about.tsx @@ -47,7 +47,6 @@ export default function AboutScreen() { onPress={() => void Linking.openURL('https://onOrca.dev')} > - Website onOrca.dev @@ -56,7 +55,6 @@ export default function AboutScreen() { onPress={() => void Linking.openURL('https://github.com/stablyai/orca')} > - GitHub stablyai/orca @@ -65,7 +63,6 @@ export default function AboutScreen() { onPress={() => void Linking.openURL('https://x.com/orca_build')} > - X @orca_build @@ -135,8 +132,10 @@ const styles = StyleSheet.create({ color: colors.textPrimary }, rowValue: { + flex: 1, + textAlign: 'right', fontSize: typography.bodySize, - color: colors.accentBlue + color: colors.textSecondary }, separator: { height: StyleSheet.hairlineWidth, diff --git a/mobile/app/index.tsx b/mobile/app/index.tsx index 37fecb0d4..76bd4e99c 100644 --- a/mobile/app/index.tsx +++ b/mobile/app/index.tsx @@ -2,7 +2,7 @@ import { useState, useCallback, useEffect, useMemo } from 'react' import { View, Text, StyleSheet, Pressable, FlatList } from 'react-native' import { SafeAreaView } from 'react-native-safe-area-context' import { useRouter, useFocusEffect } from 'expo-router' -import { MoreHorizontal, QrCode, Server, Settings } from 'lucide-react-native' +import { Monitor, MoreHorizontal, QrCode, Settings } from 'lucide-react-native' import { loadHosts, removeHost, renameHost } from '../src/transport/host-store' import { connect } from '../src/transport/rpc-client' import type { ConnectionState, HostProfile } from '../src/transport/types' @@ -22,6 +22,15 @@ function endpointLabel(endpoint: string): string { } } +const STATUS_LABELS: Record = { + connected: 'Connected', + connecting: 'Connecting…', + disconnected: 'Disconnected', + reconnecting: 'Reconnecting…', + handshaking: 'Connecting…', + 'auth-failed': 'Auth failed' +} + export default function HomeScreen() { const router = useRouter() const [hosts, setHosts] = useState([]) @@ -106,8 +115,8 @@ export default function HomeScreen() { contentContainerStyle={styles.list} ListHeaderComponent={ - Desktops - Continue where your agents are running. + Paired Desktops + Monitor workspaces and terminals remotely. } ItemSeparatorComponent={() => } @@ -122,7 +131,7 @@ export default function HomeScreen() { delayLongPress={400} > - + @@ -131,8 +140,8 @@ export default function HomeScreen() { {item.name} - - {endpointLabel(item.endpoint)} + + {STATUS_LABELS[hostStates[item.id] ?? 'connecting']} router.push('/pair-scan')}> - + Pair another desktop @@ -161,6 +170,7 @@ export default function HomeScreen() { { + if (!visible) return + + const showEvent = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow' + const hideEvent = Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide' + + const onShow = Keyboard.addListener(showEvent, (e) => { + const height = e.endCoordinates.height - insets.bottom + keyboardOffset.value = withTiming(Math.max(height, 0), { duration: e.duration || 250 }) + }) + const onHide = Keyboard.addListener(hideEvent, (e) => { + keyboardOffset.value = withTiming(0, { duration: e.duration || 250 }) + }) + + return () => { + onShow.remove() + onHide.remove() + keyboardOffset.value = 0 + } + }, [visible, insets.bottom]) + const dismiss = useCallback(() => { onClose() }, [onClose]) @@ -66,7 +101,7 @@ export function BottomDrawer({ visible, onClose, children }: Props) { }) const drawerStyle = useAnimatedStyle(() => ({ - transform: [{ translateY: translateY.value }] + transform: [{ translateY: translateY.value - keyboardOffset.value }] })) const backdropStyle = useAnimatedStyle(() => ({ @@ -86,7 +121,13 @@ export function BottomDrawer({ visible, onClose, children }: Props) { style={[styles.drawer, { paddingBottom: insets.bottom + spacing.lg }, drawerStyle]} > - {children} + + {children} + @@ -135,10 +176,10 @@ const styles = StyleSheet.create({ }, bottomExtension: { position: 'absolute', - bottom: -100, + bottom: -500, left: 0, right: 0, - height: 100, + height: 500, backgroundColor: colors.bgBase } }) diff --git a/mobile/src/components/NewWorktreeModal.tsx b/mobile/src/components/NewWorktreeModal.tsx index 20d7f1a87..8431a63d2 100644 --- a/mobile/src/components/NewWorktreeModal.tsx +++ b/mobile/src/components/NewWorktreeModal.tsx @@ -8,8 +8,7 @@ import { StyleSheet, Platform, ActivityIndicator, - Image, - FlatList + Image } from 'react-native' import { ChevronDown, ChevronUp, Check, Terminal } from 'lucide-react-native' import Svg, { Path, G } from 'react-native-svg' @@ -215,14 +214,11 @@ function PickerListModal({ {title} - item.id} - style={styles.pickerList} - ItemSeparatorComponent={() => } - renderItem={({ item }) => { - const selected = item.id === selectedId - return ( + {items.map((item, index) => { + const selected = item.id === selectedId + return ( + + {index > 0 && } [styles.pickerItem, pressed && styles.pickerItemPressed]} onPress={() => { @@ -239,9 +235,9 @@ function PickerListModal({ {selected && } - ) - }} - /> + + ) + })} )