@@ -2,7 +2,7 @@ import { useState, useCallback, useEffect, useMemo } from 'react'
22import { View , Text , StyleSheet , Pressable , FlatList } from 'react-native'
33import { SafeAreaView } from 'react-native-safe-area-context'
44import { useRouter , useFocusEffect } from 'expo-router'
5- import { MoreHorizontal , QrCode , Server , Settings } from 'lucide-react-native'
5+ import { Monitor , MoreHorizontal , QrCode , Settings } from 'lucide-react-native'
66import { loadHosts , removeHost , renameHost } from '../src/transport/host-store'
77import { connect } from '../src/transport/rpc-client'
88import type { ConnectionState , HostProfile } from '../src/transport/types'
@@ -22,6 +22,15 @@ function endpointLabel(endpoint: string): string {
2222 }
2323}
2424
25+ const STATUS_LABELS : Record < ConnectionState , string > = {
26+ connected : 'Connected' ,
27+ connecting : 'Connecting…' ,
28+ disconnected : 'Disconnected' ,
29+ reconnecting : 'Reconnecting…' ,
30+ handshaking : 'Connecting…' ,
31+ 'auth-failed' : 'Auth failed'
32+ }
33+
2534export default function HomeScreen ( ) {
2635 const router = useRouter ( )
2736 const [ hosts , setHosts ] = useState < HostProfile [ ] > ( [ ] )
@@ -106,8 +115,8 @@ export default function HomeScreen() {
106115 contentContainerStyle = { styles . list }
107116 ListHeaderComponent = {
108117 < View style = { styles . hero } >
109- < Text style = { styles . heroTitle } > Desktops</ Text >
110- < Text style = { styles . heroSubtitle } > Continue where your agents are running .</ Text >
118+ < Text style = { styles . heroTitle } > Paired Desktops</ Text >
119+ < Text style = { styles . heroSubtitle } > Monitor workspaces and terminals remotely .</ Text >
111120 </ View >
112121 }
113122 ItemSeparatorComponent = { ( ) => < View style = { styles . cardGap } /> }
@@ -122,7 +131,7 @@ export default function HomeScreen() {
122131 delayLongPress = { 400 }
123132 >
124133 < View style = { styles . hostIcon } >
125- < Server size = { 18 } color = { colors . textPrimary } />
134+ < Monitor size = { 18 } color = { colors . textPrimary } />
126135 </ View >
127136 < View style = { styles . hostMain } >
128137 < View style = { styles . hostTitleRow } >
@@ -131,8 +140,8 @@ export default function HomeScreen() {
131140 { item . name }
132141 </ Text >
133142 </ View >
134- < Text style = { styles . hostEndpoint } numberOfLines = { 1 } >
135- { endpointLabel ( item . endpoint ) }
143+ < Text style = { styles . hostStatus } numberOfLines = { 1 } >
144+ { STATUS_LABELS [ hostStates [ item . id ] ?? 'connecting' ] }
136145 </ Text >
137146 </ View >
138147 < Pressable
@@ -147,7 +156,7 @@ export default function HomeScreen() {
147156 ListFooterComponent = {
148157 < Pressable style = { styles . pairCard } onPress = { ( ) => router . push ( '/pair-scan' ) } >
149158 < View style = { styles . pairIcon } >
150- < QrCode size = { 18 } color = { colors . accentBlue } />
159+ < QrCode size = { 18 } color = { colors . textSecondary } />
151160 </ View >
152161 < View style = { styles . pairTextBlock } >
153162 < Text style = { styles . pairTitle } > Pair another desktop</ Text >
@@ -161,6 +170,7 @@ export default function HomeScreen() {
161170 < ActionSheetModal
162171 visible = { actionTarget != null }
163172 title = { actionTarget ?. name }
173+ message = { actionTarget ? endpointLabel ( actionTarget . endpoint ) : undefined }
164174 actions = { [
165175 {
166176 label : 'Rename' ,
@@ -288,15 +298,13 @@ const styles = StyleSheet.create({
288298 } ,
289299 heroTitle : {
290300 color : colors . textPrimary ,
291- fontSize : 28 ,
301+ fontSize : 24 ,
292302 fontWeight : '800'
293303 } ,
294304 heroSubtitle : {
295- color : colors . textSecondary ,
305+ color : colors . textMuted ,
296306 fontSize : typography . bodySize ,
297- lineHeight : 20 ,
298- marginTop : spacing . xs ,
299- maxWidth : 320
307+ marginTop : spacing . xs
300308 } ,
301309 cardGap : {
302310 height : spacing . sm
@@ -309,9 +317,7 @@ const styles = StyleSheet.create({
309317 paddingVertical : spacing . sm ,
310318 minHeight : 70 ,
311319 borderRadius : radii . row ,
312- backgroundColor : colors . bgPanel ,
313- borderWidth : 1 ,
314- borderColor : colors . borderSubtle
320+ backgroundColor : colors . bgPanel
315321 } ,
316322 hostCardPressed : {
317323 backgroundColor : colors . bgRaised
@@ -349,10 +355,9 @@ const styles = StyleSheet.create({
349355 justifyContent : 'center' ,
350356 marginLeft : spacing . xs
351357 } ,
352- hostEndpoint : {
353- color : colors . textSecondary ,
358+ hostStatus : {
359+ color : colors . textMuted ,
354360 fontSize : 13 ,
355- fontFamily : typography . monoFamily ,
356361 marginTop : spacing . xs
357362 } ,
358363 pairCard : {
@@ -364,17 +369,15 @@ const styles = StyleSheet.create({
364369 paddingRight : spacing . md ,
365370 paddingVertical : spacing . sm ,
366371 borderRadius : radii . row ,
367- backgroundColor : colors . bgBase ,
368- borderWidth : 1 ,
369- borderColor : colors . borderSubtle
372+ backgroundColor : colors . bgPanel
370373 } ,
371374 pairIcon : {
372375 width : 44 ,
373376 height : 44 ,
374377 borderRadius : 11 ,
375378 alignItems : 'center' ,
376379 justifyContent : 'center' ,
377- backgroundColor : colors . accentBlue + '18' ,
380+ backgroundColor : colors . bgRaised ,
378381 marginRight : spacing . md
379382 } ,
380383 pairTextBlock : {
0 commit comments